teleren/devto huggingface dataset:
mastering git: the only essential commands you need to know to be a productive developer [pt 2] 🔥
Tags: git, programming, beginners, productivity
Published: 2023-02-12 02:27:47


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

### intro

this article is pt 2 of the mastering git series. see part 1 [here](https://dev.to/khemsok/mastering-git-the-only-essential-commands-you-need-to-know-to-be-a-productive-developer-pt-1-1pjd). in this article, we will expand on those commands and introduce 7 additional git commands that are useful to your workflow.

#### 8 - `git status`

this command displays the status of your local repository, including the changes that have been staged, changes that have been made but not stage, and untracked file.

``` bash
$ git status
```

#### 9 - `git diff`

this command displays the difference between two snapshots of your repository. you can use it to see the changes you've made in your local repository compared to the remote repository, changes between different branches, or changes between different commits.

``` bash
$ git diff HEAD # to compare the current branch with the latest commit

$ git diff branch1 branch2 # to compare two branches
```

#### 10 - `git fetch`

this command is used to retrieve changes from a remote repository, but it does not integrate them into your local repository. you can use it to see what changes have been made to a remote repository without affecting your local copy of the project.

``` bash
$ git fetch origin # to fetch changes from the "origin" remote repository
```

#### 11 - `git stash`

this command is used to save changes that haven't been committed or staged to a temporary location. this can be useful if you need to switch to a different branch without having to commit.

``` bash
$ git stash # to stash changes

$ git stash save "comment" # to save stash in the repository

$ git stash list # to list all stashes

$ git stash pop # to reapply previously stashed changes
```

#### 12 - `git merge`

this command allows you to combine changes from different branches into a single branch.

``` bash
$ git merge branch-name # to merge changes from a branch named "branch-name" into the current branch

$ git merge branch-name --squash # to merge changes from a branch named "branch-name" into the current branch without bringing in the commit
```

#### 13 - `git log`

this command displays a log of all of the commits in your git repository. you can use it to see the history of your project and find specific commits

``` bash
$ git log # to display the log of all commits

$ git log -5 # to display last 5 commits
```

#### 14 - `git rebase`

this command allows you to reapply a series of commits from one branch onto another branch. this is useful for reorganizing the history of a branch to make it more readable.

``` bash
$ git rebase origin main # to reapply the commits from the branch origin main onto the current branch

```


### conclusion

here are additional seven git commands that is essential to your git workflow. hope you guys find this useful. thx.
Check Website Headers
Tags: webdev, security
Published: 2023-02-12 02:06:41

From time to time you'll have to check http headers of your website for security compliance or to make a feature work.

Here's a handy tool to check your site headers.

https://securityheaders.com/?q=https%3A%2F%2Fdev.to%2F

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r0it1s2ee9x908xqnosf.png)
Use MinIO for AWS s3 Multipart Upload - Reference Implementation in Node.js
Tags: aws, s3, minio, node
Published: 2023-02-12 01:17:13

Don't recreate the wheel with a multipart upload. MinIO has got you covered. Use their client (you don't need to install the server, it is generic S3 compatible)

1 update the .env.example file to .env and provide your AWS creds with bucket name
2 npm install and npm start
3 navigate to localhost:3000 and upload a file

- check the repo for code and youtube for demo


- [blog](https://dev.to/bronifty/use-minio-for-aws-s3-multipart-upload-reference-implementation-in-nodejs-21h9)
- [youtube](https://youtu.be/yNd7OelQAb4)
- [github](https://github.com/bronifty/minio-aws-s3-multipart-upload)
The importance to have presence in the web
Published: 2023-02-12 01:12:25

When you start into the interesting world of the web development, it comes the greatest question. Now I have all the knowledge necessary (such as soft and hard skills), I have taken some interview and successfully built technical project and even so I have not bee hired. What do I need?

Then answer to this large question could be in (in the most of cases) to have more presence in the web. To achieve this, in the technology ambit this choices can give you the plus you need.

- **Create a Blog**: Create a space in which you can sharing your experiences, point of views, tutorials indicating how to get certain solutions in your day by day as a programer. These are some platforms can help you to build one, such as: [WordPress](https://wordpress.org/), [Blogger](https://www.blogger.com/about/), [Wix](https://es.wix.com/), [Squarespace](https://es.squarespace.com/) and the one I most recommend until today (Open Source) is [Ghost](https://ghost.org/).

- **Share in communities**: Share your ideas, answer questions in social media, blogs and /or channels of streaming (Discord for example) with the groups or users that are related with the topics (this case web development). In my case I use a lot Twitter and publish post on Dev.to.

These have been my suggestions about how to create your presence in the web, this way you will increase your possibilities to be elegible or taking yourself into consideration at the moment to be part of the selection process for you job wished
3-part series on creating a Docker Nginx image on an EC2 instance using Amazon ECS, ECR and Application Load Balancer
Tags: docker, ecs, ecr, loadbalancer
Published: 2023-02-12 00:30:30

For **better understanding and reading purposes**, I am linking all my previous 3 articles together with step-by-step instructions in this 3-part series, on how to create a Docker image, stored in the ECR Repository and how it is accessed from an Amazon ECS Cluster and the load balancer.

1st article - **[How to create a Docker Image with Nginx from an EC2 Instance and Push to ECR Repository](https://dev.to/aws-builders/how-to-create-a-docker-image-with-nginx-from-an-ec2-instance-and-push-to-ecr-repository-nkb)**

2nd article - **[Create Task Definition in ECS and Application Load balancer (ALB) for the Task which is to be run on Fargate Cluster](https://dev.to/aws-builders/create-task-definition-in-ecs-and-application-load-balancer-alb-for-the-task-which-is-to-be-run-on-fargate-cluster-566m)**

3rd article - **[Create Fargate Cluster and a Service which access Docker image with Nginx](https://dev.to/aws-builders/create-fargate-cluster-and-a-service-which-access-docker-image-with-nginx-gno)**

Please visit my **[GitHub Repository for Docker/ECS/ECR articles](https://github.com/awsmine/Docker_projects)** on various topics being updated on constant basis.
Comezando en el desarrollo de software y mantenerse motivado
Tags: beginners, webdev, javascript, programming
Published: 2023-02-11 23:54:33

Muchas veces cuando alguien comienza a aprender de programación por cuanta propia o los que ya tienen experiencia quieren aprender algo nuevo, siempre se empieza con alguna motivación que lamentablemente con el paso del tiempo la vamos perdiendo, y esto es normal, lo que si no puede ser normal es dejar que esa desmotivación se vuelva una constante, o aún peor, algo definitivo en nuestro ciclo de aprendizaje. Por esto quiero recomendar algunos tips que pueden ayudarnos a mantenernos motivados.

## Tener claro qué es lo queremos
Puede ser muy común cuando comenzamos a estudiar algo que no tenemos un norte definido, que solo lo estudiamos por que está siendo hype o trading ese tema, herramienta, librería, framework, etc, para este caso es importante saber que valor agregado nos brinda aprender ese tema, si nos puede ayudar a mejorar nuestro stack profesional, si lo podemos aplicar en corto o mediano plazo, o simplemente lo vamos a estudiar por gusto propio.

## Definir un alcance
Una vez que tengamos definido qué es lo que queremos, debemos revisar el alcance, es decir, comenzar poco a poco, desde lo mas básico e ir incrementando la complejidad. No es recomendable comenzar a estudiar algo que no tienes la mínima idea de que se trata y sin saber como podes abordarlo, esto puedo llevarnos muy rápido a la frustración y muy seguramente a renunciar al estudio del tema.

## Constancia y disciplina
Debemos tomar una rutina, que tengas definido los tiempos y espacios de dedicación a estudiar, esto nos ayudará muy seguramente a llegar a la meta del aprendizaje. Ir creando este hábito es muy esencial e importante en el desarrollo de software, porque en esta área se debe estar en constante actualización por las seguidas actualizaciones de las herramientas que útilizamos y por las nuevas que surgen, esto nos ayudará a estar vigentes en el mercado.

## Crear un grupo de estudio
Muy importante tener un grupo de amigos con los cuales puedas hablar, debatir y darse feedback, esto ayuda mucho al crecimiento y entre todos pueden brindarse apoyo y motivación.

## Unirse a las comunidades de software
En casi todas las ciudades existen comunidades de software las cuales son grupos de muchas personas que les gusta compartir conocimiento con altruismo, muchas de ellas son patrocinadas por grandes empresas, te invito a que investigues cuáles existen en tu ciudad.

## Subscribirse a canales en youtube
Hoy en día existen muchos canales en youtube en las cuales hay personas que explican y comparten conocimiento por medio de cursos gratuitos, clips, live coding, y ejemplos de proyectos que pueden servir para que comiences aprender y posteriormente crear tu portafolio.     

En próximos posts te recomendaré algunos recursos en los cuales aprenderás mucho y que te mantendrán motivado a seguir aprendiendo de este universo del desarrollo de software.

## Nos leemos pronto!!!
Working With Chakra
Tags: chakra, javascript, webdev
Published: 2023-02-11 22:39:54

This week I worked with Chakra in creating our repo's login and header's UI. It was fairly difficult working at the start, because I wasn't too sure as to what I'm suppose to be doing. It would have also been much more difficult if we didn't have a template to follow in terms of designing those two components.

### Difficulties ###

It was fairly difficult to create the website exactly as what the template has shown. A lot of the UI's are mere designs that are easy to make online, but fairly difficult to code. It took a bit when it comes to aligning the contents perfectly, or having a font size that doesn't cause you stress for not being the right size.

Another portion that I struggled with is my lack of understanding of how the back end works. Calling the user required me to ask for my peer's help, because I didn't quite understand how everything was going (shows my lack of experience/knowledge). 

### What I learned ###

What I learned from this week is that it's not a bad thing to ask for help when you really need too. A lot of your peers started from where you are right now, and they have met people whom had helped them get through difficult situations. Unless, you don't learn from the mistakes you make or the teachings you receive, then you shouldn't think you're a bother to people.
Bug fix and maintenance release 1.62 of perl-workflow
Tags: opensource, release, perl
Published: 2023-02-11 21:31:39

---
title: Bug fix and maintenance release 1.62 of perl-workflow
published: true
description: Bug fix and maintenance release of the Perl distribution Workflow
tags: opensource, release, perl
---
Today we released bug fix and maintenance release 1.62.

The bug was nothing big, it was an error in the documentation, but not the less an error. It has now been corrected - thanks to @ehuelsmann

For the maintenance part @ehuelsmann did all the heavy lifting of localizing `$EVAL_ERROR` in all the places where `eval` is used, which is quite a few. Actually around 32 if my command line foo is not completely off (which it might be).

```shell
ag -c "\s+eval\s+{" |sed -e 's/.*:\([[:digit:]]\)/\1/' | awk '{sum += $1} END {print sum}'
32
```

For the 2.x branch, we are using: [Syntax::Keyword::Try](https://metacpan.org/pod/Syntax::Keyword::Try), which does is a prettier solution.

From it's documentation:

```perl
use Syntax::Keyword::Try;
 
sub foo {
    try {
        attempt_a_thing();
        return "success";
    }
    catch ($e) {
        warn "It failed - $e";
        return "failure";
    }
}
```

Compared to a an `eval` contruct (based on the above example);

```perl
use English qw( -no_match_vars );

sub foo {

    local $EVAL_ERROR = undef;
    eval {
        attempt_a_thing();
        return "success";
    };

    if ($EVAL_ERROR) {
        warn "It failed - $EVAL_ERROR";
        return "failure";
    }
}
```

The above examples are untested and was just written here to support the description.

The examples could be simpler, but since we use [English](https://metacpan.org/pod/English), the provided example is more true to the Workflow code and the terms used in this post.

A few `eval` statements are still in the 2.x branch, these might be factored out eventually. For now these has also patched in the unreleased branch of the Workflow distribution via PR: [#212](https://github.com/jonasbn/perl-workflow/pull/212).

Here follows the change log of release 1.62.

## Change Log

## 1.62 2023-02-11 bug fix/maintenance release, update recommended

- Minor correction to documentation via PR [#208](https://github.com/jonasbn/perl-workflow/pull/208) from @ehuelsmann

- Improvement to the overall codebase by localizing `$EVAL_ERROR` in conjunction with `eval` structures, via PR [#211](https://github.com/jonasbn/perl-workflow/pull/211) from @ehuelsmann
A Step-by-Step Guide to Mastering Software Development
Tags: motivation, beginners, programming, tutorial
Published: 2023-02-11 21:17:29

Certainly, here is a comprehensive guide on how to learn software development:

Define your goals and choose a programming language: Before you start, you need to have a clear idea of what you want to achieve with your software development skills. Based on your goals, choose a programming language that is suitable for your needs. Some popular programming languages include Java, Python, JavaScript, C++, and others.

Get familiar with the basics: Start with learning the basics of programming concepts such as variables, data types, control structures, functions, and algorithms. You can use online resources such as Codecademy, Udemy, Coursera, and others to learn the basics.

Practice, practice, practice: The key to becoming a skilled software developer is practice. Try to build small projects on your own, and gradually increase the complexity of your projects. You can also participate in coding challenges or hackathons to improve your skills.

Read code written by others: One of the best ways to learn is by reading code written by others. Try to find open source projects that interest you, and read the code to understand how it works. You can also contribute to these projects to gain experience and improve your skills.

Use version control: Get familiar with version control systems such as Git. This will help you keep track of changes to your code and collaborate with others on projects.

Stay updated: The field of software development is constantly evolving, with new tools and technologies being introduced regularly. Stay updated with the latest developments by following industry blogs, attending conferences, and participating in online communities.

Collaborate with others: Collaborating with other software developers can help you learn new skills and gain a different perspective on problem-solving. You can join online communities, attend meetups, or work on projects with others.

Seek feedback: Regular feedback from other software developers can help you identify areas for improvement and make progress faster. Ask for feedback on your projects, and be open to constructive criticism.

In conclusion, learning software development requires dedication, patience, and a willingness to continuously improve. With the right resources, tools, and approach, anyone can become a skilled software developer.
Write promises chaining using async/await.
Tags: javascript, promise, asyncawait, asynchronous
Published: 2023-02-11 21:17:09

First of all, if you don't know anything about JavaScript promises, go through 👉 [JavaScript promises are simple](https://dev.to/ayanabilothman/javascript-promises-are-simple-3hfp) 👈 article and enjoy code writing using promises 🤗

`async` and `await` are JavaScript keywords that enable us to work with promises in a more simple way.

## async

If you define a function that returns a promise, and this promise will always only resolve, in this case, instead of constructing a promise, you can use `async` keyword before the function and directly return the resolved value.

**Let's clarify by an example** 👇

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

You can replace the second function with the first one. Using `async` keyword before the function will make this function return an implicit promise behind the scenes. The value you actually return from this function will act as if it is a result passed through hidden `resolve` function.

And in turns, we can use chaining on the returned promise.

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

**What about `await` keyword ?**

## await

`await` keyword is used instead of `then` function, which means we can let go of writing chains.

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

**Be careful about** 🤓

1. `await` keyword must be used before promises, you can't await for anything expect promise.

2. `await` keyword must be used inside a function with `async` keyword.

**Summary:** 

- `async` replaces constructing promises.
- `await` replaces `then`.
- `async` can be used alone, but `await` must be used inside `async` function.

Error handling of promises is a great topic. It will be clarified in another article, just wait for it 🔥.
Welcome (back?) - Boot camp T-minus 2 days
Tags: beginners
Published: 2023-02-11 21:14:27

I'll be starting a part-time bootcamp next Monday which focuses on full stack development. Ideally I'd like to work as either a full-time employee to start or have some other work to help supplement my current job as a translator and interpreter.

When I was an undergraduate, I started off as a computer science major, but ended up switching majors due to having trouble with calculus. Even though I've been happy with my current career, I always felt programming was something that I could do well, and after speaking with several friends who work as programmers and getting encouragement from them, I finally decided to take the plunge.

So far so good. The languages have certainly changed (C++ was a major focus when I was an undergraduate, and JavaScript seems to have a much more prominent place) and the delivery infrastructure has involved considerably (Git seems like such a powerful tool!) but I am looking forward to any challenges that may come. I'll try to post on a weekly basis to chronicle my progress.
introduction
Published: 2023-02-11 20:47:46

Hello there,

My name is Dalius Beck jr. feel free to call me Dallas, I much prefer that better. 

 I am studying to be a programmer and am learning python and I know of somewhat of the basics of it including some basics of html, css and javascript. I've felt like I should try to learn more programming again since I had to dropout of school during the pandemic and move somewhere else. 

 I felt like, I needed better for myself right now during this time to pick it back up instead of giving up on this passion I had for it since I went into college loving to pursue this.

If anyone stumbles upon this message, feel free to leave a comment and I hop you are all having a great day.
Login to VPS without a password using SSH
Tags: linux, ssh, vps
Published: 2023-02-11 20:30:51

---
title: Login to VPS without a password using SSH
published: true
description: It is possible to ssh into your Linux VPS without having to use a password.
tags: Linux, SSH, VPS
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuiuc0ht22zaqgbr724i.png
---

It is possible to ssh into your Linux VPS without having to use a password.

Here are the steps:

1. Create ssh key if you dont have one already
2. Add the public ssh to the remote servers `authorized_keys` list

> If you already have an ssh key skip to step 2

## 1 Create ssh key

Fire up the terminal and first go to your `.ssh` folder on your personal computer.

```bash
cd ~/.ssh
```

Then type (to create the ssh key)

```bash
ssh-keygen -t rsa -b 4096 -C "your@email.com" 
```

Follow the prompts

- push enter for each question to accept the defaults
- it will create a prive and public ssh key called `id_rsa` and `id_rsa.pub`
- do not enter a passwords

It will look like this:

```bash
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mannuel/.ssh/id_rsa): id_rsa_test
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in id_rsa
Your public key has been saved in id_rsa.pub
The key fingerprint is:
SHA256:52n1XC/4hSWgwC8gqK0Ld0ym/fb3BBXbhHypgmQFUHI your@email.com
The key's randomart image is:
+---[RSA 4096]----+
|      ooEo...... |
|   .   +o   o=o  |
|  . . .oo.  +o.  |
| o   . ..o.o..   |
|. . o   S =.. . o|
| . *     + + + =.|
|o o +     + o = o|
|.o . ..  ... . o |
|.    ..... .. .  |
+----[SHA256]-----+
```

## 2 Add key to `authorized_keys` list

```bash
 cat ~/.ssh/id_rsa.pub | ssh yourUsername@000.000.00.00 'cat >> ~/.ssh/authorized_keys'
```

you will be prompted to enter your VPS password given for `yourUsername`.

```bash
 cat ~/.ssh/id_rsa.pub | ssh yourUsername@000.000.00.00 'cat >> ~/.ssh/authorized_keys'
 yourUsername@000.000.00.00's password: 
```

Jobs done, you should be able to ssh into VPS without entering a password.

### Follow me

[Twitter](https://twitter.com/manidf)
[Website](https://mannuelferreira.com/posts)
iterator
Published: 2023-02-11 20:25:58

```rb 
5.times {|i| puts "I can handle this piece a sheet #{i}"}
```
```rb 
array = [1,2,3,4,5]

array.each { |e| puts "say hello #{e}" }
```
```rb
a = [:foo, 'bar', 2]

a.each { |element| puts "#{element.class} #{element}" }
```