teleren/devto huggingface dataset:
Validando email com RegEx
Tags: node, react, javascript
Published: 2019-08-26 19:15:11



![Validando email com RegEx](https://thepracticaldev.s3.amazonaws.com/i/hdp6fefzpww7f9m7ol7f.jpg)

Com a quantidade de top-level domains hoje em dia, fica difícil validar emails.
Usando RegEx (Regular Expressions ou Expressões regulares) a única coisa que a gente pode verificar é se o email contém o @ e algum texto antes e depois do @. No mais seria mandar o email de confirmação para validade de verdade.

Outra forma mais curta de escrever essa função seria:

```
const isEmail = text => /^.+@.+$/.test(text);
```

Não deixe de visitar o repositório do github com todas as dicas em emersonbrogadev/social-media-snippets.

[➜ Participe da nossa lista de desenvolvedores](https://emersonbroga.com/e/participe/)
[➜ Aprenda ES6](https://amzn.to/2J4XnLg)
[➜ Veja as dicas no Instagram](https://www.instagram.com/emersonbrogadev/)
[➜ Assista nosso canal no YouTube](https://www.youtube.com/c/emersonbroga/)
[➜ Curta nossa página no Facebook](https://www.facebook.com/emersonbrogadev/)
[➜ Não perca as atualizações no Twitter](https://www.twitter.com/emersonbrogadev/)
[➜ Veja os repositórios no Github](https://www.github.com/emersonbrogadev/)

=)
3 Ways New Tech Can Save The Unorganized
Tags: techorganization
Published: 2019-08-26 19:06:43

---
title: 3 Ways New Tech Can Save The Unorganized
published: True
description: New technology is a game changer for those who are less organized than others.
tags: Tech Organization 
---
Organization, you have it or you don't. It is an essential part of life. Whether you work in business, schooling, or even construction organizational skills are required. It has been known often as a skill, something that even you have it or don't have it. You are an organized person or you are not. Don't worry for all you "disorganized" people out there your problem has been solved. Technology has got you covered. Document management software is the new tech that you need here are three reasons why. 

1. Increase of space
We live in a world of documents. To exist you need documents to well prove your existence. These documents piled up with the documents of work or school can be a lot. A management software can fix this problem. It is the perfect location to store and keep documents. It will create more space in your home and rid you of stress. Having all your documents online will get rid of that clutter that was formally referred to as your desk.

2. Easy Access
For some of us our desk space may look like a white ocean. Now this isn't to big of a problem of coarse until you need to find a document on the bottom of the ocean. </span><a href="https://www.efilecabinet.com/"font-weight: 400;">Document management software organizes</span></a><span style="font-weight: 400;"> the ocean of documents for you by making each document easy to find. The next time you need a document for work or for the DMV you will not have to set aside 15 minutes to look or wonder if you even have the document. You can simply search its name and pull it up.   

3. Increased Security
As great as paper is there is no real security for it, outside of buying a vault to put it in. Another perk of using a document management software is that you software can be password or even finger print protected. This change can protect you and your identity. Your documents will be stored away somewhere where only you can see them.
Mosaic gallery, Expanding footer, Video hero | Module Monday 53
Tags: showdev, githunt, webdev, javascript
Published: 2019-08-26 18:20:03

---
title: Mosaic gallery, Expanding footer, Video hero | Module Monday 53
published: true
description: Module Monday 53
tags: showdev, githunt, webdev, javascript
cover_image: https://res.cloudinary.com/component/image/upload/b_rgb:ffffff,c_lpad,h_350,w_800/v1566432444/mosaic-gallery_kd8i6f.gif
canonical_url: https://guide.anymod.com/module-monday/53.html
---

## Everything below is open source 
It's free to use on any website, web app, or anywhere else. There are hundreds more like these built & shared on [AnyMod](https://anymod.com).

Click a mod to see it along with its source code.
## Mosaic gallery
Beautiful gradient gallery with overlay you can add with one line of code.
<a class="btn btn-sm" href="https://anymod.com/mod/mosaic-images-mladll?preview=true">View mod</a>
<a href="https://anymod.com/mod/mosaic-images-mladll?preview=true">
  <img src="https://res.cloudinary.com/component/image/upload/v1566432444/mosaic-gallery_kd8i6f.gif"/>
</a>

## Expandable footer
Hides at the bottom until needed. Expands with about & contact info.
<a class="btn btn-sm" href="https://anymod.com/mod/expandable-footer-with-social-network-links-alrolk?preview=true">View mod</a>
<a href="https://anymod.com/mod/expandable-footer-with-social-network-links-alrolk?preview=true">
  <img src="https://res.cloudinary.com/component/image/upload/v1566432442/footer_tit3tt.gif"/>
</a>

## Video hero with navbar
A bold intro section with side navigation.
<a class="btn btn-sm" href="https://anymod.com/mod/video-hero-with-navbar-nkonmr?preview=true">View mod</a>
<a href="https://anymod.com/mod/video-hero-with-navbar-nkonmr?preview=true">
  <img src="https://res.cloudinary.com/component/image/upload/v1566432443/hero_u8feqk.gif"/>
</a>

## Background columns
Three content columns with a fixed background behind.
<a class="btn btn-sm" href="https://anymod.com/mod/background-columns-nkomrr?preview=true&lorem=true">View mod</a>
<a href="https://anymod.com/mod/background-columns-nkomrr?preview=true&lorem=true">
  <img src="https://res.cloudinary.com/component/image/upload/v1566432442/content-columns_l2u3zv.png"/>
</a>

## Features list
Easy way to show off your features along with a "Learn more" button.
<a class="btn btn-sm" href="https://anymod.com/mod/features-list-section-dkdona">View mod</a>
<a href="https://anymod.com/mod/features-list-section-dkdona">
  <img src="https://res.cloudinary.com/component/image/upload/v1566432442/features_e5eu5z.png"/>
</a>

<hr>

I post new mods from the community [here](https://dev.to/tyrw) every (Module) Monday -- I hope you find them useful!

Happy coding ✌️
The problem with thought leaders
Tags: discuss, programming
Published: 2019-08-26 18:13:45

---
title: The problem with thought leaders
published: true
description: 'In recent years (and due to the toxicity of the Twitter) term "thought leader" became a negative thing to me'
tags: [discuss, programming]
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6d09qyzf3azhreb3f8sp.jpg
---

In recent years (and due to the toxicity of the Twitter) **term "thought leader" became a negative thing to me**.

## None-scientific matter

Some none-scientific subjects introduced as if they are proven to work. For example, clean code, TDD, agile, type systems. Are there [empirical evidence](https://www.youtube.com/watch?v=WELBnE33dpY) that those things work? I haven't seen any which proves a definite positive effect without caveats.

I don't say that those things are bad I'm just saying that we don't know for sure if they are good or how good they are.

Out of all "best" practices out there we have some kind of evidence of positive impact for: 

- code reviews 
- good sleep

`¯\_(ツ)_/¯`

Please don't trust me - read [papers](https://www.hillelwayne.com/talks/what-we-know-we-dont-know/) yourself.

## Biased

Another problem when technology is presented as if it is a silver bullet. 

If a person doesn't present downsides of the solution it means:
- either they don't have enough experience and haven't seen edge cases yet
- or they know downsides but present you malformed information, because they try to "sell" you this information

For example, I like that Dan Abramov, inventor of Redux, himself wrote an article "[You Might Not Need Redux](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367)".

## Solution?

Is there a solution to this problem? 

- Maybe CoC help will help? I guess not.
- Maybe we need "Hippocratic Oath" for scientists? Like "I will act in the interest of science..." and every thought leader should have a badge if they gave oath or not.
- Maybe we need to improve education, so people would be able to "[call bull](https://callingbullshit.org/)" themselves?

## PS

I hope my articles don't have this overconfident tone. **What are examples of good thought leaders?** Who do you follow and feel like you could learn from?

> Photo by Juan Rumimpunu on Unsplash
CSS Glitched Text
Tags: codepen
Published: 2019-08-26 17:57:36

<p>Pure CSS glitched, noisy, analog-y text.</p>

<p>Forked from <a href="http://codepen.io/lbebber/">Lucas Bebber</a>'s Pen <a href="http://codepen.io/lbebber/pen/ypgql/">CSS Glitched Text</a>.</p>

{% codepen https://codepen.io/chriscoyier/pen/yqHxB %}
[VIDEO] Develop with Docker – Containers for Everyone! 
Tags: docker, techtalks, wordpress
Published: 2019-08-26 17:50:26

Open Source and Emoji Enthusiast @mlteal at WordCamp Phoenix 2019

We go over the basics of setting up a local WordPress development environment using Docker and some of the benefits of containerized development. 

Utilizing docker can be extremely helpful for matching production environments closely as well as streamlining testing and deployment processes.

[Slides are shared here](https://www.slideshare.net/mlteal/dev-with-docker-wcphx-2019) 

![develop with docker](https://i1.wp.com/www.kadamwhite.com/wp-content/uploads/2018/03/20180222-IMG_1780-1.jpg?ssl=1)

p.s. maura rules, you should meet her. she'll be at #phpworld in October in D.C.

{% twitter 1164945527840153601 %}
Migrating from TSLint to ESLint
Tags: typescript
Published: 2019-08-26 17:14:47

I knew our codebase had some dirt and I myself had forgotten a lot of unused imports while refactoring. I realize with horrors that we were not using `no-unused-import` in our linter - [TSLint](https://palantir.github.io/tslint/).

I tried to activate it, but it turns out the rule have been [deprecated](https://github.com/palantir/tslint/issues/4046), de-deprecated and re-deprecated. Indeed, the whole tool [will be abandonned](﻿﻿https://medium.com/palantir/tslint-in-2019-1a144c2317a9) and everybody is invited to migrate to [ESLint](https://eslint.org/), with whom they aim to merge, mimicking Typescript orientation of staying the closest possible to Javascript and its ecosystem. 

So far, so good - the multiplication (one could even say invasion) of different tools is a real pain for any javascript developer. Whatever your stack is, you probably already try to integrate two tools together, only to realize it was conflicting with another part library you already using. The liquid, "micro-" aspect of Javascript is a pleasure sometime, but can also be a real pain.

So, let's install ESlint and the typescript plugin using using `npm install --save-dev eslint typescript-eslint/eslint-plugin`

We are using ES6 and prettier, so here's what our `.eslintrc` looks like: 

```
{
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaVersion: 2018,
    sourceType: 'module',
  },
  plugins: ['@typescript-eslint'],
  env: {
    browser: true,
    node: true,
		es6: true
  },
  extends: [
    'eslint:recommended',
    'plugin:@typescript-eslint/recommended',
		'prettier',
		'prettier/@typescript-eslint'
  ],
	rules:  {
		'@typescript-eslint/explicit-function-return-type': 0
	}
}

```

That's it. Now, you just have to fix the 808 errors that ESLint just spitted at you.


=== See also ===

https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
About Chris Endfinger MD
Tags: chrisendfingermd
Published: 2019-08-26 17:10:10

Chris Endfinger graduated from David Lipscomb University in 1989 with a degree in Biochemistry and minors in Math and French. Chris Endfinger also graduated from UAB School of Medicine in 1993.

Chris Endfinger completed Residency at UAB Family Medicine in 1996
Chris Endfinger supports Compassion International charity and Fight For Life in Birmingham.
Rush Wars Hack Gems
Tags: rushwarshack, rushwarscheat, rushwarsmod, howtohackrushwars
Published: 2019-08-26 16:49:51

rush wars hack Free gems have everything you adore in an method game and extra: interesting and unexpected new characters, outsmarting the competition, and competitive group battles. rush wars hack android is an informal sport for in reality every body to revel in however offers the intensity and undertaking competitive gamers preference as they upward thrust through the ranks. no hours wasted on designing and changing defensive bases, no long wait instances to put together your troops for battle. how to hack rush wars hack ios so start constructing your butt kickin’ squad and rush into conflict these days!

https://hackaim.net/rush-wars-hack-gem-mod/
Arrow Functions in PHP
Tags: php, programming
Published: 2019-08-26 16:34:00

Inspired from Javascript's arrow function, I guess? 
[es6-in-depth-arrow-functions](https://hacks.mozilla.org/2015/06/es6-in-depth-arrow-functions/)

The short closures called arrow functions are one of the long due functionalities that `PHP 7.4` will bring. It is proposed by Nikita Popov, Levi Morrison, and Bob Weinand and you can [read the original RFC here](https://wiki.php.net/rfc/arrow_functions_v2)


_*Quick Example taken from [Doctrine DBAL](https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php)*_
```php
//old way
$this->existingSchemaPaths = array_filter($paths, function ($v) use ($names) {
    return in_array($v, $names);
});

//new way with arrow function
$this->existingSchemaPaths = array_filter($paths, fn($v) => in_array($v, $names));

```


##Let's go through the rules
1. `fn` is a keyword and not a reserved function name.
2. It can have only 1 expression and that is the return statement.
3. No need to use `return` and `use` keywords.
5. `$this` variable, the scope and the LSB scope are automatically bound.
6. You can type-hint the arguments and return types.
7. You can even use references `&` and [spread operator](https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list) `...`


##Few examples
```php

//scope example
$discount = 5;
$items = array_map(fn($item) => $item - $discount, $items);


//type hinting
$users = array_map(fn(User $user): int => $user->id, $users);

//spread operator
function complement(callable $f) {
    return fn(...$args) => !$f(...$args);
}

//nesting
$z = 1;
$fn = fn($x) => fn($y) => $x * $y + $z;

//valid function signatures
fn(array $x) => $x;
fn(): int => $x;
fn($x = 42) => $x;
fn(&$x) => $x;
fn&($x) => $x;
fn($x, ...$rest) => $rest;

```

##Future Scope
1. Multi-line arrow functions
2. Allow arrow notation for real functions inside a class.

```php

//valid now
class Test {
    public function method() {
        $fn = fn() => var_dump($this);
        $fn(); // object(Test)#1 { ... }
 
        $fn = static fn() => var_dump($this);
        $fn(); // Error: Using $this when not in object context
    }
}

//maybe someday in future
class Test {
    private $foo;
    private $bar;
 
    fn getFoo() => $this->foo;
    fn getBar() => $this->bar;
}


```



##My Favorite takeaways
1. Callbacks can be shorter
2. No need for `use` keyword, you can access variables.


>Let me know what do you think about these updates and what are your favorite takeaways from this?


till next time, [rishiraj purohit](https://rishirajpurohit.in)
My personal blog
Tags: showdev, webdev, angular
Published: 2019-08-26 16:27:13

---
title:My personal blog
published: true
description: napicella's blog
tags: showdev, webdev, angular 
---
![Aurora borealis](https://thepracticaldev.s3.amazonaws.com/i/ku6uxhnmz1ii3mm9j8ys.jpg)
<figcaption>
Photo by lennykphotography: https://flic.kr/p/EjfKiY
</figcaption>

Hello everyone, 

In my current team we build our frontend with React, but I have always been curios about Angular JS. 

That's why I decided to write my personal blog in Angular!

The app is deployed to AWS S3 and distributed via AWS Cloudfront.
DNS is managed by Route 53.
The infrastructure is modeled via Cloudformation, and to my surprise, Route 53 was the most tricky one to model. It took me a whole afternoon to make it work (meehh). 
For my next hobby project I'll try [AWS cdk](https://aws.amazon.com/cdk/) instead of Cloudformation.

This is the link to the [blog](https://napicella.com/).

I had some good fun with Angular and the result is actually not so bad for two days worth of work. Let me know what you think!

-Nicola
How to initialize a Singleton mongo connection with expressjs
Tags: help, javascript, node, mongodb
Published: 2019-08-26 16:24:58

I am trying to initialize a mongo Singleton connection with expressjs in the app/server.js file, in an async manner. I want to use the native driver and not Mongoose or something similar.

The whole internet is filled with bad patterns (IMHO) that open a new connection with each request.

Has anyone tried and succeeded in the former? Any link or advise will be appreciated.

For example

`// app.js
let client = await initMongoConnection()
`
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2019-08-26 16:18:49

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---
Every Monday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️


#1. Minimal & Efficient

Liyas shares the story behind Postwoman, an API request builder that helps create requests faster and save time on development!

{% link https://dev.to/liyasthomas/i-created-postwoman-an-online-open-source-api-request-builder-41md %}

#2. Exocortex

Max explains the SQ3R note-taking approach and shares their process with us. 

{% link https://dev.to/maxwell_dev/how-to-take-notes-on-everything-32fc %}

#3. The Ultimate Checklist

Lizzie shares a handy checklist of pre and post launch considerations to ensure optimization for search engines.

{% link https://dev.to/pagely/seo-cheat-sheet-for-devs-5h1g %}

#4. Bandwidth Bot

Andrew wanted to make sure their ISP was providing their guaranteed minimum speeds (or your money back), so they built a bot!

{% link https://dev.to/healeycodes/i-built-a-bot-to-try-and-get-money-back-from-my-internet-provider-33ip %}

#5. Light, Fast & Useful

Mark shares twenty-five shortcuts, settings, and extension recommendations for VS Code users.

{% link https://dev.to/macmacky/my-vscode-shortcuts-settings-and-extensions-for-productivity-3chd %}

#6. Consider Contributing

Despite the title, this post is actually about why you *should* contribute to open source and how to get started. 

{% link https://dev.to/rhamedy/why-you-should-think-twice-about-contributing-to-open-source-1l4d %}

#7. Selfies2020

Lina shares all their takeaways from building a 'tongue-in-cheek' social media game theory multiplayer game. Takeaways range from design to tooling to infrastructure. 

{% link https://dev.to/aduranil/53-learnings-from-writing-a-multiplayer-strategy-game-3ijd %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_
Guess where is ScrapingNinja today? 😻🙀
Tags: showdev, meta, webdev
Published: 2019-08-26 16:08:06

---
title: Guess where is ScrapingNinja today? 😻🙀 
published: true
description: 
tags: ["#showdev", "#meta", "#bestofdev", "#webdev"]
cover_image: https://thepracticaldev.s3.amazonaws.com/i/3d6f1i8vckszacqp0957.jpeg
---

Hello everyone, 

Today is a special day for me.

A few months ago I talked to you about a new project I had with my co-founder: ScrapingNinja.

{% link https://dev.to/daolf/new-season-new-project-i-need-you-197l %}

I had great feedback and support from the community, and for this, **THANK YOU**! 🙏🙏🙏

Today, and after two months of development, 150 signups, 3 blog posts, 20k visits, 12 calls with clients, 8 paying customers, 4 APIs developed we decided that it was time to launch on ProductHunt.

I know that for some a ProductHunt launch is a trivial thing, but for us, as indie-hackers, it is a very important date.

You are welcome to [come and say hi](https://www.producthunt.com/posts/scrapingninja), and share your feedback 👋🙌🙏.

For those of you who don't know, [ScrapingNinja](https://www.scrapingninja.co) is a simple web scraping API that solves many problems:
* proxy handling
* managing a large fleet of chrome headless
* captcha
* JS rendering
* other

I'll talk in a future post about how we build the product, how we launched it and what I learned.

Happy Scraping

Pierre
Figma Plugin API discovery - Part 2
Tags: figma, plugin, api, tutorial
Published: 2019-08-26 15:47:33

---
title: Figma Plugin API discovery - Part 2
published: true
description: Object Selection
tags: Figma, plugin, api, tutorial
---

Update: Here's a new update for Part 2 of Figma Plugin API Tutorial :

[Getting Started with Figma Plugin Creation – Figma](https://www.figma.com/file/Vpb9JAnfyywPgZRIdQmjci/Getting-Started-with-Figma-Plugin-Creation?node-id=0%3A1)

![i1jWj5I.png (1407×846)](https://i.imgur.com/i1jWj5I.png)

[▶ Getting Started with Figma Plugin Creation](https://www.figma.com/proto/yHQ7r7LDf4LGzqHb6DoZKO/Figma-Plugin-API-Discovery%40Go%2FGrafcet.Online?node-id=9%3A0&scaling=min-zoom)
New job, what kind of projects should i put in CV?
Tags: career, challenge
Published: 2019-08-26 15:44:00

I am frontend developer, work in Angular and ReactJS. I want to change my job, this is my first job and i worked here for 18 months. Every project that i worked on can't be displayed in CV because of an agreement. 
So i have question for the community, what kind of projects should i do on my own in this technologies to put in my CV to get new better job?

Thanks.
Using Git - Steps using with Visual Studio Code / Flutter
Tags: git, flutter
Published: 2019-08-26 15:28:00

Git is confusing. I am aware hot useful it is, but often I forget how to use it (especially if programming is not your day job). Hence I am documenting here how to use it ,especially when using with Visual Studio Code for Flutter.
I am a novice Git user, so I hope to update this page while learning how to fully use it.

## Git Basics of the Basics
First, if you don't know what Git is in the first place, visit pages like this one - https://www.freecodecamp.org/news/learn-the-basics-of-git-in-under-10-minutes-da548267cc91/
and there are lots more available over else where.

## Git Basics
### Git Directories
Keep in mind that there are three directories in git.
- Your **Working Directory**, essentially the folder where you are currently coding
- The **Index** folder, this is where you __stage__ your code
- Finally the **Head**, this is where the code resides once you __commit__ it
 

### The Flow
Here is a basic flow when using git
1. Create a Repository
1. Make changes to your code
1. Stage code (this is when you move your current code to the **Index**)
1. Commit code (the code now is in the **Head**)
1. Push code (Finally, this pushes your code to the remote repository)

simple.

## Detailed Steps using VSCode/Flutter

### For new Projects
1. Create Flutter project
1. Go to Source Control
1. Click the plus sign (Initialize Repository)
1. Select the project folder you just created
1. Notice on the left pane, files are being put in to repository
1. Hover on Changes, then click the plus sign (Stage All Changes)
1. Click on the check sign (Commit)
1. Go to GitHub
1. Create a repository
1. Copy your repository URL
1. Go back to VSCode
1. Open the Command Palette
1. Execute Git: Add Remote
1. Specify a name (e.g. origin)
1. Enter your repository URL, then enter
1. Now push your code! Click the three dotted icon, select Push