teleren/devto huggingface dataset:
Level Up Your AWS Community Day: Creating Custom Gaming Mats with AWS Architecture Icons
Tags: community, aws, python, awscommunityday
Published: 2023-09-10 21:44:27

The AWS Community Day Aotearoa- 2023 (New Zealand) was a success. This Gaming Mat SWAG drew a lot of attention from the attendees. First and foremost, I'd like to thank fellow AWS Community Builder @rmitula for his assistance in designing the Gaming Mat for AWS Community Day Aotearoa (New Zealand). The custom-made AWS Architecture Icons Mouse Pad that was given away during Poland AWS Community Day - Warsaw inspired me to do this.

Here is the Cool Gaming Mat:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1asx0mr9sgjig0jobp9.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ohi75at981jj7tek6kgh.png)

So I decided to include the steps and a script for creating the Gaming Mat design.

Check this out if you're searching for some fantastic SWAGS for your AWS Community Day: https://github.com/awsfanboy/AWS-Community-Day-Gaming-Mat

Let me know if you need any help :) .
Improving Performance With Linux Boxes in Hyper-V
Tags: hyperv, virtualmachine, linux, rdp
Published: 2023-09-10 21:26:41


This post contains a collection of `StackOverflow` posts that were used to solve my Linux box performance issues in Hyper-V.  All original pages are listed, where the commands from those sources are written out along with the story of how I used them.

# 📈 Improving Performance

I found the UI to be really clunky and slow on HiDPI monitors, and after some digging I found the following things to improve performance:

## 💫 Disable Compositing

**Source:** [xrdp is quite slow](https://askubuntu.com/questions/1323601/xrdp-is-quite-slow)

This setting can be tested using:

```bash
xfconf-query --channel=xfwm4 --property=/general/use_compositing --type=bool --set=false --create
```

After entering the above command I found that my performance issues were far less noticeable. So the next thing I needed to do was make the fix permanent, so I added the following to a new file `/etc/X11/xorg.conf` (I found the location to add this configuration file by reading through `man xorg.conf`):

```
Section "Extensions"
    Option "Composite" "Disable"
EndSection 
```

<aside>
💡 This can also be edited using the GUI: `xfwm4-tweaks-settings`

</aside>

I then rebooted and checked the GUI to see if my edits to the `xorg.conf` configuration file worked.

## ❎ Optimize XRDP Configuration

**Source:** [xrdp and xfce4 Ubuntu > 18.04 Unusable](https://askubuntu.com/questions/1283709/xrdp-and-xfce4-ubuntu-18-04-unusable/1283785#1283785)

The settings that I modified in the `/etc/xrdp/xrdp.ini` file were:

```bash
max_bpp = 128
xserverbpp = 128
crypt_level = low
```

The final recommendation was to lower the color quality from 32 bits to 16 bits. I was unable to modify this setting by using the “Connect” button within Hyper-V Manager, so the next thing I needed to do was configure `xrdp` to allow connections outside the `console`

# 🖥️ Allowing RDP Connections Outside Hyper-V

**Sources:** 

- [XRDP rejecting login](https://superuser.com/questions/1264096/xrdp-rejecting-login)
- [Remote Desktop can't connect to Hyper-V Ubuntu v22.04 guest](https://superuser.com/questions/1773172/remote-desktop-cant-connect-to-hyper-v-ubuntu-v22-04-guest)


Edit the following file `/etc/X11/Xwrapper.config`:

```bash
# Change this value
allowed_users=console

# To this value
allowed_users=anybody
```

Next we need to configure `xrdp` to listen for outside connections through `tcp` by adding the following to `/etc/xrdp/xrdp.ini`:

```bash
port=vsock://-1:3389 tcp://:3389
```

<aside>
💡 Note that you will need to restart `xrpd` for this change to take effect. Make sure you take note of your ip address before restarting xrdp so that you can connect using the RDP app, and not have to go back in through Hyper-V once your session is closed.

It is also worth noting that entering `service xrdp restart` will boot your RDP client, but keep you logged in. Which will result in you not being able to connect another RDP session until you restart your box.
</aside>
🌟 Uncover the Secret to Server Stability! 🌟
Tags: serverstability, devops, apache2, webmaintenance
Published: 2023-09-10 20:58:01

Is server downtime keeping you up at night? Worried about the cost of disruptions? We have the solution! 💡

Dive into our latest guide: "How to Know If Your Server Was Down for FREE Apache2." This article reveals:

✅ Expert tips for monitoring server health.
✅ Swift alerts to tackle downtime.
✅ Troubleshooting advice for Apache2 server hiccups.
✅ Best of all, it's completely FREE!

Take charge of your website's uptime. Read the article now and ensure your server operates flawlessly! 💻

👉 [Explore Here](https://www.builtbybuilder.com/blog/server-downtime-detection-apache2)

#ServerStability #Apache2 #WebMaintenance #devops
Human-Powered Tech: The Future of Wearable Devices That Harness Kinetic Energy
Tags: futuristic, future
Published: 2023-09-10 20:53:54

## The Future of Wearable Devices That Harness Kinetic Energy

The world of wearable technology is evolving, and one of the most exciting frontiers is the development of devices that can generate power from our everyday movements. These human-powered wearables have the potential to change the way we think about energy generation and the role of technology in our lives. In this article, we'll explore the fascinating world of kinetic energy-harnessing wearables.

## The Power of Movement

Imagine your daily jog, the steps you take while commuting, or even the simple act of typing on a keyboard contributing to the generation of electricity. That's the essence of kinetic energy-harnessing wearables. These devices are designed to capture and convert the energy produced by your body's movements into usable power.

## Applications Across Industries

The applications of human-powered wearables are vast. From fitness trackers that never need charging to smartwatches that can run indefinitely, these devices are changing the landscape of wearable tech. Beyond personal use, they have the potential to power remote sensors, medical devices, and even emergency communication tools in remote areas.

## Eco-Friendly and Sustainable

One of the most significant advantages of kinetic energy-harnessing wearables is their eco-friendliness. By generating power from human motion, they reduce the reliance on disposable batteries and traditional charging methods. This not only saves resources but also contributes to a greener and more sustainable future.

## Challenges and Innovations

While the concept is promising, there are challenges to overcome, including efficiency and miniaturization. Researchers and engineers are continually working to enhance the energy conversion efficiency of these wearables and make them smaller and more practical for everyday use.

## The Future of Wearable Energy

As the technology matures, we can expect to see a new generation of wearables that not only track our activities but also power themselves and other devices. The potential for these devices to transform industries, improve sustainability, and enhance our everyday lives is immense.

In conclusion, kinetic energy-harnessing wearables represent a significant step towards a more sustainable and technologically advanced future. They demonstrate the power of innovation in merging technology with our daily activities and offer a glimpse into the limitless possibilities of wearable tech. As we continue to move, we may also be powering the future. 🏃‍♀️⚡
Save a pdf created with pdfkit to Google Cloud Storage
Tags: pdfkit, firebase, javascript, node
Published: 2023-09-10 20:24:45

While cleaning the cloud functions of one Firebase project, i found a set of routines to save a pdf file to Google Cloud Storage. I'm removing them because i moved the pdf generation to client side.

Posting here in hope it can be useful for someone or my future self.

## Use case

The pdf is generated dynamically with [pdfkit](https://github.com/foliojs/pdfkit) in a firebase cloud function and cached in Google Cloud Storage bucket.

## Generate the Data URL

The first function is to generate a [Data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) from a pdfkit document

```js
async function generatePdfDataUrl(doc) {
  return new Promise((resolve, reject) => {
    const chunks = []

    doc.on('data', (chunk) => {
      chunks.push(chunk)
    })

    doc.on('end', () => {
      const result = Buffer.concat(chunks)
      resolve('data:application/pdf;base64,' + result.toString('base64'))
    })

    doc.on('error', (error) => {
      reject(error)
    })

    doc.end()
  })
}
```

It receives a pdf document and wraps the node stream events in a promise. Stores the file chunks and, at the end, concatenate them after converting to base64. 

## Save to Cloud Storage

```js
const isEmulator = process.env.FUNCTIONS_EMULATOR

const baseFileURL = 'https://storage.googleapis.com/XXX.appspot.com/'

async function storePdfDoc(storage, path, doc) { 
  if (isEmulator) {
    const fileUrl = await generatePdfDataUrl(doc)
    return { fileUrl }
  }
 
  // toLocalDate converts cloud date (UTC) to local GMT-3 in my case
  const reportDate = toLocalDate(new Date())
  const formattedDate = format(reportDate, 'dd-MM-yy-kk-mm')

  const bucket = storage.bucket()
  const fileName = slugify(`${path}-${formattedDate}.pdf`)
  const file = bucket.file(fileName)
  const bucketFileStream = file.createWriteStream()

  return new Promise((resolve, reject) => {
    bucketFileStream.on('finish', () => {
      const link = `${baseFileURL}${fileName}`
      resolve({ fileUrl: link })
    })

    bucketFileStream.on('error', function bucketError(err) {
      reject(err)
    })

    doc.pipe(bucketFileStream)
    doc.end()
  })
}
```

The first step is to check if is running in firebase emulator  and return the Data URL instead of storing the file

> At the time i wrote this function the firebase Storage emulator was not available

This function also wrap node stream functions in a promise. This time, we create a file in the bucket using `bucket.file` and the corresponding writable stream, than pipe the pdfkit document to it.

The catch here is to resolve the promise in the destination stream 'finish' event instead of document 'end' event. This way we ensure the file is fully created / uploaded on the cloud.
Never forget where you come from
Tags: life, career, personal
Published: 2023-09-10 19:55:42



Photo by <a href="https://unsplash.com/@sstoppo?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">ROCCO STOPPOLONI</a> on <a href="https://unsplash.com/photos/h6qnnmbkLBU?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
  
Last week, I was traveling to speak at CityJs + HalfStack Conf Belgrade, and suddenly, I realized how lucky I am to live this life. 

I could not hold my tears in my flight from Vienna to Belgrade.

## I went back in time when 

- I walked 8kms to my college so that I could save 8 INR/ 0.096 USD, so I can buy a vada pav for lunch.
- Avoid taking shared auto while returning home from work so I could save some extra money for my daughter's treatment.
- Could not afford to buy a bed and mattress to sleep on.
- lived in  tiny room in a slum.

## I also realized how lucky I am to spend so much time with my wife and daughter.

### There was a time. 
- I used to work more than 80 hours a week in a startup and used to be in the office for days.

### I am lucky that I can hug my daughter every day.
- I was so close to losing her. 
- I remember when she was born, I couldn't hold her in my arms, and I was scared for the next few months if I could ever do that.
- I remember holding her in my arms when she came back from the hospital, and never wanted her to let go.


![Hiya after coming from hospital](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j4y5v18efd8ovy9vo4jd.JPG)


The realization that I lived a life once, where everything was a dream, and now I am living that dream.

This is what keeps me grounded and makes me realize that I should never forget where I came from.

> I realized how lucky I am to live a life where I can fly to other countries without thinking about money. 

> The important lesson here is to remember where you came from and always be grateful for what you have.


For many, the life you are living is a dream.

## Thank you to everyone for being part of my journey.

- Thanks to my wife, who was always with me in my bad and good times.
- Thanks to my daughter, who loves me the most.
- Thank you to my friends who always support me.
- Thank you to the Angular and Tech community for showing love and support.

> Thanks to the GDE (Google Developer Expert) program for all the support (Travel and Stay) so I can present my talks at the conferences.

Thanks to my employer and friends at Celonis, I can manage my time traveling and caring for my family between work.

Shout out to my GitHub Sponsors for supporting my work on Open Source.
- [Appwrite](https://appwrite.io)
- [Umair](https://twitter.com/_UmairHafeez_)
- [Anand](https://twitter.com/AnandChowdhary)
- [Sunil](https://twitter.com/sunil_designer)
- [Darshan](https://twitter.com/dr5hn)
- [Vikas](https://www.linkedin.com/in/vikas-srivastava-42a5356a/)
Hello AWS! Want to be part of your community.
Tags: webdev, aws, ai, awsbigdata
Published: 2023-09-10 19:36:17

Hey AWS, I'm reaching out for your assistance in becoming a part of the AWS Community Builders. I'm deeply interested in contributing to and engaging with the AWS community, and I believe that joining the AWS Community Builders program would provide me with a fantastic opportunity to do so. I'm eager to learn, collaborate, and share my knowledge and experiences with the AWS community. Your guidance and support in this endeavor would be greatly appreciated. Thank you!
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82gaqjimx1mvhurb1fxg.png)
5 Common Mistakes to avoid at First Client Call
Tags: career, communication, hacks, clientrelationships
Published: 2023-09-10 19:08:32

## When making a first call with a potential client, it's important to make a good impression and establish a professional relationship. Here are some common mistakes to avoid:

1. Being unprepared: Before the call, make sure to research the client's business and their specific needs. This will allow you to tailor your pitch and answer any questions they may have.

2. Take the call in a noisy place: First impressions are everything. This call will affect if you’re getting the project, how much you can charge for it, and if the client likes you or not. This is why you should do it like a pro - in a quiet place, where you can sit and take some notes.

3. Being too pushy or aggressive: You want to come across as confident and knowledgeable, but being too pushy can turn the client off. Instead, focus on building a relationship and understanding their needs.

4. Too much talking, not enough listening: Did you hear the phrase “the client is always right?” Well, your client heard it too. That is why you should be listening more than talking. Let the client talk as much as he wants. If he’s not much of a talker, just ask him as many questions as possible. The more info you get, the better. Don’t worry about selling yourself, he called you, remember?

5. Talk about money on the first call: The scary part is here - the client will ask you: “how much is it going to cost? ”Personally, it used to freak me out. I used to sweat, and feel like something is stuck in my throat. My advice is - you shouldn’t talk about money on this call. Tell the client that you need time to sit down and do your calculation. You have to understand what’s the best for you and him. Promise to get back to him within a day or two. He’ll respect that, and you will end the call with the ball in YOUR court.

By avoiding these mistakes, you can increase your chances of making a positive impression and landing the client. Let me know if you wanna add anything what you experienced on your client call. 🙌
Simple Management of Environment Variables with Vercel Env
Tags: services, cli, tools
Published: 2023-09-10 18:52:55

Are you tired of manually setting up environment variables every time you work on a local development project? Vercel has a solution for you! Using Vercel Env from Vercel CLI can save you time and trouble, allowing you to work more efficiently and happily.

## What is Vercel Env?

Vercel Env is a command-line interface (CLI) tool that makes it easy for you to manage environment variables in your local development environment. It enables you to export your project's environment variables to a local file, such as `.env`, that can be used by local development tools like `next dev`. You can also use `vercel env` to list, add, or remove environment variables from your Vercel project.

## Benefits of Using Vercel Env

*   **Improves local development workflow:** Vercel Env simplifies your local development workflow, making it more efficient and enjoyable. With Vercel Env, you can easily manage your environment variables and focus on writing code.

*   **Easy to use:** Vercel Env is easy to use, even if you're new to the command line. With just a few simple commands, you can list, add, or remove environment variables from your Vercel project.

## How to Use Vercel Env

### Install

Install the Vercel CLI by running the following command in your terminal:

```npm
npm i -g vercel
```

### Pull

Run the following command to export your project's environment variables to a local file:

```bash
vercel env pull <file>
```

This will export your project's environment variables to the specified file (e.g., `.env`).

### List

To list all environment variables in a Vercel project, run the following command:

```bash
vercel env ls
```

### Add

To add an environment variable to a Vercel project, run the following command:

```bash
vercel env add
```

### Remove

To remove an environment variable from a Vercel project, run the following command:

```bash
vercel env rm
```

You'll be prompted to enter the name and value of the environment variable you want to add or remove.

Note: After updating environment variables on Vercel (via the dashboard, `vercel env add`, or `vercel env rm`), run `vercel env pull <file>` again to get the updated values.

## Conclusion

In this blog post, we've explored the features and benefits of using the [Vercel CLI env](https://vercel.com/docs/cli/env) commands. If you're a modern web developer looking to simplify environment variable management during local development, `vercel env` is the perfect tool for you. Check out other blog posts on this site to learn more about other useful tools for modern web development. Happy coding!
New Beginnings
Tags: devmotivation, codenewbie, beginners
Published: 2023-09-10 18:49:28

After completing my undergraduate degree in economics, I was eager to enter the workforce and start my career. However, I quickly realized that the job market was tough and despite sending out numerous resumes and going to several interviews, I couldn't find a job in my field. I began to feel frustrated and discouraged, and I knew I needed to do something to set myself apart from the competition.

That's when I decided to go back to school to upskill in a field that was in high demand: software engineering. I enrolled in a coding bootcamp and spent months learning how to code and build software. It wasn't easy - I had to juggle coursework with part-time work to make ends meet - but I was determined to succeed.

I was amazed at how much I enjoyed software engineering. The problem-solving nature of coding appealed to me, and I was excited to be a part of an industry that was constantly evolving and innovating. I also appreciated the fact that software engineering was a field that was in high demand, and that my new skills would make me a more marketable candidate.

One of the biggest challenges I faced during this process was adapting to a new way of thinking. Economics had been my focus for years, and switching to a technical field required a completely different skill set. However, I found that my background in economics gave me a unique perspective when it came to problem-solving, and I was able to bring a fresh approach to my coding projects.

After completing the bootcamp, I was able to secure a job as a software engineer at a startup. I was thrilled to have found a job in a field that I was passionate about, and I was grateful for the opportunity to upskill and make myself more marketable to employers. Going back to school to learn software engineering was a challenging experience, but it ultimately paid off in the form of a rewarding career.

Looking back, I realize that my lack of employment in economics was a catalyst for me to take control of my career path and invest in my future. I'm excited to continue growing and developing my skills as a software engineer, and I'm grateful for the opportunity to have found a field that I'm truly passionate about.
Находки по разработке 4
Tags: news, python, javascript, go
Published: 2023-09-10 18:29:46

- Вышел Bun 1.0
{% embed https://youtu.be/dWqNgzZwVJQ?si=Fup96Wr6AjyFP7vv %}
- [Улучшение формул в Notion](https://twitter.com/NotionHQ/status/1699828805408550971)
- https://poe.com/ - аггрегатор ai-чат моделек
- https://adamj.eu/tech/2023/09/07/introducing-flake8-logging/ - flake8-плагин для линтинга logging-модуля
- https://ui.nuxt.com/ - релиз nuxt-ui - юай-кита на базе tailwind и headless-ui
- [ну и новый релиз nuxt](https://twitter.com/danielcroe/status/1695231761351930182)
- [tree-view завезли в melt-ui](https://twitter.com/thomasglopes/status/1699731835637428242)
- [батя раскатал про vue ui-киты](https://twitter.com/youyuxi/status/1695740094127456292)
- [GoTTY - Share your terminal as a web application](https://github.com/yudai/gotty) - может быть полезно для сисадминства 
- [тредик как вкатиться в go](https://twitter.com/_abstractart/status/1695834398535336369)
- [inertia-django](https://github.com/inertiajs/inertia-django), [django-vite](https://github.com/MrBin99/django-vite) - понаделали клея для django и фронтенд-фреймворков
  - то есть вместо написания апишки, сразу фетчишь данные на django и юзаешь их во vue 
  - хотя для мобилки-то все равно надо апишку писать 💀
- [батя рассказал про то как терь можно structured-логи делать в гошке](https://twitter.com/kelseyhightower/status/1695660605930344711)
- [запись голоса на python](https://twitter.com/clcoding/status/1693809211866759530)

Фронтенд-фреймворки? А может лучше суицид?

{% embed https://twitter.com/pixelfjord/status/1694713936179081573 %}