teleren/devto huggingface dataset:
Terraform - Uma robusta opção para Infraestrutura como Código
Tags: devops, news, terraform, cloud
Published: 2023-02-04 19:43:20

O que é o Terraform Cloud?
O Terraform Cloud, criado pela empresa norte-americana de software HashiCorp, é uma alternativa open source (ou seja, sua implementação pode ser vista e adaptada por qualquer pessoa) para que profissionais possam criar sua infraestrutura em nuvem com código, ao invés de usar a interface de sites ou ferramentas.

Ele pode ser utilizado tanto em nuvens públicas, como Azure, GCP e AWS, ou localmente, em nuvens privadas, como, por exemplo, o Cloudstack ou OpenStack. O Terraform pode ser considerado IaC (infrastructure as code), ou “infraestrutura como código” no português, facilitando assim as configurações, documentações e também versionamentos de desenvolvimentos no ambiente que está sendo criado por meio dele.

Além de ser uma possibilidade muito vantajosa para empresas que visam automatizar o processo de criação de ambientes em nuvem, o Terraform Cloud é uma ótima opção para empreendedorismos considerados multi-cloud (que atuam com duas ou mais clouds simultaneamente), pois com a mesma ferramenta seria possível manter e automatizar o gerenciamento de diferentes ambientes, sendo eles de grande ou pequeno porte. Trazendo ainda mais flexibilidade para esse cenário, esse IaC é compatível com vários sistemas operacionais, incluindo Linux, MacOS e Windows, três das opções mais escolhidas pelo público geral.



Uma de suas principais características é a idempotência, termo muito utilizado na matemática ou em ciência da computação para indicar a propriedade que algumas operações têm de poderem ser aplicadas várias vezes sem que o valor do resultado se altere após a aplicação inicial. Ou seja, uma vez aplicado o seu código terraform, você poderá aplicá-lo quantas vezes desejar e nenhuma alteração será feita em sua infraestrutura, a menos que você tenha de fato alterado algo em seu código.

O Terraform utiliza uma linguagem de alto nível e fácil de se reutilizar, uma vez que podemos criar módulos e utilizar estes módulos em diversos projetos distintos, mesmo que tenhamos módulos em repositórios também distintos.

A ideia de possuir um “plano” de execução nos ajuda a identificar falhas em nosso código mais rapidamente, bem como prevenir problemas em nossa infraestrutura, visto que podemos ter uma visão geral de tudo o que será aplicado em nossa infra antes mesmo da execução real de nosso código, nos permitindo ter a certeza de que todas as alterações serão de fato intencionais.
Create a React App
Published: 2023-02-04 19:34:56

React is an open-source front-end JavaScript library for building user interfaces based on UI components. 

There are many ways to create a new React App, but in my opinion using Vite is currently the best way to do it.

First step is to download the LTS version [Node.js](https://nodejs.org/en/) from https://nodejs.org/en/

![NodejsSS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dgv5wpx6oitemfkndv32.png)

If you have already done this before you can check your node version in your terminal.
```
node --version
```

![nodeversion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pr7bs2l56xjwfv54xu99.png)

If this is working for y'all we can move on to using Vite!

First run the command below and follow the prompts
```
npm create vite@latest
```
This is roughly what it should look like

![vitecli](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fr3uwp4ciirk015i56go.png)
You have successfully created a React app. Now let's test it by running the following commands.
```
cd <Your-Project-Name>
npm install 
npm run dev
```
After running these in your terminal, open the localhost link in your browser and you should see your React-Vite app running!

![preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s0ts8xc893kutjx1muf6.png)

Hope you liked this post and learned how to create your first React-Vite App!
Unleash the Power of Google Test: The Fun and Effective Way to Test Your C++ Code
Tags: cpp, google, test
Published: 2023-02-04 19:33:47

Testing plays a crucial role in software development to guarantee that the code operates as intended and modifications don't disrupt existing features. C++, a popular and versatile programming language, requires testing to confirm its accuracy. One of the favored options for testing C++ is Google Test (gtest), a free and user-friendly framework for writing and executing tests. gtest is extensively utilized in the C++ community and boasts several advantages, making it an excellent choice for C++ testing.
[Read more]( https://www.oliver-joisten.se/unleash-the-power-of-google-test-the-fun-and-effective-way-to-test-your-c-code/)

###THANK YOU FOR READING
I hope you found this little article helpful. Please share it with your friends and colleagues. Sharing is caring.
Please visit also my [website](https://www.oliver-joisten.se/blog/) to read more informative blogposts
Connect with me on [LinkedIn](https://www.linkedin.com/in/oliver-joisten/) to read more about C/C++, Git, Github, and more…!
Auto Dev.to's posts updater on GitHub readme
Tags: webdev, programming, github, community
Published: 2023-02-04 19:29:04

To show your latest dev.to posts in the GitHub page readme is awesome 🌈, because:
1. Show you're actively creating blogs ✍️
2. Github page's viewers become familiar with your Dev.to blog 🚀

But how to achieve this:

## 1. The first step is ( Create a username repo )
Make a repository in your GitHub page with your own username - if you haven't created that yet.
like this: [https://github.com/vito-mohagheghian/vito-mohagheghian](https://github.com/vito-mohagheghian/vito-mohagheghian)

And will appear in your profile like this.

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


## 2. Edit `readme.md` File
Copy/Paste the code below, where you wanna your latest blogs appear in the `readme.md` file.

> they won't appear in preview mode.

```
## Latest Blog posts
<!-- BLOG-POST-LIST:START -->
<!-- BLOG-POST-LIST:END -->
```

## 3. Create a `.github` folder
Clone your repository in your device using `git clone [your repo's address]`.
like this `git clone https://github.com/vito-mohagheghian/vito-mohagheghian.git`

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

Make new a new folder named `.github` and inside of this, make a new folder named `workflows`, then create a new folder like this: `blog-post-workflow.yml`

# Modify .yml file

Copy/Paste the code below and just replace your dev.to username with mine in feed_list.

```yml
name: Latest blog post workflow
on:
  schedule:
    # Runs every hour
    - cron: '0 * * * *'
  workflow_dispatch:

jobs:
  update-readme-with-blog:
    name: Update this repo's README with the latest blog posts
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: gautamkrishnar/blog-post-workflow@v1
        with:
          max_post_count: "3"
          remove_duplicates: true
          feed_list: "https://dev.to/feed/vitomohagheghian"
```

You can also change max_post_count and remove_duplicates values.

# Push Changes to github
push changes you made with the following commands.

```bash
git add .
```

```bash
git commit -m "add workflows"
```

```bash
git push
```

# Run Github Actions

Now go to your GitHub repository, and go to the Actions tab.

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

You will see your workflow below 'all workflows', then click on `Run workflow`, and run it.

Congratulation 🎓, You have your own auto Github blog posts updater 🦄.

[Keep in touch](https://vito-dev.ir)

Keep Coding Y'All 👨🏻‍💻
How to switch from Docker Desktop to Colima for local development
Tags: ddev, docker, colima, dockerdesktop
Published: 2023-02-05 04:18:31

---
title: How to switch from Docker Desktop to Colima for local development
published: true
date: 2023-02-04 19:06:47 UTC
tags: DDEV,Docker,Colima,DockerDesktop
canonical_url: https://davidloor.com/2023/02/04/how-to-switch-from-docker-desktop-to-colima-for-local-development/
---

![blue and red cargo ship on sea during daytime](https://i0.wp.com/davidloor.com/wp-content/uploads/2022/02/joqjbvo1p9g.jpg?resize=800%2C534&ssl=1)

## What is Colima?

Per the official documentation:

- “Colima means Containers in Lima.”<sup><a href="https://github.com/abiosoft/colima/blob/main/README.md" target="_blank" rel="noreferrer noopener">1</a></sup>
- “Colima is basically a higher level usage of Lima and utilizes [Lima](https://github.com/lima-vm/lima) to provide Docker, Containerd and/or Kubernetes.”<sup><a href="https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#how-does-colima-compare-to-lima" target="_blank" rel="noreferrer noopener">2</a></sup>
- “Since [Lima](https://github.com/lima-vm/lima) is aka Linux on Mac. By transitivity, Colima can also mean Containers on Linux on Mac.”<sup><a href="https://github.com/abiosoft/colima#what-is-with-the-name" target="_blank" rel="noreferrer noopener">3</a></sup>

Per ChatGPT:

“It is a platform for managing and deploying Docker containers, which provides features such as orchestration, scaling, and automation.”

## Why switch to Colima?

I found this [blog post](https://ddev.com/ddev-local/docker-desktop-and-colima-benchmarking-on-macos/)from the [DDEV](https://ddev.com/) maintainer, Randy Fay, where we can see that the performance gains of Colima over the Docker Desktop alternative are significant. Colima is an open-source tool.

## The recipe

Take a database backup, of your sites, so you can reimport them later.

Uninstall Docker Desktop following the steps at [https://docs.docker.com/desktop/uninstall/](https://docs.docker.com/desktop/uninstall/)

In the terminal, we will need to run the following commands:

`brew install docker` #This is needed only if docker is not already installed.

`brew install colima`

`colima start --cpu 4 --memory 6 --disk 100`

## Conclusions

I have been using [Colima](http://github.com/abiosoft/colima) for more than a week now, and working on web projects feels faster than when I used the docker desktop alternative. I have not had any issues so far, so I think that I will make Colima one of my favorite docker add-ons from now.

If you are wondering how it can be used with real PHP projects, I recommend looking at this [post](https://davidloor.com/2021/12/22/how-to-setup-a-wordpress-and-drupal-local-site-with-ddev/?swcfpc=1) where I explain how to use [DDEV](https://ddev.com/) for setting up WordPress and Drupal projects locally.
Cloud Computing to begginers
Tags: cloud, beginners
Published: 2023-02-04 18:51:46

## What is cloud computing?

Imagine you have a computer that you use at home. You have some files and programs stored on it and you can use them whenever you need to.

Now imagine you could access the same files and programs from any device with Internet access, like a library computer or a friend's laptop.

That's the basic idea behind cloud computing.

Instead of having your own computer at home with all your files and programs, you can access them from anywhere through the Internet.

That way, you don't have to worry about storage space, updates, or technical problems because all of that is taken care of by the company providing the cloud computing service.

Think of it as having a very big and powerful computer in the sky that you can use whenever you want!

## Big companies that use it

- Netflix
- Airbnb
- Spotify
- Dropbox
- Instagram
- Uber

Cloud computing made the existence of big companies possible because it allowed them to publish their ideas more easily and accessible.

Before the cloud, companies had to invest in complex servers. Now the process has been simplified and they only pay for what they use.

This means that companies can focus on their core businesses.

## Why learn Cloud Computing

Cloud computing is an amazing field full of opportunities for beginners! Imagine being able to work for one of those incredible big companies that use the cloud, or creating your own amazing services without having to pay a fortune.

This means you can focus on being creative and innovative, and use your imagination to create amazing things that will change the world.

Cloud computing is an incredibly exciting field, full of possibilities, and you can be a part of it!

## Famous Cloud Services

- Amazon Web Services (AWS)
- Microsoft Azure
- Google Cloud Platform (GCP)
- IBM Cloud
- Oracle Cloud


```
Did it help you? Like and Subscribe for more ^~
```
Thanks for reading! Keep on learning!

Fernando JS Silva
Top VS Code Extensions to Enhance Your Experience - February 2023
Tags: vscode, extension, webdev, programming
Published: 2023-02-04 18:45:04

As a software engineer, it's essential to have the right tools in your arsenal to make your work easier, faster and more efficient. Visual Studio Code, or VSCode, is a popular source-code editor that provides a lot of extensions that can boost your development productivity. In this blog post, we'll take a look at the top VSCode extensions that you can use in February 2023 to enhance your development experience.

1. Prettier
Prettier is a code formatter that automatically formats your code according to a set of rules. It saves you time and eliminates the need to manually format your code, which can be tedious and error-prone. With Prettier, you can rest assured that your code is consistently formatted, and it's easy to integrate with VSCode.

2. GitLens
GitLens is an extension that helps you visualize Git information and history, including blame annotations, code lens, and more. With GitLens, you can easily view Git information directly in your VSCode editor, without having to switch to the command-line interface. This extension is particularly useful for developers who use Git regularly.

3. Auto Close Tag
Auto Close Tag is an extension that automatically closes HTML tags for you. This extension is especially useful for web developers who use HTML frequently. With Auto Close Tag, you can focus on writing code and let the extension handle the tedious task of closing tags.

4. ES7 React/Redux/GraphQL/React-Native snippets
ES7 React/Redux/GraphQL/React-Native snippets is an extension that provides code snippets for React, Redux, GraphQL and React Native. With these code snippets, you can save time and effort, as you don't have to write code from scratch. This extension is particularly useful for developers who work with React, Redux, GraphQL and React Native.

5. Bracket Pair Colorizer
Bracket Pair Colorizer is an extension that color-codes matching brackets in your code. This makes it easier to identify which bracket matches with which, especially in large code files. With Bracket Pair Colorizer, you can save time and reduce the risk of errors caused by mismatched brackets.
Tailwind CSS senza Node.js
Tags: tailwindcss, css, webdev, tutorial
Published: 2023-02-04 18:39:52

## Installazione
Per usare TailwindCSS senza Node.js dobbiamo innanzitutto scaricarlo. In questo tutorial utilizzerò il package manager [Scoop](https://scoop.sh/):

```sh
scoop install tailwindcss
```

### Installazione senza Scoop
Se non volete utilizzare scoop potete scaricare Tailwind direttamente dalla loro [repo github](https://github.com/tailwindlabs/tailwindcss/releases). Scarichiamo il file, installiamolo e aggiungiamo il path dell'eseguibile alle variabili di sistema Windows. Così facendo possiamo chiamarlo ovunque senza doverci ricordare il path assoluto.

## Inizializzazione

Inizializziamo tailwind nel nostro progetto con il seguente comando:
```
tailwindcss init
```
Ora troveremo nel nostro progetto il file `tailwind.config.js`. Andiamolo a modificare inserendo in `content` i path dei file in cui tailwind dovrà ricercare le classi che inseriremo:
```javascript
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./src/**/*.{html,php}"],
  theme: {
    extend: {},
  },
  plugins: [],
}
```
In questo caso ho inserito tutte i file con estensione `.html` o `.php` presenti nelle cartelle figlie di `src`. 

## Creare il file di input CSS
Inserite nel vostro **main file css** le direttive che servono a Tailwind: 

```css
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
```
> In questo caso tailwind non funzionerà correttamente se userete `@tailwind` anziché `@import`

## Launch
Lanciamo tailwind con il seguente comando:

```sh
tailwindcss -i ./src/input.css -o ./src/output.css --watch
```
`-i` sta per input file e il path seguente punta al nostro main file css contenente le direttive aggiunte nel passaggio precedente. Invece `-o` sta per output e quello che segue è il path del file che tailwind andrà a creare o modificare ogni volta che inseriremo una classe. Invece `--watch` serve a indicare di monitorare le modifiche e di ricostruire il file output.css in caso di necessità.

## Conclusione
Non ci resta che installare l'estensione di tailwindcss per il nostro editor preferito in modo da avere l'autocomplete per le classi css.

---
Spero questa guida vi sia piaciuta , considera di mettere ❤️ al post e seguirmi sui miei social:

[Linkedin](https://www.linkedin.com/in/giandomenico-pagliara-699108179/)
[GitHub](https://github.com/PagliaraG)
Computação em Nuvem para Iniciantes
Tags: cloud, beginners
Published: 2023-02-04 18:31:08

## O que é computação em nuvem?

Imagine que você tem um computador que usa em casa. Você tem alguns arquivos e programas armazenados nele e pode usá-los sempre que precisar.

Agora imagine que você pudesse acessar os mesmos arquivos e programas a partir de qualquer dispositivo com acesso à Internet, como um computador de biblioteca ou um laptop de um amigo.

Essa é a ideia básica por trás da computação em nuvem.

Em vez de ter seu próprio computador em casa com todos os seus arquivos e programas, você pode acessá-los de qualquer lugar através da Internet.

Dessa forma, você não precisa se preocupar com espaço de armazenamento, atualizações ou problemas técnicos, porque tudo isso é cuidado pela empresa que fornece o serviço de computação em nuvem.

Pense nisso como ter um computador muito grande e poderoso no céu que você pode usar sempre que quiser!

## Grandes empresas que usam

- Netflix
- Airbnb
- Spotify
- Dropbox
- Instagram
- Uber

A computação em nuvem possibilitou a existência de grandes empresas porque permitiu que elas publiquem suas ideias de forma mais fácil e acessível.

Antes da nuvem, as empresas precisavam investir em servidores complexos. Agora o processo foi simplicado e pagam apenas pelo que usam.

Isso significa que as empresas podem se concentrar em seus negócios principais.

## Por que aprender Computação em Nuvem

A computação em nuvem é uma área incrível cheia de oportunidades para novatos! Imagine poder trabalhar para uma dessas grandes empresas incríveis que usam a nuvem, ou então criar seus próprios serviços incríveis sem precisar pagar uma fortuna.

Isso significa que você pode se concentrar em ser criativo e inovador, e usar sua imaginação para criar coisas incríveis que vão revolucionar o mundo.

A computação em nuvem é uma área incrivelmente emocionante, cheia de possibilidades, e você pode fazer parte disso!

## Serviços de Nuvem famosos

- Amazon Web Services (AWS)
- Microsoft Azure
- Google Cloud Platform (GCP)
- IBM Cloud
- Oracle Cloud

```
Ajudou você? Curta e se inscreva para mais ^~
```

Obrigado por ler! Continue aprendendo!

Fernando JS Silva
Starting out
Tags: discuss, question
Published: 2023-02-04 18:19:35

Hello,

I am only day 15 into learning coding and web development.  I’m in a bootcamp on Udemy.  Really good in depth.  I really wondered if anyone in the beginning had days of mental struggle and comprehension for what you were learning?  Or days of frustration and feeling like you weren’t going to get it.  ?  I am confident I will but I feel that creep in sometimes.
Coming Soon Website Using HTML CSS and JavaScript
Tags: html, css, javascript, tutorial
Published: 2023-02-04 18:17:13

Coming Soon Website Using HTML CSS and JavaScript | Countdown Timer in JavaScript

hey guys, we are going to learn How to make a responsive coming soon website from scratch with countdown timer. 

Inside there you will learn how to use html and css to design the complete page and also you will able to understand how to use JavaScript to display the count down timer.

After complete the particular time, then it will automatically stopped. hope this tutorial is helpful and beneficial for you.

thanks for watching the complete video.

{% embed https://www.youtube.com/watch?v=vnoOtZkCSbg %}
Hi There, Can you please help me , how to change a particular portion of an image. PFA images and help to write code.
Published: 2023-02-04 18:06:49


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tv2c6xyq6ptto97jrdzr.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jjjiubetz9sch2lijhul.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/97js1y6pbxmwulfndthg.png)
I’m on Team Good Commit Messages
Tags: git
Published: 2023-02-04 17:10:22

There has been [some](https://twitter.com/ashleyrudland/status/1615011065611358211?s=46&t=jNTGPBtNc0-zxZGl2dUW7Q) [debate](https://podcasts.apple.com/gb/podcast/yagni/id1637538064?i=1000584645049) on the value of good commit messages, and if we need them at all. 

I’m on team good commit messages for a few reasons. 

### Good commit messages act as a sanity check for my changes

I cannot count the number of times I’ve been writing out a commit message, thought to myself “this is a stupid way to do this”, binned it all off and started again. 

### Good commit messages help me prove to myself that I know what I’m doing

If you understand something, you can explain it simply. If you can’t explain it simply, you don’t understand it. A good commit message is a simple explanation of the change, and I like to try to understand the changes I’m making to the code.

### Good commit messages are integral to Git

Git is based on commits and commits have messages. Using Git effectively means working with commits, and commit messages the key to working with Git. It isn’t an intuitive tool, but it is a powerful one. Learning to use it efficiently is worth while, and good commit messages make working with Git easier.

### Good commit messages give context for code

I have a plug-in for my text editor that makes it easy to view the commit associated with a given line of code, and the commit messages of the lines around it. The unfortunately named `git blame` command can often give more context than a comment in the code that is more likely to be out of date, or a link to an issue or other URL that is similarly tired or even expired.

In my experience, the value of good commit messages really becomes apparent when everyone on the team takes the time to write them. This is easiest to achieve if it’s just you, but wonderful to see when the whole team “gets it”.

This isn’t to say that I _always_ write good commit messages. I don’t. Sometimes I have no idea what I’m doing, or I’m rushing a hot-fix into production, or a just can’t be bothered. I’m not a martyr. 

But, given the time and space, I’m on Team Good Commit Messages.