teleren/devto huggingface dataset:
Instalando GIT en Windows
Tags: git, spanish, productivity, windows
Published: 2021-04-04 04:28:21


Git es una herramienta que nos ayuda a versionar nuestros desarrollos. En mi caso, me ayuda a guardar los avances de los cursos que estoy tomando o de las prácticas que realizo. También he notado que en las vacantes laborales que se publican, GIT es uno de los requisitos técnicos solicitados para poder tomar un empleo. 

Instalar GIT en WINDOWS es muy fácil, basta con seguir los siguientes pasos: 

Pasos para instalar GIT en Windows

1.- Dirígete a la página oficial de [GIT](https://git-scm.com/) y/o en su sección de [descargas](https://git-scm.com/downloads) haz click para descargar el instalador.
 ![Instalador](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s66ilmypzt6m9jymkbpa.jpg)

2.-Selecciona la carpeta donde guardar tu descarga y da click en guardar.
![Guardar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0hasrxxmf3ghqero6jc3.png)

3.-Acepta términos y condiciones; si no quieres complicarte la vida, a las demás ventanas de configuración deja sus valores por defecto, dale aceptar a todas y listo ya tienes GIT instalado.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgywcz23cu59ru1guf8d.png)

4.- Por último, dirígete a la ruta donde se ha instalado GIT, si has dejado los valores por defecto que te ofreció el instalador tendría que ser la siguiente:  C:\Program Files\Git 

En la carpeta de GIT, busca git-bash o git-cmd y dale click a esa opción, al hacerlo ejecutaras un programa el cual te permitirá poder escribir y ejecutar comandos de git.

![git-bash](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v8imdajuwgnsnl256k8n.png)
En este programa ejecutas el comando git version y listo… 
verificaras que ya cuentas con git para trabajar.
![git-bash-1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vqc5lylmvzx62zdbzrl6.png)

Para iniciarte en el aprendizaje de GIT puedes recurrir a su documentación oficial o en su defecto, buscar cursos gratuitos en You Tube. [Yo he tomado el del canal de Píldoras Informáticas](https://www.youtube.com/playlist?list=PLU8oAlHdN5BlyaPFiNQcV0xDqy0eR35aU) o puedes pagar en Udemy y tomar el curso de [Fernando Herrera](https://www.udemy.com/course/git-github/) el cual es un curso más completo que el anterior.

Espero que la descripción de los pasos que he utilizado para instalar GIT en Windows te puedan servir y con ello, inicies en el uso de esta herramienta la cual es muy útil.  

En caso de que mi explicación no te haya servido, puedes revisar la información que se pública en el siguiente [link](https://www.atlassian.com/es/git/tutorials/install-git) en el cual se comparte un tutorial de como instalar GIT no solo en Windows sino en otros sistemas operativos.

En un próximo post, te compartiré los comandos de GIT que considero son los básicos con los cuales te puedes iniciar en el uso de esta herramienta. 

¡Te dejo mis saludos y mis deseos de que coseches muchos conocimientos!
The brief intro to Recursive functions
Tags: webdev, javascript, codenewbie, programming
Published: 2021-04-04 04:02:36


In this post we're going to learn more about Recursive function in JavaScript. This post is specifically for the JavaScript newbies. 


### What is Function? 

A JavaScript function is a block of code designed to perform a particular task. A JavaScript function is executed when somewhere it is invoked. 

##### Working

```javascript
function new() { // declaring function 
   console.log('function invoked!'); 
}
new(); // function invoked
```

---

#### What is recursive function? 

A recursive function that calls itself until it doesn't. This technique is called recursion. 

##### Working

Here, `function new` is called in a loop like procedure. Initially it invokes from outside of the function and invoked inside the same function until the condition is false. A recursive function should always have condition to stop calling itself, otherwise, it will call itself infinitely. 

```javascript=
function new(condition = 1) {
    console.log('function invoked!'); 
    if (condition < 5) {
       new(condition + 1); 
    }
}
new(); 
// function invoked!
// function invoked!
// function invoked!
// function invoked!
// function invoked!
```

### So why recursive function? 

The act of a function calling itself, recursion is used to solve problem that contain smaller sub-problems. 

A recursive function can receive inputs:
- a base case or
- recursive case

### When to use recursive function? 

Recursive function is used when the same sequence of statements inside the function need to executed with different value and combined together to get final output. Places like sorting algorithms, factorial program, and so on. 

---

⚡Thanks For Reading | Happy Coding🤟
Important topics about c programming
Tags: c, programming, coding
Published: 2021-04-04 03:59:09

1) introduction of c language.
2) constant,variable & data type in c language.
3) Operators and Expression in c language
4) Managing Input & Output Operations.
5) Conditional Statements & Branching.
6) Looping.
7) Arrays.
8) Character Arrays and Strings.
9) User-Defined Function in c language.
10) Structures and Unions.
11) Pointers.
12) File Management in c language.
13) Dynamic Memory Allocation.
Handling outages gracefully
Published: 2021-04-04 03:42:47

Lately, my Spectrum internet has been on the fritz. I really can't tell why either. It will just cut out and cut back in again. I've seen this occurring almost like clockwork when I was working from home, and expect to see more of it in the upcoming future, as I'll be working from home again. It does have me thinking though about how we as developers have to handle the rare case that the user can't connect. 
Here are some ideas on what we can do as developers to help in the event that something goes down....

1. Service Workers. Writing progressive web apps, the service worker has been both a blessing and a nightmare. If configured improperly, expect none of your JS files to ever be upgraded or it to do nothing for you. That said, the ideal in at least my world right now is to use the Service worker to cache an instance of my Javascript, but always try for the latest. More info about service workers can be found [here](https://developers.google.com/web/fundamentals/primers/service-workers). 
2. Data caching. This can be client or server-side. Most data needs to come from somewhere. Many times it's either a SQL server or Web API. I am a huge fan of implementing caches on frequently called data. Especially on calls that will always return the same data. Implementing caches not only reduces the potential of a bad user experience in the event of a network outage but in many cases, can speed up the response time of your site.
3. Use a CDN. CDN's are like giant global internet caches. They help with response time by serving up data closer to the user and behave like a bit internet cache. As well many of them cost nothing or little to use. There can be downsides, like if a CDN acts up, but all in all, the pros to using one outweigh the cons.
4. Have a backup box. In the event of an outage, either have a fallback / secondary box to hit, or use a service like a load balencer if one machine acts up. In the case of my chatbot, if my box goes down, the code SHOULD fall back to Heroku (that said, there may be a bug or two in my logic on that... something I need to investigate)
5. Investigate based on your platform. Going to last year's virtual Mongo DB conference, I found they were putting a lot of time and effort into "local Mode", where in the event you can't connect to the DB, it keeps it local until you can. I'm sure other platforms either have their own or similar concepts you can use to help with this.  

I'm keeping this week's post a bit light, with the holiday going on (Happy Easter).Last note... Keep the mindset that while we live in a connected world, there are still dead zones. Let me know what you think, or if you have any additional recommendations on the topic
Actively looking For change the job as Software Developer Along with IOT Development in Pune / Bangalore Location
Published: 2021-04-04 03:12:08

Hello Dear Friends,

Experienced Software Developer along IOT Development with a demonstrated history of working in the legal services industry. Skilled in  out of 10
1. Core PHP / Codeniter PHP - 8/10
2. CSS / Bootstrap - 9/10
3. JavaScript - 8/10
4. Ajax - 7/10
5. Beginner API 5/10
6. Firebase / MySQL Database - 9/10
7. Computer Hardware Networking - 8/10
7. Python - 7/10
8. C / C++ -7/10
9. Practically Stronger in Electrical and electronic circuit and shouldering i.e. IOT Development -8/10
10. Experienced in implementation of Google business tool like Google analytics, tec. 9/10
11. Active in Research and Development in Technological Field -9/10

Strong engineering professional with a Diploma focused in Computer Engineering from Government Polytechnic College , Pune.
My JavaScript experience
Published: 2021-04-04 01:42:46

JavaScript is a unique language in the history of programming languages, it has never been a language that would return so much opportunity for a developer to master. You can find a job in almost any tech area with it, here I'll lay down the paths I took that worker the best for my environment.

FrontEnd(UI) 📱 : There are multiples libraries in JavaScript for making user interfaces. I started with Vue.js, but it didn't take me much time to switch to React.js, the reason behind this change was the market opportunity for React is bigger, and Next.js (a meta framework on top of React) makes you look so good with little effort, AND the biggest JS community for mobile native development is also written in React, React Native.

Backend 🛠 : I do backend serverless, which means I don't rent a server to write code in it, I just focus on my business logic and ship that code to AWS, then expose over a GraphQL API, with App Sync, and use other services to give full security to my apps, like Authentication, Object storages, etc. The key difference is that as I am a single developer for most of my projects, I get to delegate the maintenance of the servers to a company for a really good price, and I just get to write the code that makes the apps work.

Extra👽 : There's also worth the effort to do geeky stuff with the options in the language, recently the JavaScript ecosystem is going to a better and faster compile direction, and services like Svelte are great to keep an eye on, also Deno, an alternative to Node (our main language for backend in JavaScript).

Conclusion 🔚 : JavaScript is ultra-friendly, the language has evolved in something reliable, there are a lot of opportunities and you just have to choose in an area that you like the most to specialize, I would open up that for the last year I mainly focus on learning to ship fast and big codebases, so I focused a lot on services like GraphQL, Next.js and AWS to faster my development process, but I lacked expressiveness on UI, so I'm looking forward get better at my CSS animations and transitions, I just prioritized the other for a time as I mostly do the full-stack role.

full image
![banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdz5l6lq9olx859s5vpi.png)
Make an object from a 2D array of key-value pairs (bonus: it's a one-liner!)
Tags: javascript, es6, programming
Published: 2021-04-04 02:33:30

To make an object from a 2D array of key-value pairs in JavaScript, use the following pattern:
```
Object.fromEntries(new Map(arrOfKVPairs))
```

Example:

```
const groceryInventory = [
  ["apples", 10],
  ["bananas", 7],
  ["oranges", 3],
]

const inventoryObj = Object.fromEntries(new Map(groceryInventory))

console.log(inventoryObj)
// { apples: 10, bananas: 7, oranges: 3 }

```


Combine with named destructuring for easy object reference:

```
const groceryInventory = [
  ["apples", 10],
  ["bananas", 7],
  ["oranges", 3],
]

const { 
  apples: APPLES,
  bananas: BANANAS,
  oranges: ORANGES
} = Object.fromEntries(new Map(groceryInventory))

console.log(APPLES)
// 10

```
Why just blocking port 80 won't help you
Tags: security, webserver
Published: 2021-04-04 02:13:01

We know HTTP is insecure since across the web [IANA's assigned port list](https://letsencrypt.org/docs/allow-port-80/) is used by default which says port 80 should be used for HTTP traffic, but it's not that you cannot run anything else which is "non-standard" in port 80. 

Anyways, coming to point you could be running HTTP server on any port 80, 8080, 8090 whatever, HTTP protocol by design is left insecure. Since we cannot change the standard 80 usage everywhere (IPv6 is still on way even after decades) there are multiple remediations that can be used to avoid common challenges with HTTP. 
1. Instead of serving anything on port 80/HTTP, use it solely for redirecting to correct HTTPs/443. As recommended by [cio.gov](https://https.cio.gov/guide/), [letsencrypt](https://letsencrypt.org/docs/allow-port-80/) 
2. Enforce HSTS Policy on your domain,  by nature it will be effective only when your domain is access by the client once. if you don't know what HSTS is, it is just a HTTP header that tells browser to always open website in HTTPS.
3. Blocking or disabling doesn't make your server any secure, in fact it makes things worse. 
  1. There is still an open opportunity of MITM attack. The flaw is in protocol not in the implementation of HTTP, which is why anyone can sniff and serve you alternate content, even if you have port blocked in server.
  2. You will make things worse for your users, they won't be able to access your website as normally they would.
  3. if you serve HSTS headers over HTTP, at least HSTS will be enforced on one hand. 
  4. Everywhere you have to type HTTPS, which people don't do, it is a painful thing to enforce. 
4. It is not about 80, it is more about not using HTTP anywhere, if you have other ports that serve content over HTTP it is still an issue!

In coming release chrome will fallback to HTTPs which can make few cases obsolete but for dev's it's still valid.

What are your thoughts ?
What Are Nodes? — Nodes In a Nutshell
Tags: technology, masternodes, blockchain, cryptocurrency
Published: 2021-04-12 21:42:16

---
title: What Are Nodes? — Nodes In a Nutshell
published: true
date: 2021-04-04 01:38:19 UTC
tags: technology,masternodes,blockchain,cryptocurrency
canonical_url: https://medium.com/coinmonks/what-are-nodes-nodes-in-a-nutshell-f5d567bc9662
---

[![](https://cdn-images-1.medium.com/max/800/0*hKfLD4G5cLfuNAwF.jpg)](https://medium.com/coinmonks/what-are-nodes-nodes-in-a-nutshell-f5d567bc9662?source=rss----721b17443fd5---4)

Any virtual network consists of a set of nodes that are interconnected. They perform various tasks and thus contribute to the achievement…

[Continue reading on Coinmonks »](https://medium.com/coinmonks/what-are-nodes-nodes-in-a-nutshell-f5d567bc9662?source=rss----721b17443fd5---4)
Get SSL Cert At Let's Encrypt
Tags: dart, dartlang, certbot, letsencrypt
Published: 2021-04-04 00:16:24

In [the previous document](https://dev.to/kyorohiro/httpserver-systemd-with-dart-1mgl) I created an Http Server without SSL.

In this time, I explain to how to get ssl cert from let's encrypt. 


## Install certbot

I used certbot to communicate Let'sEncrypt.

```
$ apt-get install certbot -y
```

## HttpServer For Certbot


Certbot's generate a file for acme-challege under '${WebRoot}/.well-known/acme-challenge/' folder.

and get request 'http://${HOST}/.well-known/acme-challenge/xxx'

- bin/main.dart

Write a Code at Dart.

```dart
import 'dart:io' as io;

const String cerbotWebRootPath = "/var/www/html";

void main(List<String> arguments) async {
  try {
    print("start bind");
    var httpServer = await io.HttpServer.bind("0.0.0.0", 80);
    print("binded");
    await for (var request in httpServer) {
      try {
        print("receive requested ${request.uri}");
        if (request.uri.path.startsWith("/.well-known/")) {
          var acmeChallengeFilePath = "" +
              cerbotWebRootPath +
              request.uri.path.replaceAll(RegExp("\\?.*"), "");
          acmeChallengeFilePath = acmeChallengeFilePath.replaceAll("/..", "/");
          var acmeChallengeFile = io.File(acmeChallengeFilePath);
          var acmeChallengeData = await acmeChallengeFile.readAsString();
          request.response.write(acmeChallengeData);
          request.response.close();
        }
        request.response.write("Hello");
        request.response.close();
      } catch (e, s) {
        print("${e}");
        print("${s}");
      }
    }
  } catch (e, s) {
    print("${e}");
    print("${s}");
  }
}
```

update server

```
$ dart2native ./bin/main.dart
$ mv bin/main.exe /opt/main.exe
$ systemctl restart darthelloserver 
```

and, execute certbot at webroot mode

```
$ certbot certonly --webroot -w /var/www/html -d tetorica.net -m kyorohiro@gmail.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for tetorica.net
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/tetorica.net/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/tetorica.net/privkey.pem
   Your cert will expire on 2021-07-02. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le
```


## all code 

https://github.com/kyorohiro/hao_dart_server_and_systemd/tree/dev02
BUILD FAILED (OS X 11.2.3 using python-build 20180424)

Inspect or clean up the working tree ...
Published: 2021-04-04 00:10:35

I keep getting this error message after providing CFLAGS from the xcode. Can someone please help with this issue?  Note other post: https://dev.to/digitaldisorder/penv-install-fails-on-macos-11-bigsur-4a13

   #python #pyenv
How to get the operating system's current user id using Node.js?
Tags: node
Published: 2021-04-04 00:00:00

---
  title: How to get the operating system's current user id using Node.js?
  published: true
  tags: Nodejs
  date: Sun Apr 04 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/get-operating-system-current-userid-nodejs
  cover_image: https://melvingeorge.me/_next/static/images/main-8a8a9f6aced7f1a62a540401138170ad.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/get-operating-system-current-userid-nodejs)
  
To get the OS current user id or (`uid`) in Node.js, you can use the `userInfo()` method from the `os` module and then use the `uid` property from the object returned.

```js
// require os module
const os = require("os");

// invoke userInfo() method
const userInfo = os.userInfo();

// get uid property
// from the userInfo object
const uid = userInfo.uid;

console.log(uid); // 20
```

See the above code live in [repl.it](https://replit.com/@melvin2016/get-the-current-user-id-using-nodejs).

That's all! 😃

### Feel free to share if you found this useful 😃.

---
Pull requests aren't about mistrust
Tags: trust, productivity, github, discuss
Published: 2021-04-07 16:03:18

---
title: Pull requests aren't about mistrust
published: true
date: 2021-04-04 00:00:00 UTC
tags: trust, productivity, github, discuss
canonical_url: https://jhall.io/archive/2021/04/04/pull-requests-arent-about-mistrust/
---

Lately I’ve seen several people reacting against the idea of pull requests, on the basis that pull requests are a mechanism to safeguard against untrusted code. Consider this post from LinkedIn:

![PRs about “distrust”](https://jhall.io/archive/images/prs-distrust-linkedin.png)

> [Pull requsts are] about distrust. Apparently people don’t trust their team mates to do the right (enough) thing.

A similar sentiment can be found in Kief Morris’s article [Why your team doesn’t need to use pull requests](https://infrastructure-as-code.com/book/2021/01/02/pull-requests.html).

I’m willing to accept as granted that pull requests _can_ be useful in low-trust situations, such as vetting code changes from a stranger on the Internet.

But the apparently widely-accepted view that PRs are _only_ useful in low-trust situations just baffles me. Perhaps this is a reaction against abusive PR reviews, which are a serious problem on some projects. PRs should never be used as an opportunity to berate people with less experience or different opinions. PRs should be used in a “trust but verify” mindset.

I find pull requests so beneficial that [I use them on solo projects](https://jhall.io/posts/solo-code-review/). I think it’s hard to make the case that I do this out of a lack of self-trust.

So why do I advocate the use of pull requests, even in high-trust situations? Here are a few:

1. A fresh set of eyes (or in the case of a solo project, a fresh view) often catches small oversights. And the best of us always have small oversights.
2. It’s a great mentoring opportunity. I’ve learned a ton about how to improve my code from code reviews, even when my original code would have worked as intended.
3. It helps reduce the bus factor. On a team project, there is immense value to be had in two (or more) people understanding all code.
4. More readable code. Code that works is often unintuitive. Getting someone else to simply say “WTF?” can be enough to trigger a refactor for better readability.

Are these about mistrust? I don’t think so. Although if I want to play the Devil’s advocate, I could say that I mistrust myself, and I mistrust human nature. If that’s the mistrust I use PRs to overcome, then okay, I’d be willing to say that PRs are about mistrust. But that level of mistrust is healthy, in my opinion. We can trust our peer’s motivations, and still verify their code.
Showcasing my personal website
Published: 2021-04-03 23:22:49

---
title: Showcasing my personal website
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

Before actually building my website , I took about 3 weeks thinking about a new design concept , and then a single week to make a quick design for it.

I divided the page design into 2 sides (left and right side)

the left side is fixed (it includes my basic info and the navigation utils)

the right side is dynamic (it displays the content for the current navigation page)

I preferred to use programming symbols and expressions inside it , to express my software development job.

That's why , I put a CLI to navigate with it and used HTML-like tags in the titles , also based on my UX friend suggestion , I put a normal navigation buttons , so the non-tech visitors can navigate easily in the website instead of using this CLI.

I used collection of different UI colors , each section has its own unique color.

The website helped me in promoting my professional experiences for the companies and the potential customers.

Take a look and share your feedback
https://ahmedeveloper.com

You can also share your own website , will tell you my feedback.