teleren/devto huggingface dataset:
Byte-Sized: .env Keeping things Secure
Tags: codenewbie, dotenv, javascript
Published: 2018-07-31 12:53:39

---
title: Byte-Sized: .env Keeping things Secure
published: true
description: Why put pen to paper
tags: #codenewbie #dotenv #javascript
--- 
I spent a little time recently looking into how to build a twitter bot with JavaScript; it's actually not super difficult - [but it's definitely worth exploring the ethics, intent, potential and ramifications around](https://botwiki.org/learn/#essays) - but I came across something that I hadn't been familiar with - .env files.

I have my bot projected situated on glitch.me - and the project I remixed already had a .env file included. But I wasn't entirely familiar with the idea.

![My Glitch Directory](https://thepracticaldev.s3.amazonaws.com/i/sgrcpf2nrxy96m74oxnw.png)

Glitch is fantastic as a community and a project that I could fork a repository and receive a blank .env file - providing me with the template without betraying the previous repository owner's content and secrets.

![](https://thepracticaldev.s3.amazonaws.com/i/k0tljuxygfcuhcnmku5w.png)

But... what is a .env file? And why do I have on Glitch for a twitter bot?

So .env files are the solution to the problem of - how do I keep my APIkeys secure.
I need to talk to the TwitterAPI to make my Twitter bot. But the case for *many* APIs is just that I would need a secure key to talk to the API. And that key needs to *stay* secure - I can't just post that to a public repository on Github for the world to see. Anyone could grab it and use it.

Quick solution is the dotenv npm package - Glitch allows me to have the package on their site, but let's say I'm working locally in JS. Quick install:

```
npm install dotenv --save
``` 

Now that I have the package, I require it as early as possible in my program:

```
require('dotenv').config()
```

And now I can have my APIKey, set in an .env file - 

```
echo "API_KEY=secure_API-key_here" >> .env

```

And if open up that file, I can see my secure API key, and it doesn't have to be situated in the other files in my repository. I'm in business! dotenv is going to look for a .env file, and when I run my the required .js file for my application, dotenv will read the .env file and make its contents available to my process as an environment variable. I can access that variable with ``` process.env.API_KEY ```  And if I add my .env file to my .gitignore file, I don't have to commit my secrets for the world to see. Keeping my keys secure, and allowing my code to function.

Again, I first game across this in the context of Glitch.me. Glitch.me by default keeps the .env file secure - so even if other users view your code, they don't have access to your secure keys. But your program still does!
Small YouTubers event London
Tags: youtube, community, creators, youtubers
Published: 2018-07-31 12:41:49

---
title: Small YouTubers event London
published: true
description: How to grow on YouTube — Small YouTubers and content creators event. Great event in London for networking and community building for small YouTubers.
tags: youtube, community, creators, youtubers
---

Small YouTubers event London

How to grow on YouTube — Small YouTubers and content creators event. Great event in London for networking and community building for small YouTubers.

YouTubers with YouTube channels from a few people to 100k, everyone was really down to earth and friendly and keen to share their experiences and ideas — also including tips on community, collaboration (collabs), sponsorship etc.

*Dont forget the bloopers at the end ;)*

**Subscribe to my YouTube channel for more videos on #opensource #github #remote #startup & #inclusion. Eddie is founder of the open source project DashboardHub. [http://youtube.com/eddiejaoude](https://youtube.com/eddiejaoude?sub_confirmation=1)**

[![YouTube](https://user-images.githubusercontent.com/624760/43819449-df97d9f4-9ada-11e8-8cb4-8a96e4192fa0.png)](https://www.youtube.com/watch?v=vir9DGEeyQ8)

*Equipment: Sony A7III, Tamron 28–75mm F/2.8 Di III RXD, Moza AirCross and iMac Pro with Final Cut Pro*

Medium post https://medium.com/@eddiejaoude/small-youtubers-event-london-cb3e391edb6d
How to drag and drop in javascript
Tags: javascript, html, css, howto
Published: 2018-07-31 09:20:02

---
title: How to drag and drop in javascript
published: true
description: We use vanillajs to create an example drag and drop to show off what is already available to you in the browser.
tags: javascript, html, css, how-to
---

{% youtube S140BC1h70Y %}
Git Strategy for Sanity
Tags: git, github
Published: 2018-07-31 08:07:36

---
title: Git Strategy for Sanity
published: true
description: Practice makes men as well as women perfect ;)
tags: #git #github
---

"Ah!! Plenty of articles here on the git, I don't want another one." - My first reaction when I reviewed this before publishing. 😜

Well, we as a team follow a predefined set of rules before committing codebase in git. I'm sharing the same over here as I find them very promising in order to maintain git sanity.

1. Your code is formatted. (let me know in comments if you are also suffering from this phobia 😧 ).
2. Don't you dare committing an erroneous code. 😈👿
3. Don't forget to update your README.md regularly with required updates on each commit. You may wish to have a look at [this article](https://dev.to/pratikaambani/a-meaningful-readmemd-565a).
4. Commit Message must start with Jira ticket number(i.e. XYZ-1234).
5. The second word of commit message must be either of (added, removed, changed, refactored, corrected).
6. Nobody commits on master and feature/parent branch.


#Extensions and Utilities:

I would strongly suggest you to configure,
- [Configure GitHub with Jenkins](https://www.fourkitchens.com/blog/article/trigger-jenkins-builds-pushing-github/), which would help you trigger automated Jenkins builds upon committing to GitHub
- [Configure GitHub with Sonar Qube](https://medium.com/devops-process-and-tools/jenkins-configuration-523f6c3d0896), which would trigger Code Review upon pushing any code in GitHub
- [GitHub with Jira](https://confluence.atlassian.com/adminjiracloud/connect-jira-cloud-to-github-814188429.html), which would help you check progress(commit logs) on Jira


#Rules while creating new Repository:
This will be default structure for any new repository to be created in Production.
![repo rules](https://thepracticaldev.s3.amazonaws.com/i/3sj045ra25p8v9vim0db.jpg)

- Master will contain only README.md
- Release will be passed via feature/parent branch only.
- feature/develop and feature/fixes will be merged into feature/parent only when the code is reviewed
- All new branches will be extension of develop branch only
- Need new Repo?: Create as much as you want, but keep em private only.
- Default collaboration: only to required people


As usual, suggestions are always welcomed. Happy Coding and may the code bless you. 😇
Write With Me (Day 8)
Tags: discuss, writewithme, dev, productivity
Published: 2018-07-31 05:00:20

---
title: Write With Me (Day 8)
published: true
description: 
tags: #discuss #writewithme #dev #productivity
---

Welcome to the 8th day of the Write With Me challenge. Earlier last week I asked the Dev.to community if they could give me the best tools tips and guides for Elixir, and it did not disappoint. 

{% link https://dev.to/matt24ray/best-resources-for-learning-elixir-467f %}

There were a lot of solid resources. Now I have a lot of work to do, and I have no excuses to not learn Elixir. I spend most of my time at DailyDrip maintaining our newsletter, but it has been so great to have support from my work and the dev community to try and learn Elixir.

Today, I needed to lowercase all the letters I had in a sentence. Typiclly I have a site that I go to that I just dump in the paragraph I need lowercased, and push a button, and voilà.

However, today was different. My gut was to accomplish the small task in an iex session. 

So, I popped open iex.


```
λ iex
Interactive Elixir (1.6.6) - press Ctrl+C to exit (type h() ENTER for help)
iex>
```

Typed in the string I needed to be lowercased and it assigned it to a variable.


```
iex> words = "These Are Words"
"These Are Words"
```

Then, I wrongly guessed to call 'String.lowercase', which didn't work.


```
iex> String.lowercase(words)
** (UndefinedFunctionError) function String.lowercase/1 is undefined or private. Did you mean one of:

      * downcase/1
      * downcase/2

    (elixir) String.lowercase("There Are Words")
```

But... Wait. Read that error again... It tells you what you probably meant to do. Awesome! Let's try downcase.


```
iex> String.downcase(words)
"these are words"
```

It works. Awesome! Thanks iex!
What is 'Senior' anyway?
Tags: senior
Published: 2018-07-31 04:47:40

---
title: What is 'Senior' anyway?
published: true
description: What makes a senior a senior? Why do we care?
tags: senior
---

After watching a video on software development career progression I thought I would share my view on career progression, which is typified by the junior, intermediate and senior labels. Is this simply a measure of years? Of leet coding skill? What magic bestows these honours?

My own view is that this is a progression of responsibility. When you begin as a coder you will usually be taken under the wing of a senior developer or team leader who will feed you specific narrow tasks that are usually not on the critical path. Your code will be examined in more depth than other developers. You might feel as a junior developer that coding is mechanical, and that your only job is to complete the small tasks assigned by your superiors. At the entry level you have almost zero responsibility. All responsibility is taken by others who are ensuring your work is correct.

Once you prove yourself as competent and the team leaders or senior developers become more comfortable with your work product some of the responsibility shifts to you. As an intermediate developer you are responsible for the quality of your work. This is not to say there are no systems to ensure quality such as unit tests, but it does become your responsibility to ensure these processes are followed and that the quality of your work is maintained. You may however still be given responsibility for small sections or in modern terms 'stories' to complete. Your responsibility may have grown, but you are not responsible for the higher level aspects of overall system architecture.

Senior developers take on new responsibilities. They take on the responsibility of mentoring and developing other developers. Sometimes this extends to team leadership, although team leadership involves more than mentoring. Senior developers also take responsibility for the overall quality of the system.

Team leaders take on further responsibilities such as project management, team communication, customer liaison and other communication functions. The team lead should be one that developers respect, who can lead through example rather than command. They have taken on responsibility for overall delivery of the product, which means finding a path between quality and efficiency.

In essence career progression is not about collecting an increasing set of arcane leet coding skills; I've known many excellent developers where skill is unrelated to experience. Rather it is about increasing responsibility, both for those working with them and for the products they are making as a whole.

Finally, as we reach the 'senior developer' area a curious thing happens; the label loses its meaning. I'm only concerned about working with good people. For me the labels are arbitrary anyway, although not totally without meaning. My goal as a team leader is to inspire my team to reach higher, to be passionate about what they do. Because intrinsic internal motivation is always far better than superficial labels.
React JS Quiz - React JS Interview Questions
Tags: react, javascript, webdev, question
Published: 2018-07-31 04:18:18

---
title: React JS Quiz - React JS Interview Questions
published: True
description: React JS Quiz - React JS Interview Questions
tags: #react #javascript #webdev #question
---

Post Link : https://www.skptricks.com/2018/07/react-js-quiz-react-js-interview.html


Today we are going to provide basic react js interview question with answer, This quiz series helps to build more understanding on reactjs and java script library for building user interfaces.

<img src="https://4.bp.blogspot.com/-284FYHG2zk4/Wz-0MxNIFmI/AAAAAAAABqQ/xLotWl10iAsrROG1c83mBOJ0yUFLUPc6gCLcBGAs/s400/quiz.jpg" />


1. We can go for keys when there is possibility that our user could change the data.
Keys
ref
both
none of above

2. JSX is typesafe.
True
False

3. React merges the object you provide into the current state using __________.
setState()
State()

4. Arbitrary inputs of components are called __________.
Keys
Props
Elements
Ref

5. _________ can be done while more than one element needs to be returned from a component.
Abstraction
Packing
Insulation
Wrapping


6. Which of the following needs to be updated to achieve dynamic UI updates?
State
Props

7. Lifecycle methods are mainly used ___________.
To keep track of event history
to enhance components
freeup resources
none of the options

<a href="https://www.skptricks.com/2018/07/react-js-quiz-react-js-interview.html"> click to check out solution </a>
Useful YouTube Channels For Engineers
Tags: youtube, learning, conferences, tutorials
Published: 2018-07-31 02:14:30

---
title: Useful YouTube Channels For Engineers
published: true
description: A list of fourteen channels and video recommendations from YouTube, useful for engineers of all levels.
tags: youtube, learning, conferences, tutorials
---

YouTube has become an awesome place to learn for engineers of all levels, but the large number of videos on every topic can both a strength and a weakness. Their free, ad-supported platform means that the only barriers to making the most of YouTube are discovering great channels and having free time, so I've made a list of the best channels I've found. I've also added an example video that I've enjoyed from each channel so you can find the channels you might enjoy as well.

Please add a comment with any great channels you know about!

- [Coding Tech](https://www.youtube.com/channel/UCtxCXg-UvSnTKPOzLH4wJaQ)
{% youtube dIiwFzFvsmw %}
- [Computerphile](https://www.youtube.com/user/Computerphile)
{% youtube XiFkyR35v2Y %}
- [Dev Day](https://www.youtube.com/user/ABBDevDay)
{% youtube 1v091LSnThE %}
- [freeCodeCamp](https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ)
{% youtube t6CBKf8K_Ac %}
- [Facebook Developers](https://www.youtube.com/user/FacebookDevelopers)
{% youtube ZCuYPiUIONs %}
- [Google Chrome Developers](https://www.youtube.com/channel/UCnUYZLuoy1rq1aVMwx4aTzw)
{% youtube X0KStP54kH4 %}
- [GOTO Conferences](https://www.youtube.com/user/GotoConferences)
{% youtube AbgsfeGvg3E %}
- [JSConf](https://www.youtube.com/user/jsconfeu)
{% youtube jUTE7lmrS70 %}
- [Layout Land](https://www.youtube.com/channel/UC7TizprGknbDalbHplROtag)
{% youtube -hmOZU7Zk10 %}
- [Microsoft Developer](https://www.youtube.com/channel/UCsMica-v34Irf9KVTh6xx-g)
{% youtube vaNObub3zlc %}
- [Mozilla Hacks](https://www.youtube.com/channel/UCijjo5gfAscWgNCKFHWm1EA)
{% youtube 5FdHqVDlXu0 %}
- [Netflix UI Engineering](https://www.youtube.com/channel/UCGGRRqAjPm6sL3-WGBDnKJA)
{% youtube f_wbCaSApFg %}
- [Traversy Media](https://www.youtube.com/user/TechGuyWeb)
{% youtube 7r4xVDI2vho %}
- [WeAreDevelopers](https://www.youtube.com/channel/UCSD0dLRGQk_T-D3RvpM5aFQ)
{% youtube arNtoWxBuXc %}
Road to AWS Certification
Tags: aws
Published: 2018-07-30 20:56:34

---
title: Road to AWS Certification
published: true
description: Entry post for series of posts about AWS
tags: [aws]
canonical_url: https://dev.to/david_ojeda/road-to-aws-certification-2438
---

I've worked with AWS at my job for around two years. I don't proclaim myself an expert or something alike, but surely I've learned a lot during this time. 

A couple of months ago I decided to commit and study to get an AWS certification- AWS Solutions Architect. That's why I'm creating a series of posts such as tutorials, guides and tips/tricks on AWS. 

There are tons of things I need to learn and deeply understand, and I think teaching them is the most effective way to learn them.

**Would love any feedback, corrections and/or suggestions on the series' posts!** Also, I'm going to re:Invent 2018 by myself, if anyone wants to hang out there feel free to talk to me!

Thanks a lot, fam! ❤️

I will be updating this post whenever I create a new post for the series.

- **IAM**

{% link https://dev.to/david_ojeda/aws-iam-pt-1---the-basics-139h %}

{% link https://dev.to/david_ojeda/aws-iam-pt-2---a-practical-example-13b6 %}

- **S3**

{% link https://dev.to/david_ojeda/aws-s3-pt-1---the-basics-55bp %}
Module Monday: Congress lookup, Pricing page, Welcome message, & more
Tags: showdev, opensource, webdev, javascript
Published: 2018-07-30 20:32:38

---
title: Module Monday: Congress lookup, Pricing page, Welcome message, & more
published: true
description: Module Monday 6
tags: showdev, opensource, webdev, javascript
cover_image: https://res.cloudinary.com/component/image/upload/v1532728419/representative_xd1jwm.png
canonical_url: https://guide.anymod.com/module-monday/06.html
---
## Free to fork or copy + use anywhere

Every Monday I post free, open-source mods you can use for quickly adding features to your website or web app.

Everything below is open source and free to use in any project you choose. [Anymod](https://anymod.com) is a service that lets you build & add mods like these easily.

Click a mod to see it in action along with its source code.

### US Representative lookup
Enter an address or zip code to see and contact your US representatives.
<a class="button" href="https://anymod.com/mod/kbmln?v=20">View mod</a>
<a href="https://anymod.com/mod/kbmln?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1532728847/representative_50_nsdmi4.gif"/>
</a>

### Pricing page
Edit plans, prices, and features easily.
<a class="button" href="https://anymod.com/mod/lrndo?v=20&h1=78&h2=100">View mod</a>
<a href="https://anymod.com/mod/lrndo?v=20&h1=78&h2=100">
  <img src="https://res.cloudinary.com/component/image/upload/v1532728393/pricing_n8gocx.png"/>
</a>

### Welcome message
Editable message for the first time visitors view your site.
<a class="button" href="https://anymod.com/mod/anork?v=20&h1=33&h2=53">View mod</a>
<a href="https://anymod.com/mod/anork?v=20&h1=33&h2=53">
  <img src="https://res.cloudinary.com/component/image/upload/v1532728393/welcome_uyd3sh.png"/>
</a>

### Hero section
Responsive section to engage visitors and communicate your message.
<a class="button" href="https://anymod.com/mod/dbona?h1=50&h2=100&v=20">View mod</a>
<a href="https://anymod.com/mod/dbona?h1=50&h2=100&v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1532728418/hero_zattw8.png"/>
</a>

### Tabbed content
Material Design implementation of simple tabbed content.
<a class="button" href="https://anymod.com/mod/modrl?h1=50&h2=50&v=20">View mod</a>
<a href="https://anymod.com/mod/modrl?h1=50&h2=50&v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1532728394/tabs_q0ce4s.png"/>
</a>

Anymod supports developers and open source, and Module Mondays are one way we give back to the developer community to help foster a more open, inclusive web. We hope you enjoy!

## Contributing
If you want to contribute mods or ideas so that other developers can benefit, you can [request mods](https://guide.anymod.com/v1/community/requests.html) or [submit a mod](https://guide.anymod.com/v1/community/contributing.html).

I'll be posting new modules [here](https://dev.to/tyrw) every Monday -- I hope you find them useful!

Happy coding ✌️
pgexercise - members
Published: 2018-07-30 19:34:11

---
title: pgexercise - members
published: true
description: Find the count of members who have made at least one booking 
tags: 
---

Been working through postgres exercises; there are some that are straight forward and others with multiple solutions. An example of this is the below.



Find the count of members who have made at least one booking 
[Question findable here](https://pgexercises.com/questions/aggregates/members1.html)


the more ineffective way to do this. (my first pass) 
```
select count(1) from cd.members 
where memid 
IN (select memid from cd.bookings 
    where slots is not null)
```

you can group them easier by checking distinct counts and doing the below. ( the distinct is a subquery)


`select count(distinct memid) from cd.bookings`.
Installing Anchore Engine on OpenShift using Helm
Tags: containers, security, openshift, helm
Published: 2018-07-30 19:11:02

---
title: Installing Anchore Engine on OpenShift using Helm
published: true
description: An article about installing the Anchore Container Security Tools on OpenShift using Helm
tags: containers, security, openshift, helm
cover_image: https://thepracticaldev.s3.amazonaws.com/i/5q1gkfeddd56qc90gl2q.png
---

Want to find out what all that hype around [Helm](https://helm.sh) is about? I've written an article about installing the [Anchore Engine](https://anchore.com) on [Red Hat OpenShift](https://openshift.com) using Helm. Up and running in just minutes and you'll be ready to secure your [Jenkins](https://jenkins.io) Container Image CICD pipeline.

https://blog.osninja.io/container-security-with-anchore-part-three/
Improve your motion
Tags: css, motion, animation, ux
Published: 2018-07-30 19:04:30

---
title: Improve your motion
published: true
description: Come on improve your motion and discovery the difference between duration and delay
tags: css, motion, animation, UX
---

If you are a front-end developer you spend a lot of time researching and trying to understand how motion works and questioning yourself what is the best technique to improve your transitions and show the content in the most fluid way to the user.

# What is motion?
Motion is the action or process of moving. At websites, a motion is present in transitions when you return a callback to the user, when he clicks something, place the mouse over an element or when a change occurs on the page.

To read more and see the examples and code, access the link below.

[article complete](https://medium.com/@elcferreira/improve-your-motion-2ae6475641ca)
Install SSL certificate with Certbot in Centos 7
Tags: certbot, centos7, apache, ssl
Published: 2018-07-30 19:01:07

---
title: Install SSL certificate with Certbot in Centos 7
published: yes
description: Install SSL Let's Encrypt/Certbot in Apache / Centos 7 
tags: certbot,centos 7,apache, ssl
---
I'm a owner of HP ML110 Gen9 running CENTOS 7, with a ccTLD.
First you need a total configured services: named, httpd, firewalld. I don`t know if you need email with same domain to get the certificate, but configure postfix and dovecot.

##Requirement 1:

You need a virtualhost, because certbot use your "domain.conf" (/etc/httpd/conf.d/domain.conf) for compare the configuration with this file.

##Requirement 2:

###-First install epel-release.
 yum install epel-release.

### -I don´t remember if you need utils, but go to install.
 yum install yum-utils

##Installing Certbot

###Install Certbot
 yum install certbot-apache
###-Run Certbot
 certbot --apache

###Setting Cerbot
-It's intuitive for configure, email for notifications, type your domain: domain.com.sv, www.domain.com.sv and cerbot configure the redirect for your site; dont skip this step!!.

##Requirement 3:
In my case certbot does not redirect well, maybe you need add this lines to .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com.sv [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}

RewriteCond %{HTTP_HOST} ^domain\.com.sv [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}    


##Requirement 4:
 service httpd restart

I still don't configure the autorenew; and maybe you already know that I'm from El Salvador, reason for my bad english :(.