teleren/devto huggingface dataset:
May today be the day you enjoy life and your code.
Tags: discuss, webdev, health, productivity
Published: 2019-09-10 15:27:48

---
title: May today be the day you enjoy life and your code.
published: true
description: It's time to enjoy your life and what you have
tags: discuss, webdev, health, productivity
---

As developers I know we have a habit of just digging in and working endlessly. 

We do it for passion, we do it for fun, we do it when we're bored... for a pay check. 

But after a while, we forget to take breaks, to stop and smell the roses. 

My son is laying in the hospital with a life altering illness, with the possibility of him never coming home. 

It's brought a lot to us, stress, hurt, fear... love, closeness and awareness.

He's only 4 years old but he's been through more in life than most will. Even in his situation he still stops to smile, to do our family fist bump.

He finds the joy in what he's passionate about, which is Spiderman and Lego Ninjago.

He's taught me a valuable lesson, which I hope to spread the message. No matter what you do in life, how hard it is, there is always time to smile and truly spend a few minutes enjoying what it is that makes you happy.

So today, take the time to do what you enjoy. Even if it is coding, do with with the mindset that you get to code, not that you have to code. 

Stop and count your blessings. Are you able to work with what you love? Can you help others? Share your creations? Learn each and every day. 

Don't let your passion and joy be dimmed by the daily grind. If you feel frustrated, annoyed or discouraged, it is most likely that you've forgotten to stop and smell the roses... or stop and have "spiderman time" as my son puts it. 

There are simple steps you can take to re-find the joy and it's probably so simple that it escaped your thoughts.

It starts with being kind, because when you're kind, you tend to be happier and when you are happier, you take better care of yourself and you feel better about yourself.

When you feel better about yourself, it changes your mindset, and gives you a view that what you're doing is worth while.

So here are a few things to help you reset your situation and get back on track.

- Reach out to a friend and say something nice to them.
- Ask someone if they would like to talk, which includes hearing them but also talking about yourself.
- Write down 5 things you're grateful for (roof over head, cloths on back, food in belly, phone, code, air, ground to walk on, ability to walk..., anything really)
- Thank yourself for being you
- Tell yourself you're awesome and you're loved
- Message me, and I'll give you a compliment or share something of yours with me and I'll tell you how great that it is. 

Then go back to your project and view it in a positive manor. Have fun with it. 

You deserve to be happy, we all do. It starts now, take the steps.
Portfolio Progression
Tags: design, career, weeklyui
Published: 2019-09-10 14:50:21

So for the past week, I have been working on a new design of my portfolio. So from the layout of the site and color scheme to the copy text, I want to broadcast and the projects I want to show off. The difficulty in placing each item in the precise way to make sure you stand out when others are viewing the site. Hoping that you have enough projects to showcase and that they are good enough to get you that first developer role. 

It has been a hard time doing this, considering hurricane Dorine knocking out the power for almost 4 days. You will never know how gifted we are to have the technology we have. Electricity, Air conditioning, Netflix; we are truly lucky. Try to imagine you're trying to conserve on the power you have just to make a little adjustment to something that may or may not get you a job in a field you love and admire. Trying so hard to get every detail correct no matter how small. 

Check out the full page here: https://www.dropbox.com/home?preview=Landing.png

Now imagine not doing that because you have to make sure your 2-year-old has her baby sharks. Making sure she is safe and happy through this situation even though she doesn't understand or even care about what is going on. I would rather make sure she is okay than to work on anything. But now that she is safe and we have the power, I am back at it with fierceness and focus. I have gotten far enough in the mockup to post the landing page. I love the design I have and will be keeping it.

If you have gotten this far into this post thanks for reading. If you can I would love your feedback and opinion on the mockup, all are welcome.

きをつけて。 - Take care.
[PT-BR] Terminei o curso básico de Git e GitHub.
Tags: git, ptbr, netlify, diary
Published: 2019-09-10 14:39:28

Bom dia devs e aspirantes a dev como eu. Ontem foi um dia glorioso, eu terminei o curso de introdução ao Git e GitHub do Willian Justen. Recomendo!
O curso me ensinou a usar o Git localmente, como clonar e sincronizar de e para o GitHub, como usar o VIM para editar arquivos rapidamente. Esse curso é principalmente pensado para ensinar sobre versionamento de arquivos e projetos, algo que eu não sabia o que era, ou melhor dizendo, sabia mas fazia da pior forma possível: fazendo sites em pastas na localhost como site1, site1-1, site 1-2, etc, formando um lixo desnecessário e trabalhando tudo de novo apenas para mudar algo aqui e ali.

Então hoje pensei: tá, qual a melhor forma de subir um arquivo de imagem para um repositório na GitHub? E caí em um vídeo de youtube ensinando a fazer justamente o que não quero fazer: usando o gitHub desktop como se fosse um cliente FTP, mas botando a imagem no diretório local e sincronizando com a GitHub. Até aqui tudo bem. Mas o vídeo segue mostrando a pessoa entrando diretamente no arquivo .html do repositório na GitHub e editando esse arquivo para adicionar a imagem diretamente de lá. Em respeito ao meu aprendizado e ao interesse dos colegas ao meu pequeno e despretensioso blog eu não vou linkar esse vídeo aqui.

Gambiarras: pensando agora, vejo que minha incursão à web muitos anos atrás foi bem assim, colando um código aqui, bugando ali, copiando o site todo (backup) antes de fazer bobeira, testar, mandar para produção. Fico bem feliz em ter me obrigado a conhecer e estudar .git mesmo não sabendo se serei obrigada a usar essa ferramenta na 42 São Paulo. Sugeriram o estudo nos grupos de espera. Agradeço demais, pois minha mente se abriu a aprender a fazer as coisas direito.

Mais do dia de ontem:

Também hospedei um template site em Gatsby e Netlify CMS na Netlify, usando o GitHub como diretório: como o Gatsby tem plataforma de design, por enquanto não mexi via repositório (mas estou preocupada em como mudar as imagens do tema, daí meu questionamento que originou a  pergunta lá em cima). Ainda não brinquei muito nele.

Falei que participei de um Hackathon? Pois é, eu fiz um totem de atendimento em HTML e javascript. Fiz um novo repositório, coloquei esse meu protótipo dentro, criei um CNAME e fiz assim, mais uma página HTML dentro do meu GitHub. Como? Nomeia o repositório com o nome <seuprojeto.github.io>, vai nos settings e marca o uso de GitHub pages nele, cria o CNAME com o subdomínio que vc quer usar (o subdomínio criado em github.io tbm irá funcionar), dá as permissões no seu painel de domínio e pronto. Fiquei bem feliz em ver um uso prático para meu domínio.
RS232 extender with cable already in the past.
Tags: rs232, comport, overip, extender
Published: 2019-09-10 14:36:48

---
title: RS232 extender with cable already in the past.
published: true
description: RS232 over ethernet
tags: RS232, comport, overIP, extender
---

![Flexihub interface](https://thepracticaldev.s3.amazonaws.com/i/82or9nhaj3svkqqoe724.jpg)
RS232 extender software solution is designed to redirect serial devices over the Internet (LAN or Ethernet) in a way that makes them available to multiple remote users at the same time. A distinctive feature of this [FlexiHub](https://www.flexihub.com/rs232-extender-software/) over IP is that its interface is really simple and intuitive. Just a couple of clicks to split the COM peripherals at any distance.
useState or const: what's the difference?
Tags: react, discuss
Published: 2019-09-10 14:29:45

Here's a quick bite for you. What are the differences between these two declarations?

```tsx
const Tuesday = () => {
  const [needsTacos] = React.useState(true); // 1
  const needsTacos = true; // 2
  return <marquee>Of course we need tacos!</marquee>
}
```
Why developers should embrace their creativity
Tags: discuss, creativity
Published: 2019-09-10 14:14:21

---
title: Why developers should embrace their creativity
published: true
description: Developers need to embrace their creativity, as it can help them tackle complex tasks.
tags: discuss, creativity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/azkrk4biqi743zbps9wc.jpg
canonical_url: https://flipsphere.net/2019/09/10/why-developers-should-embrace-their-creativity.html
---

We often refer to artists or writers as being creative, but the actual definition of creativity is:

> "the ability to transcend traditional ideas, rules, patterns, relationships, or the like, and to create meaningful new ideas, forms, methods, interpretations" - https://www.dictionary.com/browse/creativity

So whilst artists and writers often gain their fame from writing something imaginative and unique, developers also exhibit this skill albeit in a slightly different way.

Traditionally it was thought that the left side of the brain was for logical thinking, and that the right side was for creativity. This way of slicing the brain has been debunked - we all use our brain in equal measure, and it's down to other aspects of our personality that dictate how creative or logical we are. Therefore, developers can have a lot of creativity! Yet in their day-to-day lives they probably don't get to pursue creative outlets in traditional ways.

If we consider only the nitty-gritty backend developers, even in this seemingly uncreative environment creativity can shine. Whilst the code itself may be completely logical, to be able to split the client's requirements into sections for development requires a certain level of imagination.

Problem solving itself is a form of creativity as you're forced to discover new ideas to overcome obstacles. As developers, we can increase our inventiveness not only through artistic outlets, but also through problem solving. One simple task you could do is that every time you come across a problem, consider three different solutions - and don't limit yourself to only what you know either! Assume you'll be passing the work to someone else to develop and consider options which might, at the moment, terrify you as a developer.

This not only improves your problem-solving skills, but also provides you with a bank of solutions which you can pull from when you need to; and hopefully in a few months you'll look back on your possible solutions and no longer be scared of them.

Ultimately having a creative outlet is so much more than creating an incredible piece of art, or writing a symphony; it allows us to see the world in a different way. It sparks our imagination and opens our eyes to different ways of thinking.

> "Creativity is the source to improvise solutions to problems for dominating complex systems such as software development" - Daniel Graziotin

> "Imagination is more important than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution." - Albert Einstein
Test css(icon) in Capybara
Tags: capybara, rspec, rails
Published: 2019-09-10 14:13:17

---
title: Test css(icon) in Capybara
tags: capybara, rspec, rails
---

## 🔗 Parent Note
{% link https://dev.to/n350071/my-capybara-note-2gp3 %}


## 🤔 Situation
Let's say you use [Font Awesome](https://fontawesome.com/icons/map-marker?style=solid). Then, you want to test that only one map-marker icon is visible on the page.

In other words, you want to find the css.

```html
<i class="fas fa-map-marker"></i>
```


## 👍 Solution
There is `Capybara::Node::Matchers#has_css?`. You can also specify the visible count.

like this.

```ruby
expect(has_css?('i.fa-map-marker', count: 1)).to eq true
```
Daily Challenge #63- Two Sum
Tags: challenge
Published: 2019-09-10 14:06:33

---
title: Daily Challenge #63- Two Sum
published: true
series: Daily Challenge
description: Write a function that takes an array of numbers (integers for the tests) and a target number. It should find two different items in the array that, when added together, give the target value.
tags: challenge
---

Write a function that takes an array of numbers (integers for the tests) and a target number. It should find two different items in the array that, when added together, give the target value. The indices of these items should then be returned in a tuple like so: `(index1, index2)`.

For the purposes of this kata, some tests may have multiple answers; any valid solutions will be accepted.

The input will always be valid (numbers will be an array of length 2 or greater, and all of the items will be numbers; target will always be the sum of two different items from that array).

Based on: [https://leetcode.com/problems/two-sum/](http://oj.leetcode.com/problems/two-sum/)

```
twoSum [1, 2, 3] 4 === (0, 2)
```

***
_Thank you to wthit56 and [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
3 Different ways to start a HTTP Web Server from the Terminal
Tags: webdev, php, python, node
Published: 2019-09-10 13:58:31

In this relatively quick video I want to showcase 3 very quick and different ways that you can start up a HTTP Web Server from the terminal on your local machine, in a specified folder, so that you can serve content to other machines on your network or simply to yourself. This is incredibly useful to web devs in particular so that can rapidly set up a dev server to develop and test on...

The 3 different methods use:
 - PHP
 - Python
 - NodeJs

**Full Video with the information (or scroll down to read...)**
{% youtube tdC5jo7GaRw %}

For those of you who prefer to read then let me simply show you the commands...

**PHP**
PHP has an in-built web server that you can trigger like this:
```
php -S 0.0.0.0:8080
```
(for more information please visit this link: https://www.php.net/manual/en/features.commandline.webserver.php)

 
**Python** *(Version 3)*
Python too has an in-built web server that you can trigger like this:
```
python -m http.server 8080
```
(for more information please visit this link: https://docs.python.org/3/library/http.server.html)


**NodeJS**
Node has a package called "http-server" that needs to be installed before you can use this command, this can be done with this command:
```
npm install http-server -g
```
This installs the package globally on your machine (-g) so that you can use it where ever you like throughout your system, then the command to actually launch the server is this:
```
http-server -p 8080
```
(for more information please visit this link: https://www.npmjs.com/package/http-server)


**Outro**
Of course with all these commands you can change the port number (8080 in every example) to a port number of your choice and then once you have run each of these commands you can then go to your browser and go to the address:
**localhost:8080** OR **127.0.0.1:8080**
to communicate with your web server and the content that is located within the folder that you triggered the command from, it is also accessible to any other device on your network that wants to access your web server, so keep that in mind!
...

I am trying to grow my new YouTube channel too...

cough
Link: https://www.youtube.com/channel/UCMz9lmndR0BEqi70kM_ioyA
cough

So please give me as much feedback & criticism as possible so that I can improve and if you liked it or any other video that I have done please share it around, it would really help!

For any questions about anything you have seen here or in any of my other videos or even if you have ideas for future videos, please reach out on twitter https://twitter.com/ben_kadel

Thanks!
Did Linux Panic?
Tags: linux, centos, sre, sysops
Published: 2019-09-10 13:55:02

A Linux host is like a dude at a bar: after enough bad input it will panic, vomit all over its shoes and then try to carry-on like nothing had happened. 

*Let's use the `last` tool to check wtmp login records and see if the last reboot was intentional or if the host automatically recovered from a crash.*

Details of Linux user logins are stored in the (binary!) file `/var/log/wtmp` and read with the `/bin/last` utility. Output displays the user who logged-in, their source host or IP, and their login time and either their logout time or the status "still logged in":

```bash
VM: /bin/last
lbonanomi pts/0        bastion_host Tue Sep 10 08:04   still logged in
lbonanomi pts/0        bastion_host Tue Sep 10 07:39 - 07:43  (00:03)
```

Now by default `last` only shows real users, but using the `-x` argument will show logins for both real and *pseudo* users. Both `/sbin/shutdown` and `/sbinb/reboot` write their names to wtmp records as part of their normal operation, so wtmp logs record an intentional reboot like this: 

```
reboot   system boot  3.10.0-229.el7.x Sat Sep  7 02:31 - 09:27 (3+06:56)
shutdown system down  3.10.0-229.el7.x Sat Sep  7 02:31 - 02:31  (00:00)
```

With user "shutdown"'s login followed directly by user "reboot". An entry from user "reboot" not *immediately* followed by an entry from user "shutdown" should be considered suspicious enough to get an admin's attention. 

Tuck this chunk of shell functionality into /etc/rc.local to check for crash-recovery and add hooks to disable any services that would cause contention:


```bash
(
  last -x -f $(ls -1t /var/log/wtmp* | head -2 | tail -1);  
  last -x -f /var/log/wtmp
) | grep -A1 reboot | head -2 | grep -q shutdown || echo "panic-boot"

```
The Essential Guide to NDAs (Non-Disclosure Agreement ) For Beginners With Template.
Published: 2019-09-10 13:47:58

Every company has its own planning and R&D (Reseach & development) to grow their business, as well as there, are many secrets of the companies which they are want to keep confidential from their public and competitors.

I have met many owners of large and small organizations and they all are very secretive with their coming new strategies. Business owners are always on their toes while keeping their next move confidential that’s why before launching a new product or expanding to a oversees market, they sign the NDA with all the people who are involved in the project.

If you guys aren’t familiar with NDA and its objectives? or why it is important for almost every company?

Here we’ll try to get doubts to surround NDA as well as you get the Essential guidelines for Dummies.


What is NDA?

It is a legal contract/ document that builds a confidential relationship between two or more parties, which use to protect proprietary or any secret information in business. An NDA (Non-Disclosure Agreement) use anytime to any potential investors, creditors, clients, as well as suppliers.

An NDA also is known as:

Confidential disclosure agreement (CDA)
Proprietary information agreement (PIA)
Secrecy agreement (SA)
Confidentiality agreement (CA)
For startups, why NDA is important?

Starting from the beginning, it is important to secure your marketing strategies from your competitors so that they don’t stale any sensitive information from you. There are many business partners, clients who sign an agreement with the company and NDA ensure the safety of your ideas.

Use this ref link for complete article:-https://codersera.com/blog/the-essential-guide-to-ndas-non-disclosure-agreement-for-beginners-with-template/?utm_medium=Link&utm_source=reddit&utm_campaign=Social%20Media
Evolution of String since Ruby 1.8
Tags: programming, ruby, rails, coding
Published: 2019-09-10 13:36:49

---
title: Evolution of String since Ruby 1.8
published: true
description: Evolution of String since Ruby 1.8
tags: programming, ruby, ruby on rails, coding
---

![Evolution of Ruby String since 1.8](https://images.unsplash.com/photo-1555685812-4b943f1cb0eb?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3300&q=80)

[SEE MORE](https://medium.com/@farsi_mehdi/the-evolution-of-ruby-strings-from-1-8-to-2-5-8b2ed8f39fad)
Emoji Button, a vanilla JavaScript emoji picker
Tags: javascript, webdev, showdev
Published: 2019-09-10 13:35:24

![Emoji Button screenshot](https://thepracticaldev.s3.amazonaws.com/i/b7a51lk2eun5c6l7nsq4.png)

After playing with React, Svelte, and Angular over the past year, I wanted to try to build something in vanilla JavaScript. I previously built an [emoji picker for Svelte](https://www.npmjs.com/package/svelte-emoji-selector), so I thought I would adapt that to plain JavaScript. The result was Emoji Button.

Emoji Button is a plain JavaScript emoji picker that can be used in any JavaScript application, regardless of framework. 

You call the `EmojiButton` function passing a HTML button element, and a callback. Clicking the button will trigger the emoji picker, and when an emoji is picked, the callback will be executed with the selected emoji.

Some of its features include:
- Skin tone variations
- Emoji search
- Saves recently used emojis

It was a bit more challenging building this with vanilla JavaScript without the tools of templating, reactivity, and data binding. All in all, it was a fun project, and hopefully someone out there will find it useful!


- Demo here: [https://joeattardi.github.io/emoji-button/](https://joeattardi.github.io/emoji-button/)
- GitHub project: [https://github.com/joeattardi/emoji-button](https://github.com/joeattardi/emoji-button)
- npm package: [https://www.npmjs.com/package/@joeattardi/emoji-button](https://www.npmjs.com/package/@joeattardi/emoji-button)
Git Workflow: Do you commit to master on your solo projects?
Tags: discuss, git, opensource
Published: 2019-09-10 13:21:30

---
title: Git Workflow: Do you commit to master on your solo projects?
published: true
description: If you are working on a project by yourself do you create branches and use pull requests to build it or do you commit directly to the master branch?
tags: discuss, git, opensource
---

When you are working on a project you know you will be working on solo do you still work out of branches or do you commit to master? Does it depend on the project?

Like many, I have some projects that I work on for learning and fun. On many of them I am working on them by myself. Out of all of the todos I have for them I work on them one at a time. Even though most of them aren't dependent on each other, I don't typically work on multiple at once, switching between what I am building on that project. I will work on one until completion and then work on the next.
These projects are things like Gatsby sites or React apps that have a development server I can run locally on my machine to see my changes working with the current code.
One example is my personal [website](https://www.daveinden.com). It is a Gatsby site that isn't overly complex, in my opinion. I can run the development server locally to see how things look with my new code and push the changes to the master branch which triggers a new build on [Netlify](https://www.netlify.com). If there is an issue with the deploy I can roll back the commit and try again. I should note that this is held in a private repo and I won't have people coming across the project and possibly submitting pull requests.

What do you think of this workflow? How do you do it when working on projects by yourself? I know it doesn't practice the branching and pull request mechanics for working on a project with other people, but it seems to work for me on my solo projects. Are there benefits to creating branches and working in them on solo projects I'm not seeing?