teleren/devto huggingface dataset:
[advice needed] Using a huge distant monitor
Tags: productivity, health, ergonomics
Published: 2018-12-06 17:52:40

---
title: [advice needed] Using a huge distant monitor
published: true
description: 
tags: productivity, health, ergonomics
---

My vision is considerably deteriorating due to my lifestyle. Pretty much 80% of my waking time I'm focusing on <2m away objects/monitors/screens.

I'm considering a ~56" TV that I would hang 5m away from me to relax my eyes a bit. But I'm wary of this solution because I have never seen such setup.

Anyone has tried/seen this before?

Any links to stories would be appreciated, too.

Thanks
What the future of web dev might be if Serveless and GraphQL dominate?
Tags: discuss, webdev
Published: 2018-12-06 17:45:11

---
title: What the future of web dev might be if Serveless and GraphQL dominate?
published: true
description: 
tags: discuss, webdev
---

Few trends have arisen in the web development, a while now, that shift our thinking completely from the till-now-norms. Two of these are Serverless architectures and GraphQL.

There is a good level of hype, so in case they dominate the market against Server-oriented architectures(and even maybe microservices) and REST respectively how do you think, the following specializations will be affected(job demand, job importance etc)?

- Frontend Devs
- Backend Devs
- Devops
- Security experts
- QA engineers
My own React tutorial! Feedback needed
Tags: help, beginners, react, github
Published: 2018-12-06 17:40:24

---
title: My own React tutorial! Feedback needed
published: true
description: I'm making a React tutorial and I need to know how bad is it.
tags: Help, Beginners, React, Github
---
Hello Dev.to!

I once heard something like "If you can explain it simple enough it means you really know the subject". I have been studying Front-End for a couple of months and I wanted to check if I really know how to use React, so I wrote a small tutorial.

The catch is that I'm very sure there are a lot of things missing in the tutorial and as it is the first time I write something like this I need feedback from everyone, from junior (did you understand?) to senior (did I forgot to add something?).


So here it is. Feel free to comment here or making a pull request to change the tutorial, it'll be much appreciated.

{% github LeWanderer/Learn-React-fast%}
Key-based Authentication Not Working After ssh-copy-id
Tags: servers, authentication, ubuntu, troubleshooting
Published: 2018-12-06 16:16:12

---
title: Key-based Authentication Not Working After ssh-copy-id 
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/z4tmsb70von4adybympt.png
tags: servers, authentication, ubuntu, troubleshooting
---

I recently provisioned an Ubuntu virtual private server (VPS) on Vultr. I'm partial to CentOS myself, but the task I was working on recommended Ubuntu. To set up key-based authentication from my laptop to the server, I generated a new SSH keypair (named "ubuntu") on my Mac using the command: `ssh-keygen -t rsa -b 4096`. Next I used the `ssh-copy-id` utility to copy my public key over to the `authorized_keys` file on my Vultr VPS:

`ssh-copy-id -i .ssh/ubuntu aritdev@123.456.789.000`

As I expected, the utility asked for my VPS password in order to complete the public key transfer. When all was done, I attempted to login to my VPS. It should have let me through without requiring a password:

`ssh -i .ssh/ubuntu aritdev@123.456.789.000`

But I kept getting prompted for a password 🤨 I checked my `authorized_keys` file over on the VPS to make sure my public key had been copied over correctly. Check. I made sure that the file was read-write only for myself and none others. Check. I made sure that the following options were enabled in `/etc/ssh/sshd_config`:

```
PubkeyAuthentication  yes
AuthorizedKeysFile .ssh/authorized_keys
```

Still, I kept getting prompted for a password upon login from my laptop. After a few minutes on StackOverflow, I learned about Encrypted Home Directories, which are default in some environments, including Ubuntu. Encrypted home directories aren't decrypted until the initial login is successful; however, my `authorized_keys` file is stored in my home directory. Therefore, my first connection attempt will require a password. Subsequent connections will succeed without a password, since the SSH service will then be able to read my `authorized_keys` file in my decrypted home directory. 

To get around this, I created a directory named after my username `aritdev` outside of my home directory (I chose `/etc/`), and gave it full permissions for myself, but read-execute permissions for everyone else. Next, I moved my `authorized_keys` file into `aritdev`. Then, I updated the `AuthorizedKeysFile` parameter in `/etc/ssh/sshd_config`:

`AuthorizedKeysFile /etc/%u/authorized_keys`

Finally, I restarted the SSH service. To test, I logged out of my VPS, then attempted to log back in. BOOM - it worked! 💃🏾

What issues related to server authentication have you experienced? How did you solve them? Please share below! 👍🏾
I am bored programming standard Frontend-Backend web software
Tags: changelog, webdev, php, go
Published: 2018-12-06 17:39:14

---
title: I am bored programming standard Frontend-Backend web software
published: true
description: Controllers, APIs, Entities, Validations, Business logic, Repositories and their SQL data layer. CQRS for inappropriate use-cases when feeling fancy. Web development is fun. At the beginning…
tags: changelog,webdev,php,go
cover_image: https://blog.gophersland.com/assets/images/posts/2018/gophersland_bored_programming_standard_frontend_backend_web_software.jpg
---

First of all, thank you Dev.to community for all the interesting questions in the last [AMA](https://dev.to/enchanterio/i-am-full-time-blockchain-developer-for-6-months-ama-2ej9)! 

## New BLOG IS LIVE!

I am happy to announce a new Blog for my GophersLand project and given the occasion, I have written a blog post about Web development and how switching to Go programming language helped me grow as a developer.

Looking forward for your feedback,
Enjoy the article!

[https://blog.gophersland.com/bored-programming-standard-frontend-backend-web-software](https://blog.gophersland.com/bored-programming-standard-frontend-backend-web-software)

With love,
"Maurice Moss"

![https://thepracticaldev.s3.amazonaws.com/i/p79mofn0yxn3jhooh2d0.gif](https://thepracticaldev.s3.amazonaws.com/i/p79mofn0yxn3jhooh2d0.gif)
How to validate an email address in JavaScript
Tags: javascript
Published: 2018-12-06 17:32:31

---
title: 'How to validate an email address in JavaScript'
description: "Email validation is hard. With the vast amount of complex, but valid email addresses that exist today, the only way to truly tell if an email address is valid is to send the email and see if it bounces. With that said, there are a few things we can do on the front end to make the experience better for everyone. In this post we'll talk about few common approaches for validating email addresses in JavaScript."
tags: "javascript"
cover_image: "https://tylermcginnis.com/static/448940bf064d37b0ffd9db18e9c701c5/65615/validateEmail.jpg"
canonical_url: "https://tylermcginnis.com/validate-email-address-javascript/"
published: "true"
---

Email validation is hard. With the vast amount of complex, but valid email addresses that exist today, the only way to truly tell if an email address is valid is to send the email and see if it bounces. With that said, there are a few things we can do on the front end to make the experience better for everyone. In this post we'll talk about few common approaches for validating email addresses in JavaScript.

First, when validating email addresses I believe it's better to error on the permissive side. I'd much rather let pass a few fake email addresses than reject a valid one. Front-end email validation is about figuring out if the syntax is correct, not if the email address is valid. With that said, we'll start off with the most permissive solution and work our way towards the other end.

```js
function emailIsValid (email) {
  return /\S+@\S+\.\S+/.test(email)
}
```

If you're not familiar with RegEx, `/\S+@\S+\.\S+/` is testing for the most basic email address structure, `_@_._`. That's typically all I ever assume about an email address. If the email the user types in doesn't follow that structure, odds are they made a typo.

One issue with the Regex above is it'll fail on this format: `_@_@._`. To fix that, we can change up our Regex a bit.

```js
function emailIsValid (email) {
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)
}

emailIsValid('tyler@tyler@tylermcginnis.com') // false
emailIsValid('tyler@tylermcginnis.com') // true
```

That's it. Anything beyond this is going to be too opinionated. You could find some other solutions by googling around but I recommend re-thinking your approach if the above examples don't work for you.
TIGL3D DevLog 9+10: GDC party, new boss, lots more
Tags: gamedev, unity3d, devlog
Published: 2018-12-06 17:06:52

---
title: TIGL3D DevLog 9+10: GDC party, new boss, lots more
published: true
description: These updates cover lots of iteration including a new boss and new puzzles
tags: gamedev, unity, devlog
cover_image: https://thepracticaldev.s3.amazonaws.com/i/u5835ovjv1hpopoj8xco.gif
---
These two devlog updates for [The Indie Game Legend 3D](http://indiegamelegend.com/) from April 2018 cover lots of fixes and improvements from GDC feedback, as well an intense new boss, a satisfying new puzzle, and lots more:

{% youtube Ztkq91gX4yo %}

{% youtube cyKa-4JF7uA %}

Early access in 5 days...
8 Free Online Web Development Courses
Tags: webdev, webdesign, freecourses
Published: 2018-12-06 16:44:13

---
title: 8 Free Online Web Development Courses
published: true
description: Here's a list of 8 free online courses that are meant for beginners and teach Web Development concepts.
tags: web development, web design, free courses
---

Below is a list of some of the best Free Web Development courses available on the Web. If you're a complete beginner and want to learn Web development then these courses are a gold mine for you.
About half of these courses also offer free certificate of completion. So it could also be a great addition on your Resume. If you don't have any Computer Science background then there's a course called CS50 which will give you a very solid foundation of Programming concepts.
Here's the list of courses along with programming technologies they teach:
1. [FreeCodeCamp](https://www.freecodecamp.org/):  HTML, CSS, Javascript, React.js, Node.js, MongoDB
2. [Introduction to Computer Science CS50](https://www.edx.org/course/cs50s-introduction-computer-science-harvardx-cs50x):  HTML, CSS, Python, Javascript, SQL
3. [KhanAcademy - Computer Programming](https://www.khanacademy.org/computing/computer-programming):  HTML, CSS, Javascript, jQuery, SQL
4. [The Odin Project](https://www.theodinproject.com/):  HTML, CSS, Javascript, Ruby, Ruby on Rails
5. [Bento.io](https://bento.io/):  HTML, CSS, Javascript, Python, SQL, Postgres
6. [Upskill - Essential Web Development Course](https://upskillcourses.com/p/essential-web-developer-course):  Javascript, HTML, CSS, Ruby & Rails, React.js, SQL
7. [Udemy - Foundations of Front-end Web Development](https://www.udemy.com/foundations-of-front-end-development/):  HTML, CSS, Javascript, jQuery, Backbone.js
8. [The Gymnasium - Modern Web Design](https://www.thegymnasium.com/courses/GYM/107/0/about):  HTML, CSS, Javascript

For more details about these courses and to know which ones offer free certificates, read this Guide on [WebEmployed](https://www.webemployed.com/free-web-development-courses-certifications/).
Do you consider your carbon footprint while programming?
Tags: discuss
Published: 2018-12-06 16:02:32

---
title: Do you consider your carbon footprint while programming?
published: true
description: Code runs on computers, computers consume energy, so code has a carbon footprint?
tags: discuss
---

A computer runs on electricity and thus contributes somehow to the CO2 emissions. But as the activity of machines are controlled by Software, some say [software causes energy waste](https://www.getflyweight.com/) (which I guess is somehow true given the impact algorithms can have on performance...). Still, I wonder if you guys think about this: **Do you consider your carbon footprint while programming?**
bashme, the first command line interface about you
Tags: cv, resume, typescript, xtermjs
Published: 2018-12-06 15:29:58

---
title: bashme, the first command line interface about you
published: true
description: my first post :)
tags: cv, resume, typescript, xterm.js
---

Hi! This is my first post. I'm very happy to be able to share something with the community after some time reading a lot of wonderful posts.

{% github https://github.com/agurodriguez/bashme %}

It would be awesome to hear your feedback and know if you find it useful and how it can be improved.

Thank you!
What are the "next steps" in your career?
Tags: development, career
Published: 2018-12-06 15:05:47

---
title: What are the "next steps" in your career?
published: true
description: What's the next steps in your developer career and how do you plan to get there?
tags: development, career
---

I have a conversation with myself more than often about the next steps in my career. I like to assume this is a common thing to do, but very curious about how other people view and plan their next steps in their career.

What's the next steps in your developer career and how do you plan to get there?

Is it based on...

- a time frame?
- promotion?
- responsibilities?
- perks? (ie: working from home)
- skillset?

Curious to hear others perspectives!
Essential Google Analytics Alerts & How to Set Them Up
Tags: webdev, showdev, productivity, devops
Published: 2018-12-07 15:05:49

---
title: Essential Google Analytics Alerts & How to Set Them Up
published: true
tags: webdev, showdev, productivity, devops
canonical_url: https://snipcart.com/blog/google-analytics-alerts
---

![Essential Google Analytics Alerts & How to Set Them Up](https://snipcart.com/media/203969/google-analytics-alerts-1.jpg)

Picture this nightmarish scenario:

A dev on your team just pushed a modification to your site… and broke your e-commerce integration. 

People can’t buy.

You leave for lunch, maybe even work a few hours after that before you realize what happened.

Meanwhile, BIG money is being lost. 

![everything-burns](https://media.giphy.com/media/JIUYwgWQ5INSU/giphy-downsized.gif)

Panic ensues among the developer team: “OMG, how could that happen to us? We do unit tests, heck, we even have some integration tests&mdash; they all passed!”

You have a monitoring tool telling you that your servers are up. [PagerDuty](https://www.pagerduty.com/) didn’t call you: the *site* isn’t down, so your typical monitoring systems weren’t triggered.

You fix everything quickly, but the damage’s already done. Disastrous business day. 

After gobbling down a few chill pills, it’s time for a post-mortem. 

“How can we avoid that in the future? How can we know when there is an issue with our online money-making machine?”

**That’s where Google Analytics alerts come to the rescue.** 

How? By monitoring the *symptoms* of such breakdowns: drop in conversions and sales, for example.

I’ve seen real-life horror stories just like the one above. People losing thousands of dollars before even noticing there was something wrong! Today I want to make sure it doesn’t happen to you. I'm going to do so by listing essential Google analytics alerts and showing you how to set them up.

## Why use Google Analytics custom alerts?

I won’t spend too much time introducing the feature as the name itself is pretty self-explanatory. In a nutshell, GA custom alerts are notifications sent to you, by email or SMS, when selected metric’s thresholds are triggered. I’ll explain how to set them up in GA further down.

As in my prior example, I know that some devs might argue that they already do unit and integration tests, that it should be enough to know everything’s working fine. Sadly, this isn’t true. You [should absolutely do them](https://snipcart.com/blog/frontend-testing-cypress), as much as possible. No question. But they won’t assure you nothing will break, ever. 

And the day something does break, analytics alerts might be the last barrier before disaster. At least, you’ll know way quicker something isn't right. 

**The best way to know there’s an issue with a significant revenue source is to monitor as closely as possible to the money.**



→ Read the full post [here](https://snipcart.com/blog/google-analytics-alerts)
Hardening Traefik when using the Docker Provider
Tags: docker, architecture, python
Published: 2019-06-19 14:06:06

---
title: Hardening Traefik when using the Docker Provider
published: true
tags: Docker,Architecture,Python
canonical_url: https://fluffycloudsandlines.blog/hardening-traefik-when-using-the-docker-provider/
---

This [issue](https://github.com/containous/traefik/issues/4174) on the Traefik GitHub tracker piqued my interest the other day. The Docker Socket does come up as the Achilles heel at times, with different mitigations to secure it - Proxy Containers, exposing via TLS with Authentication and Authorisation. What you choose is down to your risk appetite and your broader environment.

In this scenario, having the Docker Socket bound to an Internet-facing container wasn't a risk I wanted to take. A few options have been floated already (Sock Proxy, Switch to TLS etc., Switch to static file config). However, I wanted to take a stab at an alternative route.

The result is `traefik-prism`. It is a simple Python script that takes a valid Traefik Dynamic Config and publishes it to an Internet-facing container, which isn't attached to Docker.

![Hardening Traefik when using the Docker Provider](https://fluffycloudsandlines.blog/content/images/2018/12/traefik-prism-architecture.png)<figcaption><strong>Example Deployment for traefik-prism</strong></figcaption>

It takes advantage of the built in APIs in Traefik, no magic here. It is designed to handle different Traefik providers, not just Docker (hint: comments from other provider users warmly welcomed). Roughly, the script;

- retrieves the current Dynamic config (the frontends and backends) from `/api` on the API Endpoint (normally port 8080),
- extracts the frontends and backends from the response, based off the `PROVIDERS` environment variable, then merge the potentially multiple blocks (say `file` and `docker`), into one config,
- finally, pushes the new merged config to `/api/endpoints/rest`. The new config should be active immediately.

The security model of pushing from a higher security level zone (in this case a container with access to the Docker socket), and pushing to a lower one is a common pattern for securing systems. There isn't any 'sensitive' data to leak here, so I'm not too bothered about content checking as we move from high to low.

Check out the code on [GitHub](https://github.com/tomwerneruk/traefik-prism) or pull the image straight from [Docker Hub](https://hub.docker.com/r/tomwerneruk/traefik-prism/).

As ever, thoughts and comments always welcome!
Let's see those Spotify Top Songs of 2018!
Tags: music, community
Published: 2018-12-06 13:49:32

Around this time every year, I anticipate the arrival of my top Spotify songs of the year. It's a curated list that I will grind until New Years in between Holiday music binges. This year Spotify has offered another playlist to accompany this one, *Tastebreakers*, in an attempt to expand my horizons by listening to music I'd never bump into on my own. That's kind of how I found Mithril, now that I think about it. It was in a list of alternative frameworks somewhere.

But first: {% twitter 1070668539596627968 %}

Of course, it's been way too cold in the office for a simple tee, so I'll be breaking that out again this spring. Now, onto the reason I'm here this morning:

![](https://thepracticaldev.s3.amazonaws.com/i/8doljles9evti2o15glj.PNG)

Pasting this image reminds me that I started working on Spotify embeds for our community (without asking if anyone else would be interested) as a way to become familiar with the codebase. I need to get back to work!

I have to say, I'm not sure how Spotify's algorithm works, but it's certainly not a straight shot to the number of plays. *All Ashore* is definitely my number one, and the next few make sense, too. By the time we get to the bottom of this snippet, I see the Ting Tings made the list, and I only just remembered them last month. It looks like there is some attempt to shuffle genres near the top. What do you think?

I've made two more observations about my playlist. First, Baby Shark did not make the top 10. What a relief! Second, I don't listen to any of this music when I'm coding. I prefer movie and video game soundtracks, light EDM, academic music, etc. I intend to talk about music, our brains, and coding here in a future post.

What have you been listening to?
GitHub Issue - Desktop App
Tags: react, electronjs, git, github
Published: 2018-12-06 13:20:54

---
title: GitHub Issue - Desktop App
published: true
description: A desktop application created with ElectronJS and ReactJS to be cross-platform to manage and track GitHub issues.
tags: reactjs, electronjs, git, GitHub
cover_image: https://thepracticaldev.s3.amazonaws.com/i/frwsk3lj82l9sqav3ma8.png
---


A desktop application created with <a href="http://electron.atom.io/">ElectronJS</a> and <a     href="https://facebook.github.io/react/">ReactJS</a> to be cross-platform to manage and track GitHub issues.

## Screenshot

![Git Comannds](https://user-images.githubusercontent.com/24671133/49445258-adfecc00-f7b8-11e8-81a0-63240ff2ddff.gif)

## Built With

- [ReactJS](https://reactjs.org) - ReactJS
- [ElectronJS](https://electronjs.org) - ElectronJS
- [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate) - electron-react-boilerplate

## Prerequisites

- **Requires a node version >= 7 and an npm version >= 4.**
- **If you have installation or compilation issues with this project, please see [debugging guide](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/400)**

## Install

First, clone the repo via git:

```bash
git clone --depth=1 https://github.com/mariorodeghiero/git-issue-react-electronjs.git your-project-name
```

And then install dependencies with yarn.

```bash
$ cd your-project-name
$ yarn
```

**Note**: If you can't use [yarn](https://github.com/yarnpkg/yarn), run `npm install`.

## Run

Start the app in the `dev` environment:

```
$ yarn dev
```

OR

```bash
$ npm run dev
```

## Packaging

You can debug your production build with devtools by simply setting the DEBUG_PROD env variable:

```
$ DEBUG_PROD=true yarn package
```

To package apps for the local platform:

```bash
$ npm run package
```

To package apps for all platforms:

First, refer to [Multi Platform Build](https://www.electron.build/multi-platform-build) for dependencies.

Then,

```bash
$ npm run package-all
```

To package apps with options:

```bash
$ npm run package -- --[option]
```

To improve the usability of this App, you can create keyboard shortcuts to start quickly.

- For Mac_OS use "Automator".
- For Windows access "Properties" of the App.


If you liked this project, contribute improvements or give me a star ⭐️ on  [GitHub.](https://github.com/mariorodeghiero/git-issue-react-electronjs)

Thanks!