teleren/devto huggingface dataset:
Coding Bootcamp Tips: 5 Places Spending Time Will Drive Results
Tags: codenewbie, career, timemanagement
Published: 2020-07-20 03:32:20

Do you want to know where you should be allocating your time while you’re in a bootcamp?

I’m happy to share with you that spending time in the following five places will drive results. 

Let’s dig in.

The 5 Result Drivers
1. Ask Questions

The first place you need to make sure you’re spending time is asking for help. This can manifest in a lot of different ways.

You can ask your questions on StackOverflow.

You can ask your mentor or instructor for help with a problem.

You can ask your cohort and peers for help. Not only does this help them, but it will help you learn from what they might know.

2. Bootcamp Content

Spend your time in the bootcamp content. Whether video or text-based, make sure you are learning what’s required. 

It can be so easy to go down the rabbit hole and got lost in other content. Try to stick to what you need to learn for your bootcamp and bookmark the rest for later consumption.

3. Projects

Take that knowledge you have learned from the content and build something with it. It’s always a good idea to work on projects that can be in your portfolio.

4. Review

This always gets overlooked. 

If possible, dedicate time before you go to bed to review what you learned that day and to prepare for tomorrow.

Prepare on the weekends and review what you learned last week in preparation for what’s to come.

5. Teach

You don’t truly know something until you explain it. This step is critical but doesn’t work without the others in place. 

Improvements
There’s a process for everyone to learn coding, and it starts with you allotting time in these five buckets.

When you focus on the areas above, you’re going to see drastic changes in the results of what you’re outputting. 

Here are a few of the improvements you will see.

Increased productivity.
Increased quality and quantity of learning.
Reinforcement of your understanding.
Better awareness of what’s going on.
They can have the greatest impact on how you spend your time. Where you spend your time is where you’ll see results.

At times, some of these buckets may seem easy or obvious. But when you group them together, it becomes a truly effective and results-driven process.

I encourage you to start today!

Have questions? Want to share how your own tips? reach out to us at Coding Career Fastlan

As always, thanks for being here.

To see our accompanying video, click here: https://www.youtube.com/watch?v=kvffcpvFE1k
A new polite communication protocol
Tags: jokes, communicationprotocol
Published: 2020-07-20 03:31:05

I didn't know how polite Canadians are. I just realized that when I came to Canada, a couple years ago. And I liked that. But just wondering how could be a communication protocol following the same principles.

![Hand shaking](https://dev-to-uploads.s3.amazonaws.com/i/eon527crpm0gfi0n9mfn.png)

And also

![Error management](https://dev-to-uploads.s3.amazonaws.com/i/vyr768ww2dqzsvymtjy7.png)

Of course the system might get a bit slow - but at end of the day, much more polite.
Arrow Function: Basics
Tags: javascript, beginners, codenewbie, 100daysofcode
Published: 2020-07-20 03:29:31


## Introduction

Arrow functions introduced in ES6 is a concise way of creating functions compared to function expressions.

The name arrow function comes from the use of `=>`.

**Syntax**:

```javascript
const functionName = (arg1, arg2, ... argN) => {
    return value;
}
```

**Example**

```javascript
const multiply = (a, b) => {
    return a * b;
}

console.log(multiply(7, 8)); // 56
console.log(multiply(3, 2)); // 6
```

**Key Features**

* Arrow functions are anonymous function until they are assigned to a variable.
* If there is only 1 argument, we can skip parenthesis.
```javascript
   const square = x => {
       return x * x;
   }

   console.log(square(2)); // 4
   console.log(square(7)); // 49
   ```
The only caveat to this rule is that if the 1 argument is destructured.
```javascript
const foo = ({name = "New User"}) => name;

console.log(foo({})); // New User
console.log(foo({name: "Parwinder"})); // Parwinder
```
* If there are no arguments, we need to have the parenthesis
```javascript
   const greeting = () => {
       return "Hello World!";
   }

   console.log(greeting()); // Hello World!
   ```
* If the function body is an expression, it will return the expression, we can remove the brackets and the return keyword.
   ```javascript
   const greeting = () => "Hello World!";
   console.log(greeting()); // Hello World
   ```

Now that we know all these key features, let us rewrite the example to get the square of a number:

```javascript
const square = x => x * x;
console.log(square(4)); // 16
```
debug Dockerfile
Published: 2020-07-20 03:23:07

---
title: debug Dockerfile
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

```sh
# 1. find the target-container
docker ps -a

# 2. save it as an image with a name tag
docker commit [sha-of-the-target-container] debug

# 3. run it. (debug is named at last step)
docker run -rm -it debug /bin/bash
```
rsync - 10 examples in 11 days (Day 04)
Tags: linux, rsync, bash, tutorial
Published: 2020-07-20 03:22:55

# Day 04

> 10 examples in 11 days

## Backups

So far, we have been using **rsync** to sync files between folders. Today, I will talk about the **-b** option. The **b** stands for **--backup**. This option allows us to do backups of files at a different path than the destination folder.

But if we are copying/synching all files/directories, what are the backups for?

Long time ago, I was working in a big company and we needed to sync files across multiple machines and this was a bullet point on our to do list when synching between machines, since then I do this whenever I need to backup synched files.

The **--backup=DIR** specifies **rsync** to create a new folder and duplicates all files/directories into **DIR**, this directory will be created if it doesn't exist already. Somehow is like synching twice our files and/or folders, but when you want to have backups, is just awesome. Very useful when using synching to remote machines.

```
iamgroot@laptop:~$ rsync -ba --backup-dir=BACKUPS ~/Users/ ~/Sync
iamgroot@laptop:~$ ls -a ~/Sync/ && ls -a ~/Sync/BACKUPS/
.  ..  BACKUPS  file1.txt
.  ..  file1.txt
```

The _BACKUPS_ folder was created at destination and inside of it you have the same file as in ~/Sync. Obviosuly right now, we are just using the same destination folder, but it comes very useful to put the backups inside the backup disk or different directory. In order to do this, we must give **rsync** full paths, i.e.: `/home/iamgroot/`. Let's put the following scenario: we have our _/home/iamgroot/Sync_ folder as destination, but we want backups to be at `/home/iamgroot/backups/` then we can use this folder to store all our backups. Let's check it out

```
iamgroot@laptop:~$ rsync -bavh --backup-dir='/home/iamgroot/backups/'  ~/Users/  ~/Sync
sending incremental file list
./
file1.txt

sent 145 bytes  received 38 bytes  366.00 bytes/sec
total size is 17  speedup is 0.09

iamgroot@laptop:~$ ls backups/
file1.txt
```

Let me point out something. If we use `~/backups/` instead of `/home/iamgroot/backups/` it will create a folder inside our destination and it will be called `~/backups`. this means it takes the argument literally.

Getting back to what we did, you can see it worked perfectly, but we can make it even better by using the **--suffix=SUFFIX** option to add something at the end of our files, something like `file1.txt.backup`.

```
iamgroot@laptop:~$ rsync -bavh --backup-dir='/home/iamgroot/backups/' --suffix='.bak' ~/Users/  ~/Sync
sending incremental file list
./
file1.txt

sent 157 bytes  received 38 bytes  390.00 bytes/sec
total size is 29  speedup is 0.15

iamgroot@laptop:~$ ls -a ~/backups
 .   ..   file1.txt  file1.txt.bak
```

As you can see we have both files the one we backup earlier ended in .txt and the one we used with a suffix .backup

Cool right!!

---

Ok, that'll be for today's example, thanks for reading!!!

Follow, ❤ or 🦄
In a nutshell: Race Conditions
Tags: concurrency, racecondition, beginners
Published: 2020-07-20 03:02:35

---
title: In a nutshell: Race Conditions
published: true
description: concurrency, racecondition, beginner
tags: concurrency, racecondition, beginner
//cover_image: https://direct_url_to_image.jpg
---

**Race condition** is a term commonly used in scenarios where outcome is non-deterministic, as the outcome depends on the order in which relevant events occur. For example, in a concurrent program with non-synchronized threads trying to write to console, the order of console writes is non-deterministic. In short, it is a term used to represent an **non-deterministic outcome**.  

![Race Condition](https://dev-to-uploads.s3.amazonaws.com/i/rky10fyg6ejoavkmlrlm.png)  

**Data Races** are a type of race condition that arise when non-synchronized threads try to access and mutate a memory location.  

![Data Races](https://dev-to-uploads.s3.amazonaws.com/i/y9s3rgihi0qy78xjexrl.png)
Not in indian culture but i heard that getting job as a software developer or ML engineer
Tags: python, machinelearning, github, career
Published: 2020-07-20 02:37:37

It was 2019 when I decided to drop out from my automotive engineering stream to learn about python development and machine learning engineering skill......by having a little faith I may get job in such stream on the basis of the skill.
I really wanna know is it possible to get job not because I wanna survive.....but actually I wanna be a part of such community and working environment!!
If it's really possible and any of you wonderful people know about this.....please enlighten me with such process!!!
Download do pfSense Atualizado
Tags: pfsense
Published: 2020-10-22 01:22:14

---
title: Download do pfSense Atualizado
published: true
date: 2020-07-20 02:11:23 UTC
tags: pfSense
canonical_url: 
---

Netgate sempre esta disponibilizando novas versões atualizadas do pfSense e por segurança é recomendado manter sempre a última atualização instalada no seu [appliance firewall](https://www.idtecnologia.com.br).

Para quem já tem o pfSense instalado, basta clicar no obter update e ele automaticamente irá iniciar a atualização.

![](https://blog.idtecnologia.com.br/wp-content/uploads/2020/07/update-pfsense.jpg)

Mas e se você precisar fazer uma instalação do zero? É simples basta fazer download do pfsense direto do site da [Netgate](https://www.pfsense.org/download/)que é o desenvolvedor desse incrível sistema.

## Como fazer o download do pfSense?

Ao entrar no site [https://www.pfsense.org/download/](https://www.pfsense.org/download/), basta escolher a versão que melhor atende a sua necessidade.

![](https://blog.idtecnologia.com.br/wp-content/uploads/2020/07/selecione-download-pfsense.jpg)

Em architecture (arquitetura) você deve escolher a versão AMD64 (64-bit) caso você use processador AMD ou Intel. Agora se você tem o equipamento da própria netgate, você deve escolher Netgate ADI.

Logo abaixo você verá Mirror (espelho) que é da onde você vai fazer o download, sempre aconselho escolher o estado mais próximo de você.

## Instalando pfSense no Pen drive

Após realizar o download você pode gravar a imagem do pfSense no pen drive ou gravar em um CD-ROM (ISO). Mas o cd-rom esta ficando em desuso, então vamos usar o pen drive mesmo. A gravação é fácil, basta inserir o pen drive em seu computador e formatá-lo, mas lembre-se, você perdera todos os dados gravados, então não se esqueça de fazer backup.

### Gravando imagem no pendrive

Descompacte o arquivo que você fez download e após isso você pode usar um aplicativo chamado [Rufus](https://rufus.akeo.ie/) ou [Win32 Disk Imager](http://win32diskimager.sourceforge.net/), para gravar os dados no pendrive. Após finalizar basta desconectar o pendrive e usar!

Viu como é simples gravar o pfSense no seu pen drive e ter o melhor sistema de segurança do mundo? Espero que tenha gostado desse simples manual. Até breve!

O post [Download do pfSense Atualizado](https://blog.idtecnologia.com.br/download-do-pfsense-atualizado/) apareceu primeiro em [ID Tecnologia - Soluções em Segurança da Informação](https://blog.idtecnologia.com.br).
How to Make Kubectl Jsonpath Output On Separate Lines
Tags: todayisearched, kubernetes
Published: 2020-07-20 01:41:12

Getting `kubectl` to output [jsonpath](https://kubernetes.io/docs/reference/kubectl/jsonpath/) results on separate lines is something that I have to Google every time. 😖

For example, the following command extracts the `podIP` for every running `Pod` across all namespaces.

```console
kubectl get pods -A -o jsonpath='{.items[*].status.podIP}'
```

It returns something like the following:
```console
10.244.0.11 10.244.0.8 10.244.0.14 10.244.0.10 10.244.0.6 10.244.0.12 10.244.0.13 10.244.0.15 10.244.0.7 10.244.0.9 10.244.0.3 10.244.0.2 10.244.0.5 172.18.0.2 172.18.0.2 172.18.0.2 172.18.0.2 172.18.0.2 172.18.0.2 10.244.0.4
```

That's not the friendliest output to work with, that's for sure. 🙅‍♀️

## Adding New Lines
You can use the jsonpath `range` function to iterate over the list and tack on a new line after each element with `{\n}`.

```console
kubectl get pods -A -o jsonpath='{range .items[*]}{.status.podIP}{"\n"}{end}'
```

This outputs:
```console
10.244.0.11
10.244.0.8
10.244.0.14
10.244.0.10
10.244.0.6
10.244.0.12
10.244.0.13
10.244.0.15
10.244.0.7
10.244.0.9
10.244.0.3
10.244.0.2
10.244.0.5
172.18.0.2
172.18.0.2
172.18.0.2
172.18.0.2
172.18.0.2
172.18.0.2
10.244.0.4
```

Awesome! Now we can work with the output using all sorts of standard UNIX utilities that operate on new line (e.g. `sort`, `xargs`, `uniq`, etc.).

## Bonus

You can use other whitespace characters too. So imagine we wanted to print the `Pod` namespaces/names along with their IPs and separate them by a comma.

```console
$ kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"/"}{.metadata.name}{","}{.status.podIP}{"\n"}{end}'

default/fah-cpu-7c66fc7948-582sr,10.244.0.11
default/fah-cpu-7c66fc7948-c9xb5,10.244.0.8
default/fah-cpu-7c66fc7948-dlm5z,10.244.0.14
default/fah-cpu-7c66fc7948-g25cb,10.244.0.10
default/fah-cpu-7c66fc7948-g2svf,10.244.0.6
default/fah-cpu-7c66fc7948-hxmfn,10.244.0.12
default/fah-cpu-7c66fc7948-jxkp8,10.244.0.13
default/fah-cpu-7c66fc7948-n7rvt,10.244.0.15
default/fah-cpu-7c66fc7948-txvpg,10.244.0.7
default/fah-cpu-7c66fc7948-vzpbz,10.244.0.9
default/mando-57fff9d5f5-rdxrx,10.244.0.3
kube-system/coredns-66bff467f8-r9g25,10.244.0.2
kube-system/coredns-66bff467f8-xfd5k,10.244.0.5
kube-system/etcd-kind-control-plane,172.18.0.2
kube-system/kindnet-g6jvd,172.18.0.2
kube-system/kube-apiserver-kind-control-plane,172.18.0.2
kube-system/kube-controller-manager-kind-control-plane,172.18.0.2
kube-system/kube-proxy-9t7tt,172.18.0.2
kube-system/kube-scheduler-kind-control-plane,172.18.0.2
local-path-storage/local-path-provisioner-bd4bb6b75-zdv22,10.244.0.4
```

Outputting in jsonpath can be pretty handy!

Though I'll still have to look up how to do it everytime. 😌
Top 29 Developer Docs
Tags: webdev, docs, productivity, dx
Published: 2020-07-20 01:04:13

---
title: Top 29 Developer Docs
published: true
description: A list of the projects with the best developer documentation
tags: #webdev #docs #productivity #dx
---

Sorry for the clickbaity title. The long version should be: _"A list of the 29 most mentioned projects on two twitter threads (with 1066 replies) about great developer docs."_

These are the threads:

{% twitter 1257641015835611138 %}
{% twitter 1280949739534630919 %}

Don't expect rigorosity. The list is obviously biased in favor of the projects used by the audience of the threads. Also, Adam asked for open source projects.

The top 29 developer docs are:

1. [Vue.js](https://vuejs.org/v2/guide/)
1. [Laravel](https://laravel.com/docs/)
1. [Tailwind CSS](https://tailwindcss.com/docs/installation/)
1. [Stripe](https://stripe.com/docs)
1. [Next.js](https://nextjs.org/docs/getting-started)
1. [Django](https://docs.djangoproject.com/)
1. [Svelte](https://svelte.dev/)
1. [Gatsby](https://www.gatsbyjs.org/docs/)
1. [Rust](https://www.rust-lang.org/learn/get-started)
1. [React](https://reactjs.org/docs/getting-started.html)
1. [MDN](https://developer.mozilla.org/)
1. [FastAPI](https://fastapi.tiangolo.com/)
1. [Cypress](https://docs.cypress.io/)
1. [NuxtJS](https://nuxtjs.org/guide)
1. [Flutter](https://flutter.dev/docs)
1. [Elixir](https://hexdocs.pm/elixir/Kernel.html)
1. [Redux](https://redux.js.org/introduction/getting-started)
1. [AdonisJS](https://adonisjs.com/docs/)
1. [Symfony](https://symfony.com/doc/current/index.html)
1. [PostgreSQL](https://www.postgresql.org/docs/)
1. [Firebase](https://firebase.google.com/docs)
1. [Vuex](https://vuex.vuejs.org/)
1. [Redis](https://redis.io/documentation)
1. [React Hook Form](https://react-hook-form.com/)
1. [PHP](https://www.php.net/docs.php)
1. [Gridsome](https://gridsome.org/docs/)
1. [Ember](https://guides.emberjs.com/release/getting-started/)
1. [Chakra UI](https://chakra-ui.com/getting-started)
1. [Apollo](https://www.apollographql.com/docs/)

Shameless plug, I made this list because I'm working on [an open-source toolset for building dev docs](https://codehike.org/) (among other things), and I was looking for good practices and patterns.
Rich pull requests with gifs
Tags: github, workprocess, community
Published: 2020-07-20 00:47:28

Hello all, 

Here is a quick guide about how I offer a rich experience to reviewers and other community members in my pull requests using gifs previews.

## Preview of PR using gifs

![Preview of one of my last PR's](https://media.giphy.com/media/H1T3CBTCLLtZvToFR5/source.gif)

## Tools and websites

To use this technique you will need:

* A software to recorder your gifs, I suggest [Screen2gif](https://www.screentogif.com/) at Windows users and [Peek](https://github.com/phw/peek) to Linux users. 
 * I know Linux users like to have options [here are they. :D](https://itsfoss.com/best-gif-recorder-linux/).


## Work process to create, publish, and use the gif.

Know please follow these steps to create your gif (at windows):

1. Open the Screen2Gif
2. Pick the recorder option
3. Resize the recorder area as you need.
![recorder window](https://dev-to-uploads.s3.amazonaws.com/i/r2w8dfzvn2tkuvtzwqwt.png)
4. Start to the recorder (f7) and stop it when finish (f8)
5. The Screen2Gif will open the gif project editor
6. Now, you can go to the Playback section to run your gif or remove desired frames.
7. To save o export your gif go to the File Section and click on the Save button
8. Select your preferred format and hit save.
![ScresstoGif editor](https://dev-to-uploads.s3.amazonaws.com/i/jow141yllfdz4flpdxw8.png)
9. When the conversion process has done access the wire [gliphy.com](https://giphy.com/)
10. Press the Upload button, select your gif file and wait.
11. When the upload it is complete click on the media option and copy the link optimized to media social option.
![Step 11 sample](https://dev-to-uploads.s3.amazonaws.com/i/mls7gtcdfah70biwpbiu.png)
12. Know just use the link as you wish in you PR description there is he sintaxe template:
```html
 <img with="700px" src="YOUR-LINK" /> 
```

### Video Sample

Here is a short video to show my whole work process:

{% youtube -4tYUdpjHAM %}

#### Important to me ;)

If I help you please consider to leave comments, share it. 
Believe me, your feedback it's really important.
Day 49 : #100DaysofCode - Still Coding Along
Published: 2020-07-20 00:35:11

Today, I continued to work on my code-along with my bootcamp to duplicate a todo list from this <a href="http://todomvc.com/examples/vanillajs/">website.</a>

{% github SincerelyBrittany/todo-mvc-lv-codealong no-readme %}

I learned how to create a site controller. A site controller is perfect if you want a main page for your Ruby on Rails project. It is simple to create, first run the following code in your terminal: 

``rails g controller site index``

then add the following code to your ``config/routes.rb`` folder. 

```
root 'site#index'
```

Then edit your ``app/views/sites/index.html.erb`` with 'hello world' and visit <b> http://localhost:3000/ </b> in your browser.

You have now set up a site controller for your rails website. 

Okay so we have our main page set up, whats next?

The website allows people to be able to create lists. Then they should be able to add items to those lists. They should be able to navigate many lists and see each lists items.

So next step is to create lists that will be able to have items, which meant a model and controller is necessary for lists. 

The best generator for that is the resource generator. 

``rails generate resource list name``

That generated the following: 

```
invoke active_record create db/migrate/20200718235127_create_lists.rb create app/models/list.rb invoke test_unit create test/models/list_test.rb create test/fixtures/lists.yml invoke controller create app/controllers/lists_controller.rb invoke erb create app/views/lists invoke test_unit create test/controllers/lists_controller_test.rb invoke helper create app/helpers/lists_helper.rb invoke test_unit invoke assets invoke scss create app/assets/stylesheets/lists.scss invoke resource_route route resources :lists
```

In addition, it created the following List table in the db folder:

```
class CreateLists < ActiveRecord::Migration[6.0]
  def change
    create_table :lists do |t|
      t.string :name

      t.timestamps
    end
  end
end
```

The table looks correct so next run, ``rails db:migrate`` and then check run the console to make sure the database can be edited properly. 

Try this:

``rails c``
``List.create(:name => "FirstList")``
``List.all``

Great now we can update the ``config/routes.rb`` so that the main page will be able to see lists. Add the following code to the routes.rb

``resources :lists``

Now update your ``app/controllers/lists_controller.rb`` with the following method

```
def index
 @lists = List.all
end

```

and update your ``app/views/lists/index.html.erb``
```
<ul>
<% @lists.each do |list| %>
   <li>
    <div class="view">
     <label> <%= link_to list.name, list_path(list) %> </label>
     </div>
    </li>
    <% end %>
</ul>
```

Now visit <b> http://localhost:3000/lists </b> and you should be able to see all the lists.

Tomorrow I will give the steps for creating items for the lists. :)

Thanks for reading!

Sincerely, 
Brittany