teleren/devto huggingface dataset:
Levitating Balls
Published: 2023-04-11 17:50:02

I was working on a task and suddenly this idea kicked in, so I took help from Chatgpt to draft a simple html app and improved it.

index.html

```
<!DOCTYPE html>
<html>
  <head>
    <title>Levitating Balls</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div class="container">
      <p class="small-title">Quick app ✨</p>
      <h1 class="title">Levitating Balls</h1>
      <div class="balls-container">
        <div id="ball-mid" class="ball"></div>
        <div class="ball"></div>
        <div class="ball"></div>
        <div class="ball"></div>
        <div class="ball"></div>
        <div class="ball"></div>
        <div class="ball"></div>
        <div class="ball"></div>
        <div class="ball"></div>
      </div>
    </div>

    <script src="script.js"></script>
  </body>
</html>
```

style.css

```
body {
  margin: 0;
  padding: 0;
}

.container {
  height: 100vh;
  position: relative;
  display: grid;
  place-content: center;
  overflow: hidden;
  background: blue;
}

.title {
  font-size: 8em;
  font-family: monospace;
  color: white;
}

.small-title {
  font-size: 2em;
  font-family: monospace;
  color: white;
  text-align: start;
}

.balls-container {
  height: 100%;
  width: 100%;
  position: absolute;
}

.ball {
  position: absolute;
  width: 8em;
  height: 8em;
  border: 3px solid rgb(255, 255, 255);
  background-color: blue;
  border-radius: 50%;
  transition: transform 2s;
}
```

script.js

```
const balls = document.getElementsByClassName('ball');

let drop = 0;
setInterval(() => {
  console.log({ drop });
  for (let i = 0; i < balls.length; i++) {
    if (drop) {
      console.log('top');
      balls[i].style.transform = `translateY(${Math.random() * 90}vh)`;
    } else {
      balls[i].style.transform = `translateY(${90}vh)`;
    }
    balls[i].style.transform += `translateX(${Math.random() * 90}vw)`;
    const zIndex = parseInt(Math.random() * 3);
    console.log({zIndex})
    balls[i].style.zIndex = `${zIndex}`;
  }
  drop = !drop;
}, [2000]);
```
How Are Emerging Technologies Transforming The Tech Industry? Share your insights with Emojis!
Tags: discuss, ai, 5g, webdev
Published: 2023-04-11 17:47:05

Technology is advancing at an unprecedented pace, with emerging technologies such as artificial intelligence, 5G, and quantum computing poised to transform the industry. But what impact will they have on the future, and how are they already shaping our world?

We want to hear from you! Share your insights on the impact of these emerging technologies by using emojis to convey your thoughts. Here are some ideas to get you started:

**🤖 Artificial Intelligence (AI):**

How do you see AI changing the way we work, communicate, and interact with technology? Will it lead to job displacement or new opportunities? What are the potential benefits and risks of AI?

**📶 5G:**

What impact do you think 5G will have on the way we use and consume data? Will it enable new applications and services, such as virtual reality and autonomous vehicles? How will it impact industries like healthcare, manufacturing, and entertainment?

**🔬 Quantum Computing:**

What breakthroughs in science and technology do you see being made possible by quantum computing? How will it impact fields like cryptography, drug discovery, and materials science? What are the potential ethical considerations and implications of this powerful technology?

Use emojis to express your thoughts and ideas on these important topics. Are you excited, concerned, or curious about the impact of emerging technologies? Share your insights with us and join the conversation about the future of technology! 👇💬
Struggling with Your Social Media Bio? Try ChatGPT's Simple and Free Template!
Tags: gpt4, socialmedia, bio
Published: 2023-04-11 17:37:57

Are you struggling to come up with the perfect bio for your social media profiles? Look no further than ChatGPT's simple and free template!

This user-friendly template offers a quick and easy solution to craft an engaging and impressive bio that reflects your personality and interests. Whether you're a seasoned influencer or just getting started, ChatGPT has everything you need to take your social media game to the next level. So why wait? Try this free template today and watch your online presence soar!

## GPT Template for Your Social Media Profiles

To get started, simply fill in the following details about yourself here:

[https://chat.openai.com/chat](https://chat.openai.com/chat)

```
Given this info about myself:

Name: 
Current position: 
Company: 
Stack: 

Roles: 
Interests: 
Looking For: 

1. Bio ( at least 3 paragraphs ) for my joinentre.com profile.
2. Short intro ( less than 160 characters) for my Twitter profile, no hashtags.
3. Short intro ( less than 80 characters) for TikTok, no hashtags.

Should be engaging, In first person.
```

## The Power of a Well-Crafted Bio

An engaging bio can work wonders for your social media profiles. It not only showcases your skills, interests, and experiences but also helps to attract new followers and build a strong online presence.

With ChatGPT's template, you can ensure that your bio is tailored for each platform and optimized for maximum impact.
HOW TO CREATE A KEY VAULT AND ADD A SECRET TO IT.
Tags: azure, tutorial, cloud
Published: 2023-04-11 17:37:34

**STEP 1**: Search "key vault" on the search panel. Click on it and click create.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yro9yx2ehs5mgit7ssdw.png)

**STEP 2**: Add or create a new resource group. Fill in all the details, give it a name of choice, pricing tier should remain on standard, purge protection should be disabled. Click on review+create then scroll down to click on create.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kwpq2uyogrjmz1qqu44m.png)

**STEP 3**: After deployment, Go to resource. Click on "Keys" under objects, click on "Generate/import". Give it a name, add an expiry date should you want it to expire later, every other details can remain on default then click on create.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39ilgozeh3348nx5nmq7.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pq0efbrnk3ko6cthcjcw.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nmbo8fxj9pi8f5k0an02.png)

**STEP 4**: Go back to Azure home page and click on "Key vault" then Click on the key you created to view it.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qan07q1efkvc1zxkumvj.png)

**STEP 5** To create a secret, Click on the key you created click on "Secret" just below "keys" then click on "Generate/import". Fill in the name of your secret, enter your secret in the secret value panel, set an expiry date (this is optional) then click on create.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ncf37ob7harwff79bjy2.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dgzvstp7n72b7qr2crjk.png)
What is in common between DevOps and composing a music?
Tags: devops, music, common
Published: 2023-04-11 17:32:47

DevOps and composing music have some similarities in terms of their approach and methodology. Here are some commonalities:

1. Collaboration: Both DevOps and music composition require collaboration and teamwork. In DevOps, developers, operations, and QA teams work together to achieve a common goal, while in music composition, different musicians work together to create a harmonious sound.

2. Iterative Process: Both DevOps and music composition involve an iterative process. In DevOps, the team constantly tests, develops, and deploys code in small increments, while in music composition, composers constantly tweak and refine their work until they achieve the desired sound.

3. Automation: Automation is a crucial aspect of both DevOps and music composition. In DevOps, automation tools are used to automate repetitive tasks, while in music composition, digital audio workstations (DAWs) are used to automate music production.
 
4. Continuous Improvement: DevOps and music composition are both about continuous improvement. In DevOps, the goal is to continuously improve the software development process, while in music composition, the goal is to continuously improve the music composition process to create better and more sophisticated sounds.

5. Creativity: Both DevOps and music composition require a high degree of creativity. In DevOps, developers need to think creatively to come up with innovative solutions to problems, while in music composition, composers need to be creative to come up with unique and original melodies and sounds.
Setting up multiple environments in Angular app
Tags: angular
Published: 2023-04-11 17:15:13

Environments

1. Development
2. Testing
3. Staging
4. Production

Configure environments

```
ng generate environments
```

In `environment.ts`

```tsx
export const environment = {
  production: false,
	apiUrl: 'http://url'
};
```

In `environment.prod.ts`

```tsx
export const environment = {
  production: true,
  apiUrl: 'http://url'
};
```

In `environment.development.ts`

```tsx
export const environment = {
  production: true,
  apiUrl: 'http://url'
};
```

In `environment.staging.ts`

```tsx
export const environment = {
  production: true,
  apiUrl: 'http://url'
};
```

In `angular.json` add

```tsx
"projectName": {
  ...
  "architect": {
    "build": {
      ...
      "configurations": {
        "production": {
          "fileReplacements": [
            {
              "replace": "src/environments/environment.ts",
              "with": "src/environments/environment.prod.ts"
            }
          ]
        },
        "stage": {
          "fileReplacements": [
            {
              "replace": "src/environments/environment.ts",
              "with": "src/environments/environment.stage.ts"
            }
          ]
        },
        "testing": {
          "fileReplacements": [
            {
              "replace": "src/environments/environment.ts",
              "with": "src/environments/environment.testing.ts"
            }
          ]
        }
      }
    ...
    }
    ...
  }
  ...
}
```

```tsx
"configurations": {
  "production": {
    "browserTarget": "projectName:build:production"
  },
  "stage": {
    "browserTarget": "projectName:build:stage"
  },
  "testing": {
    "browserTarget": "projectName:build:testing"
  }
}
```

Serve commands

```tsx
ng serve
ng serve --configuration=testing
ng serve --configuration=stage
ng serve --prod
```

Build Commands

```tsx
ng build
ng build --configuration=testing
ng build --configuration=stage
ng build --prod
```
Kotlin is `fun` - lambdas with receivers
Tags: kotlin, programming, beginners
Published: 2023-04-11 17:09:48

As we already covered, Kotlin provides the ability to extend a class or an interface with new functionality without having to inherit from the class or use design patterns such as Decorator ⮕ [Kotlin is `fun` - extension functions](https://dev.to/derlin/kotlin-is-fun-extension-functions-5bee).

Kotlin also treats functions as [first-class citizens](https://kotlinlang.org/docs/lambdas.html), meaning they can be passed around. It also, of course, supports generics ⮕ [Kotlin is `fun` - Function types, lambdas, and higher-order functions](https://dev.to/derlin/kotlin-is-fun-function-types-lambdas-and-higher-order-functions-3lb4).

This means we can write something like this:

```kotlin
fun <T> T.doWith(op: (T) -> Unit) {
    op(this)
}
```

This extension function can be called on anything and will simply pass this *anything* as an argument to the lambda passed as a parameter. For example:

```kotlin
val someList = listOf(1, 2, 3, 4)

someList.doWith ({ list -> 
    println(list.size)
    println(list.sum())
})
```

This is syntax is not following the conventions. Let's rewrite it in proper Kotlin, by [removing parenthesis](https://kotlinlang.org/docs/lambdas.html#passing-trailing-lambdas) and using [the implicit `it` parameter](https://kotlinlang.org/docs/lambdas.html#it-implicit-name-of-a-single-parameter):

```kotlin
someList.doWith { // it -> List<Int>
    println(it.size)
    println(it.sum())
}
```

This is better. Notice though that the `it` is redundant. We would rather be able to write:

```kotlin
someList.doWith { // this -> List<Int>
  println(size)
  println(sum())
}
```

But how? Read on!


## Lambdas with receivers

To make this magic happen, the only necessity is to change the type of the `op` argument from `(T) -> Unit` to `T.() -> Unit`. This special syntax, `A.(B)`, denotes a [*receiver object*](https://kotlinlang.org/docs/lambdas.html#function-literals-with-receiver):

> *Inside the body of the function literal, the receiver object passed to a call becomes an implicit this, so that you can access the members of that receiver object without any additional qualifiers, or access the receiver object using a `this` expression.*

The final implementation is now:

```kotlin
fun <T> T.doWith(op: T.() -> Unit) {
    op(this)
}

listOf(1, 2, 3, 4).doWith {
    println(size)
    println(this.sum()) // "this" is optional 
}
```

It is just a bit of sugar-coating, but admit this syntax looks cool 😎.

---

**Side note**

In the real world, we would also want this `doWith` to be [*inline*](https://kotlinlang.org/docs/inline-functions.html), to improve performances:

```kotlin
inline fun <T> T.doWith(op: T.() -> Unit) {
    op(this)
}
```

---

For more information on receivers (and more examples), see the docs on [Function literals with receivers](https://kotlinlang.org/docs/lambdas.html#function-literals-with-receiver).
How and why did you start contributing to Open Source?
Tags: opensource, discuss, programming, webdev
Published: 2023-04-11 17:07:04

---
title: How and why did you start contributing to Open Source?
published: true
description: Knowing how others started to contribute to open source can help you get started too.
tags: opensource, discuss, programming, webdev
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-04-11 17:02 +0000
---

Recently there was this post 
{% embed https://dev.to/bekahhw/why-arent-you-contributing-to-open-source-3nk8 %}
I found the answers very interesting.

However, what would interest me even more is how and why did you start contributing to Open Source? Did you create your own project? Did you fix a bug? Did you start in an IRC channel?
🚀 10 Game-Changing Reasons to Train Your Own GPT Model! 🎯
Tags: productivity, discuss, ai
Published: 2023-04-11 17:04:40

Hey there, fellow code enthusiasts! It's me, Jimmy, back with another action-packed blog post to supercharge your GPT model experience! Today, we'll dive into the top 10 reasons why training your GPT model for your specific needs will revolutionize your workflow and help you achieve outstanding results! 🌟

## 1️⃣ Unleash The Power of Personalization 🎯

Training your GPT model for your specific needs means a tailor-made AI experience! It'll understand your domain, style, and preferences, enabling it to produce content that truly resonates with you and your audience.

## 2️⃣ Boost Your Productivity 🚀

When your GPT model gets you, you'll spend less time editing and more time implementing your ideas. Say goodbye to tedious revisions and hello to a streamlined workflow! 💨

## 3️⃣ Create High-Quality Content ✍️

By training your model on your past work or industry-specific examples, you'll generate content that stands out and makes an impact – whether it's blog posts, marketing copy, or code snippets!

## 4️⃣ Enhance Your Model's Accuracy 🎯

Fine-tuning your GPT model means it'll have a deeper understanding of your niche, making it more accurate and reliable for your unique use cases.

## 5️⃣ One Model, Infinite Possibilities 🌌

The more you train your GPT model, the better it gets at handling a wide array of tasks. From generating catchy headlines to writing bug-free code, the sky's the limit! 🌈

## 6️⃣ Save Time and Money 💸

With a well-trained GPT model, you'll reduce the need for outsourcing or hiring additional team members, saving you valuable time and resources.

## 7️⃣ Reduce Errors and Frustration 😤

An AI that understands your needs means fewer errors and less frustration. Spend less time correcting mistakes and more time celebrating your successes! 🎉

## 8️⃣ Stay Ahead of the Curve 🏄‍♂️

By training your GPT model, you'll gain a competitive edge and stay ahead in the ever-evolving world of AI and technology.

## 9️⃣ Enjoy a Seamless AI Experience 🕶️

An AI that truly understands your needs will feel like an extension of your own mind, enabling you to work smarter and more efficiently.

## 🔟 Flex Your Creative Muscles 💪

A well-trained GPT model can help you overcome writer's block or coding roadblocks, inspiring you to think outside the box and explore new ideas.

---

So there you have it, folks! 10 incredible reasons to train your GPT model for your specific needs. Trust me, you won't look back! 🌟

If you enjoyed this post, don't forget to smash that follow button for more high-energy, engaging content! And, as always, feel free to drop your thoughts and questions in the comments below! Happy coding! 💻🚀
Create nested ESXi (Virtual ESXi) on Physical ESXi server
Tags: architecture
Published: 2023-04-11 16:57:47

This article is to prepare nested ESXi (virtual ESXi) on physical ESXi server. This is useful for doing small POC or creating 2 node vSAN cluster witness node. 

- Step 1. Create trunk portgroup as vesxi-trunk-portgroup in ESXi where you want to deploy vESXi


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

- Step 2. Create a new VM

	

     - CPU = 4 
     - Memory = 8 GB
     - Disk = 12 GB to install ESXi + 4 GB Cache disk + 8 GB Capacity disk
     - Edit VM settings for CPU to enabled Hardware Virtualization



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


- Step 3. Power on and install ESXi similar to physical ESXi server. 
	

- Step 4. Configure ESXi for network and hostname

    

>  Make sure to give your ESXi vLAN. This is similar to your other physical hosts configuration. 
	

- Step 5. after installation of ESXi add beow 2 paramters in advance 


     - 	scsi0:1.virtualSSD = true
     - 	scsi0:2.virtualSSD = true


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

- Step 6. Reboot the nested ESXi VM.
Can Svelte do Everything Better and Faster?
Tags: discuss, svelte, react, vue
Published: 2023-04-11 16:10:11

Hello everyone!  I am here with an honest question.  It is not click-bait and it is not an article.  A true, 100% honest question.

As my team's tech team leader, I need to be on top of technologies to make the best decision.  Because I specialize in back-end, my front-end knowledge needed updating; therefore, I learned Vue and Svelte.

I am in awe of Svelte, and pretty much want to start a migration path to Svelte from React.  Before I do this, however, I would like to know the general opinion out there around the main question:  Can Svelte do anything other frameworks do?

What opinion do you all have about SSR and SvelteKit?  I hear you.  Many thanks!
Navigating Cloud Confusion: Understanding Google Cloud for First-Time Users
Tags: cloud, beginners, career, googlecloud
Published: 2023-04-11 15:54:06

## What even is Google Cloud Plattform (GCP)?

Imagine storing your files and running your programs on a computer that's not actually in front of you but somewhere else on the internet.

That's what cloud computing is all about! It lets you use powerful computers in remote locations to do all kinds of cool things without fancy hardware or technical know-how—no need to set up and maintain the machines. Instead, Google takes care of everything.

Instead of focusing on infrastructure, it allows you to focus on your product.

## How does renting a server work?

Google has a massive infrastructure and is renting out its servers to you. 

You will get a virtual machine, which acts as a regular computer for you. On there, you can do nearly everything that you could do on the PC you work with every day. You can install any tools and software on it and run your product there. And the best thing is that you will only pay for the time you use the infrastructure.

This is called infrastructure as a Service; it's the foundation of cloud computing.

## How can I use and benefit from the GCP?

You can use the GCP to build products within days rather than months.

I used cloud computing to create an application recently. Instead of buying, wiring, and setting up a physical server, I could simply click on the GCP interface and have a new server up and running within seconds. I then used a managed database to create a ready-to-connect database that I could use without configuration. After realizing, I didn't need the database anymore, I could delete it with a few clicks, and I don't have any servers lying around vacant now.

Through Google Cloud, I was able to create a working prototype within a few days instead of waiting for weeks to get and set up the infrastructure.
Lista de comandos NMAP
Tags: braziliandevs, cybersecurity, linux, nmap
Published: 2023-04-11 15:53:36


`nmap ` é o comando que invoca a ferramenta Nmap;

`-VV` Essa opção ativa o modo "verbose" (verboso), exibindo mais informações detalhadas sobre o processo de escaneamento;

`-sS` realiza um escaneamento TCP SYN para determinar quais portas estão abertas;

`-sT` realiza um escaneamento TCP completo, verificando se as portas estão abertas ou fechadas;

`-sU` realiza um escaneamento UDP para determinar quais portas estão abertas;

`-sV` Nmap tenta identificar as versões dos serviços que estão em execução na máquina alvo;

`-sC` essa opção ativa um conjunto de scripts de detecção padrão do Nmap, que podem ser úteis para identificar vulnerabilidades e serviços em execução em uma máquina alvo;

`-O` tenta identificar o sistema operacional da máquina alvo com base em padrões de tráfego de rede e outras características;

`-A` ativa opções de detecção avançada, incluindo detecção de versão de serviço, script NSE e outros recursos;

`-v` ativa o modo "verbose", exibindo mais informações detalhadas sobre o processo de escaneamento;

`-p` especifica as portas que devem ser escaneadas;

`-iL` permite especificar um arquivo com uma lista de endereços IP ou nomes de hosts para escanear;

`-oN` permite salvar os resultados do escaneamento em um arquivo no formato normal do Nmap;

`-oX` permite salvar os resultados do escaneamento em um arquivo no formato XML.