teleren/devto huggingface dataset:
I made a Node.JS CLI that splits and shows a text on console, just that~
Tags: node, terminal, showdev
Published: 2021-01-04 00:55:49

[inquirer]: https://www.npmjs.com/package/inquirer
[replit]: https://repl.it/@JezerM/Paginator-test
[paginator]: https://www.npmjs.com/package/cl-paginator
[ghPag]: https://github.com/JezerM/Paginator
[exampleVid]: https://user-images.githubusercontent.com/59768785/103492798-15056980-4df3-11eb-8cb4-d174f8e03cd0.gif

When I was making a simple Node.JS console game, I thought I would need something that prints your text in the console without looking awkward when it surpass the console width, and without the need to use the mouse wheel to move up and down in the text.
I found **[Inquirer.js][inquirer]**, an amazing package that allows pretty and useful command line applications. And, despite Inquirer doesn’t have the feature I wanted (though you could use the *editor* type; but looks weird to me), I got inspired by its **Paginator** util used in its *list* type prompts, so I decided to make something similar to it.
I made the **Cl-Paginator** package. It splits the text to fit in the terminal and then prints it, allowing the user to move around the text, a-waiting for the user interaction to continue the code.
Here’s an example:
```ts
import { Paginator } from “cl-paginator”

var pag = new Paginator()
await pag.print(“Hello world” /* or a bigger text */, /* and some options */)

// This won’t continue until the user presses the “return” key

console.log(“Finished!”)
```

![exampleVid]

### Wanna try it?
See **[Cl-Paginator on npm][paginator]**, and **[Github][ghPag]**

```bash
npm install cl-paginator
```
{% replit @JezerM/Paginator-test %}


> It's my first time writing a post here! Also my first time creating an NPM package~
Web 3.0: Personalization and Identity Crisis
Tags: discuss, architecture, datascience, computerscience
Published: 2021-01-04 00:53:40

Web 3.0 is an internet concept describing the third generation of internet majorly characterized by data and identity control otherwise known as personalization using technologies such as semantic web, blockchain, decentralization, and other amazing stuff lol. 

Web 3.0 promises to give you an identity. This is the scary part to me.

We already see some of these implementations of Web 3.0 with intelligent, distributed, and semantic search engines and we are gravitating steadily.

To most of these search engines, you are your posts. You are your comments. Your beliefs are what you share. You are your selfies. Your families are those you took pictures with. Your friends are those who like your comments while enemies are those who dislike your comments. Many of these implementations would judge you with your past. Your past searches. Your past location. Your past internet activity. In fact, many of them judge you based on what other people similar to you are to them. It’s a web of assumptions and hypotheses. A scientific and experimental modeling of your identity. 

Well, but come on… that is just your web identity. And you may say it’s completely separate from your offline identity. But just like Multiple Personality Disorder, the problem lies when these personalities conflict. And then you ask yourself….

Who am I?

Who the hell are you really?

Are you your past? Are you people who these intelligent search engines for instance think are similar to you?

Who the hell are you really?

Who?!!!!!!

You are who you are, really.

That is... True personalization should be one that should allow you to define the metrics for identification. 

But then again, there is the bias of you-to-you to paint yourself the way you want people to see you. 

So if a scientific and experimental model is not saying who you are and defining your metrics to be judge also don’t reveal the true you, how then do we model and build better-personalized systems and prepare for a broader world of Web 3.0 void of identity crisis?
Instalação do GitHub Desktop para Windows
Tags: git, github, windows, desktop
Published: 2021-01-04 00:16:48

Algumas pessoas se sentem desconfortáveis com a linha de comando. E está tudo bem com isso. Já avançamos muito na computação, não apenas para tornar o ambiente mais agradável para a usuária, como também para a desenvolvedora. Por isso, para quem faz uso do GitHub como plataforma de repositório remoto, temos um **GitHub Desktop** que vem com a proposta de ser uma versão mais amigável de integração do Git e GitHub.

Para baixar o Github Desktop acesse o [site oficial](https://desktop.github.com/).

![site do github desktop](https://dev-to-uploads.s3.amazonaws.com/i/hydruwzdv0ytgvz7ontn.png)

E clique no botão indicado na imagem. O **download** começará em seguida.

Após baixar o **instalador** execute-o para **começar a instalação**.

![instalador do github desktop](https://dev-to-uploads.s3.amazonaws.com/i/pk4qn1ztppcskk5stux6.png)

Será mostrado a seguinte imagem por alguns segundos

![tela splash](https://dev-to-uploads.s3.amazonaws.com/i/w1m18agx9c66fcb8cpx3.png)

E em seguida a tela para que você faça o **login** com a **sua conta do GitHub**.

![sign in](https://dev-to-uploads.s3.amazonaws.com/i/m6wjus9o1zik3k94vlym.png)

Caso você decida **não** fazer o login

![pulando a parte de login](https://dev-to-uploads.s3.amazonaws.com/i/xk7zprd9n4ihqb8eg0ec.png)

ele irá para a tela de **configuração do Git**, que você deve preencher com seu nome e email.

![configuração do git](https://dev-to-uploads.s3.amazonaws.com/i/wzhkn9wmagdzkarzuyf4.png)

Isso é importante para que seja **registrado** cada commit e modificações feitas nas **pastas e arquivos rastreados** pelo Git. Entretanto, desse modo, **não é possível** fazer uso do repositótio remoto **GitHub**. Todo versionamento será apenas local (na sua máquina).

Como queremos fazer a integração com o GitHub, vamos clicar para fazer o login.

![sign in](https://dev-to-uploads.s3.amazonaws.com/i/m6wjus9o1zik3k94vlym.png)

Seremos redirecionadas ao site para preencher com o **nome de usuário e senha** da nossa conta.

![user e senha](https://dev-to-uploads.s3.amazonaws.com/i/lxwjxdq6nibbanssiphh.png)

E será pedido a **autorização** do acesso a sua conta do GitHub.

![autorização do github](https://dev-to-uploads.s3.amazonaws.com/i/oj3ypccq9t4taythir00.png)

Dada a autorização, o navegador pedirá a permissão para abrir o **GitHub Desktop**.

![site tentando abrir o github desktop](https://dev-to-uploads.s3.amazonaws.com/i/i0o7mtswc4pim4rjtc6k.png)

Só então iremos para a parte de **configuração do Git**.

![configuração do git](https://dev-to-uploads.s3.amazonaws.com/i/u4tveo6rv06eh3bpv5gp.png)

Feita a configuração, chegamos a finalização do processo de instalação.

![finalizando a instalação](https://dev-to-uploads.s3.amazonaws.com/i/yt900u1e5rhoc4vut76l.png)

Agora o **GitHub Desktop** está pronto para uso.

![tela inicial do github desktop](https://dev-to-uploads.s3.amazonaws.com/i/colhnubwe0af648wl64r.png)
TIL: Your DNS has a significant impact on site speed.
Tags: webperf, zzz, dns
Published: 2021-01-03 17:50:28

I've started compiling a list of website performance optimizations. So for every decision made while building a site you can include performance in the decision making process. (I'll eventually make the full list a fun public thing.)

Choosing a `domain name` and where it's hosted is often one of the first decisions we make when building a website.

**So, does the company your `domain name` is registered with have an impact on site speed?** yep.

## What are DNS and nameservers?

### DNS

`DNS` is short for `Domain Name System`. Every web host has a unique `ip address`, a series of numbers that identify it. (actually they usually have lots of them).

`ip addresses` are how web browsers communicate with servers. 

These numbers are not human friendly, and can change. So instead we use `DNS` to convert `domain names` to `ip addresses.` e.g. `example.com` ▸ `93.184.216.34`

### Nameserver

A `nameserver` is the service used to find the `ip address` for a given `domain name`. By default the `nameserver` for your domain is the domain name provider your bought it from. e.g. namecheap or godaddy. **But it can be changed.**

We usually don't have to think about this part of web development, and it's extremely boring. However, it does have an impact on performance.

## How to check your nameserver speed?

You can compare the perfomance of different `nameservers` using [dnsperf.com](https://www.dnsperf.com/).

## Is this worth thinking about?

The difference in `nameservers` speed is in the milliecond range. **Choosing `nameservers` for speed could save around `50ms` on your initial load time.**

**Once a device has visited your site it will cache the `ip address`** and won't need to query the `nameserver` again. Not anytime soon anyway.

Is saving `50ms` on initial requests to your site worth thinking about? I think so. **Twenty similar optimizations and you've shaved off `1 second`.** That's definitly worth it.
How to open a link in a new tab using HTML?
Tags: html
Published: 2021-01-04 00:00:00

---
  title: How to open a link in a new tab using HTML?
  published: true
  tags: HTML5
  date: Mon Jan 04 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/open-link-in-new-tab-html
  cover_image: https://melvingeorge.me/_next/static/images/main-863d44105e73f24702874c9e54939704.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/open-link-in-new-tab-html)
  
To open a link in a new tab you can use the `target` attribute on an anchor tag and set its value to `__blank`.

For example, consider an anchor tag like this,

```html
<a href="https://google.com">Google</a>
```

Currently, if you click on this anchor tag it will open on the same page itself, which is the normal behavior of an anchor tag.

Now let's add the `target="__blank"` attribute to this anchor tag so that it will open the link in a new tab when the user clicks on it.

```html
<a href="https://google.com" target="__blank">Google</a>
```

That's it 🌟.

See this example live in [JSBin](https://jsbin.com/ditabuviri/2/edit?html,output).

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

---
Joining OpenLoop 🎉
Published: 2021-01-04 00:00:00

---
title: Joining OpenLoop 🎉
date: '2021-01-04'
published: true
---

> originally posted [on my blog](https://darkhist.me/blog)  

So excited to share that I'm joining the bright people [@openloop](https://twitter.com@openloophealth) to help connect medical professionals to hospitals

Looking forward to making, breaking, and learning new things

Happy New Year / Be Well

darkhist
Rails DB Schema Visualization
Tags: rails, database
Published: 2021-01-03 23:21:56

Looking at the `schema.rb` file inside a rails application is a great way to get a sense of the layout of the application. It's a nice one stop shop for finding out about the models and the attributes of those models that the application is modeled with, however sometimes it can still be a bit daunting to make sense of it all.

If only there was a way to see how everything was connected!

While there are schema design tools out there that allow you to write out the SQL to create and get a visual layout of the database schema, it requires you to write it all out by hand and more often than not it is in a slightly different syntax than actual SQL. 

Remembering the syntax for languages is difficult enough, so why add yet another to the pile? 

Just when it seems all hope is lost, a helping hand has come to the rescue!

[dbdiagram](https://dbdiagram.io/d) has added in support for importing you rails schema and turning it into the required syntax for their program and thus printing out a beautiful representation of your applications database which can then be exported and shared with your team.

To make this happen simply visit [dbdiagram](https://dbdiagram.io/d), click the import button in the top of the window, select the import from Rails(schema.rb) option from the drop down:
![dbdiagram window screenshot](https://dev-to-uploads.s3.amazonaws.com/i/nflxxmivws0nqbrahnxk.png)

This will open up a window in which the contents of the applications `schema.rb` file can be uploaded by clicking the upload schema.rb button in the top right of the window. You can then navigate to the location on your machine where the application lives and get to its `schema.rb` file and click open once you have the `schema.rb` selected. Once you click open you should see the contents of the applications schema file appear in dbdiagram's window:
![dbdiagram window screenshot](https://dev-to-uploads.s3.amazonaws.com/i/oiqqfxtvpb9pgqzi5r4x.png)

Next, click the submit button at the bottom and then you will see the applications schema nicely laid out for you which can then be moved around the page by clicking and dragging the tables around to allow for even further readability:
![dbdiagram window screenshot](https://dev-to-uploads.s3.amazonaws.com/i/2f5almbiftij5znnf5zn.png)


Happy Rubying!
Disconnect from your Azure account when inactive
Tags: azure, security, cloud
Published: 2021-01-03 23:11:58

---
title: Disconnect from your Azure account when inactive
published: true
description: How to fill a little oversight that might compromise the security of your Azure environment. 
tags: azure, security, cloud
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/4wwgltfyx9ux2qwiu31n.jpg
---

In my previous posts and talks, I've shown you various techniques to strengten the security of your Azure environment.

However, there is one little thing that if we are not careful about, could compromise the security of our Azure environment. That little thing might be so obvious that it's often forgotten. That little thing is to **disconnect from our Azure account when we're not using it.**

You've may noticed that when you go back to your workstation after few hours (or few days?), and navigate to the Azure portal, you're still logged in to your account. Can you imagine what would happen if someone used your workstation while you were away? If you only have `Reader` permissions, then no big deal. But imagine if you have administrative permissions (e.g. `Contributor` or `Owner`)! That could be harmful.


Fortunately, there's a little hidden gem in the Azure portal that lets you automatically be disconnected from your account after a given period of time of inactivity.

To configure it, simply do this:

![sign out when inactive](https://dev-to-uploads.s3.amazonaws.com/i/wsqpnnlhd8kxy2ermdhi.png)

To be honest, I'm wondering why this feature isn't enabled by default!

# In conclusion...
Today, we have done one more step toward a more secured Azure environment by leveraging a hidden gem in the Azure portal.

# Let's keep in touch
You can reach me on [Twitter](https://twitter.com/tidjani_b) or [LinkedIn](https://ca.linkedin.com/in/tidjani-belmansour-ph-d-98460912).

See you soon !
Noise and sound
Tags: react, ios
Published: 2021-01-03 23:08:18

What is the purpose of language constructs and software architectures in software development? The answer, in my opinion, is **to bring more sound and less noise.**

From my viewpoint, developers can make sound or noise. The **sound** is the code we write that actually makes sense at a glance. You read the code, and it's like somebody is talking to you, telling you a story, or a fact. 

In other cases, the code is just boilerplate that supports the actual functionality that is in other places. I consider this to be **noise**.

The React Context is a great example on how to make more sound and reduce noise in a codebase. 

To be brief for those who don't know React, React components are software components that are responsible of transforming a piece of state into a view description. You can use React components to compose even bigger components by placing them into trees of components. So that, one component may have other components as children, which in turn may have other components as children. 

![NoiseSound-01](https://dev-to-uploads.s3.amazonaws.com/i/im3d00r8pvvtadpgtweb.png) 

The problem we had back then was that some components in the top levels needed to send information and be notified of events that happened in the lowest levels. To support that, the components in the intermediate levels needed to get the data from the top level and bring it to the lower level, even when that data wasn't needed for the intermediate components to work. That was clearly **noise**.

![NoiseSound-02](https://dev-to-uploads.s3.amazonaws.com/i/qn3bnicxqe9yzpeltqyy.png) 

A great solution came when React started to officially support (out of beta) **React Context.** React Context is basically a data container that is defined for a specific subtree. So, using React Context, the top level component can now insert data into a context, and let the lower level component get the data from the context. This leaves out of noise the components in the middle of the hierarchy.

![NoiseSound-03](https://dev-to-uploads.s3.amazonaws.com/i/a4s8z9oxh7c7m0l0n3a9.png) 

Of course, the story is not always as happy as this one. Some architectural patterns, such as VIPER in the iOS landscape has introduced noise to codebases that could have been more sound otherwise. This is not always the case and I've seen great implementations of VIPER architectures. However, in general, it bring more noise than the sound it could provide.

Most coding tasks, unlike what many might think at the beginning of their careers is more about communication and language than about maths. If you want to be a great software engineer, you need to become great at communicating, great at telling stories, and great at recognizing when you are making noise and when you are making good, relevant, and enjoyable sound.
Netlify Redirects and package.json
Tags: javascript, netlify, react
Published: 2021-01-03 22:58:40

I use [Netlify](https://www.netlify.com/) to host my web projects, and I've been running into a consistent but confusing problem. Every time it happens, I forget the solution and have to rediscover it, so I'm hoping that writing this reminds me, and potentially helps anyone else facing the same issue.

I create a React app, and host it at `projectName.example.com`. No problems there! However, then I create a redirect that sends it to `example.com/projectName/`. This is because I don't want to buy new domains for each project, and find subdomains a little ugly. However, now when I try to visit `example.com/projectName/`, I get a blank screen! More specifically, I get a webpage that is only comprised of the contents of the public/ folder.

The solution to this is adding a line to your package.json file. Specifically, the line `"homepage": ".",`. This allows the web browser to locate the bundled files that it wasn't able to find before. Why this happens I don't know! If anyone knows why, please leave it in the comments below.
Rails Portfolio Project at Flatiron
Published: 2021-01-03 22:58:11

One of the main portfolio projects that I needed to complete as a student at Flatiron School is to develop a web application using Ruby on Rails. For my Ruby on Rails project, I planned to develop a web application that mimics some functionalities from PointClickCare's healthcare software that some health care centers utilize. In the application, users are assumed to be nurses and their managers. The application helps nurses to manage their patients information and medication. And the nurse manager assigns nurses to a floor where there are some residents in the institutions care. Once a nurse is assigned to a floor, they will be able to view the informations related to residents in that floor.  

Before I start coding the project, I developed a wireframe based on the interfaces the PointClickCare's healthcare software has. I then created the file structure for the web app. To include some of the functionalities, I needed to generate 12 models and migrations as shown below. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/l4oa0y3t0gmjiabptsh9.png)

The migrations established has_many and many_to_many associations among the different models in the application. As the nurse can be assigned to many residents while the resident can have many nurses, many_to_many association was established between the two models. The other models are mostly associated with the resident, while the nurse can make changes to the attributes of these models so as to update the attributes. For instance, prescriptions of for a resident are filled out by the nurse which will either create or update the list of medications. The prescription model has five attributes which can be directly changed by the nurse when a new prescription is created, while the sixth attribute is created and updated through a callback in the model when the prescription is saved. The after_save callback is used to update delivery_time for the next dose to be passed. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8f580ko4nn22fu1rbw3a.png)  

The application lets users to use standard user authentication and google's Oauth authentication to login to the application.  As to the views created, Bootstrap was used to structure the user interfaces.  

In the application, I tried to include all the requirements of the school to make it acceptable. But it needs some refactoring and, some features should be added to make it more useful. I plan to add some graphics to show the summary of residents physical exam results, and also display how efficiently the nurse are passing the medications to residents.
PixAI DOHackathon Submission
Tags: showdev, dohackathon, react, ai
Published: 2021-01-03 22:53:33

## What I built
An app showcasing fun image processing using AI dubbed **PixAI** 

### Category Submission: 
**Random Roulette**

### App Link
https://pix-ai-uz5ei.ondigitalocean.app/

### Screenshots
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6cmndp97dg0k6gr6c27h.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jg0lw9vwcdc8xj1zsphe.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/lidcd19q9c3nfqomt5dd.png)

### Description
PixAI lets you view yourself as a cartoon, zombie and so much more
 

### Link to Source Code
https://github.com/arndom/pix-ai

### Permissive License
[MIT](https://choosealicense.com/licenses/mit/) chosen


## Background
I always loved AI particularly anything that has to do with vision, so the ability to transform myself into something else motivated me to create this app where people can hopefully be as happy as I when they see their zombie doppelganger 😁🤣 

### How I built it 

First time using Digital App Platform for deployment and it was pretty easy; link up the github repo and the platform did the rest🤙
I also used it for storing my environment variables(which was a new to me) to protect my secrets.  The experience building this was pretty nice.


### Credits...

Big ups🙌🙌 to these guys that developed the AI APIs:

* Toonify and Zombify from [justinpinkey](https://justinpinkney.github.io/toonify-api-docs/) and illustrations by [dzook](https://rapidapi.com/dzook-dzook-default/api/dzook4/details).

* Style transfer API found on [DeepAI](https://deepai.org/machine-learning-model/fast-style-transfer).

* Image colorization also from [DeepAI](https://deepai.org/machine-learning-model/colorizer).