teleren/devto huggingface dataset:
Migrating Bluebird promises to native ones
Tags: bluebirdjs, promises, javascript, codecleanup
Published: 2019-05-22 13:06:27

---
title: Migrating Bluebird promises to native ones
published: true
description: Promises are now pretty solid in browsers, so we had to remove support library for promises
tags: bluebirdjs , promises , javascript, code clean up
---

We have used bluebird because it was one of the best libraries for promises. But then promises have gained support in both nodejs and browser. That was the easy catch so we planned to remove it from our code base.

The functions we were using of that library were

- [BlueBirdPromise.promisify](http://bluebirdjs.com/docs/api/promise.promisify.html)
- [BlueBirdPromise.delay](http://bluebirdjs.com/docs/api/promise.delay.html)

### Promisify

Node js ships with `util` api which provides same requirement as that of bluebird.

The method works by taking in the common error-first callback style functions and returns a promises.

```javascript
// Before

import Promise from 'bluebird';
const readFile = Promise.promisify(fs.readFile);

// After

import util from 'util';
const readFile = util.promisify(fs.readFile);
```

### Delay

Purpose of this method is to returns a promise that will be resolved with after given milliseconds. Native way to do this was to promisify setTimeout function.

```javascript
// Before

import Promise from 'bluebird';
await Promise.delay(1000);

// After

import util from 'util';
const setTimeoutAsync = util.promisify(setTimeout);
await setTimeoutAsync(null, 1000);
```
Weekly Picks #76 — Development Posts
Tags: tensorflow, javascript, html, webdev
Published: 2019-05-23 14:33:55

---
title: Weekly Picks #76 — Development Posts
published: true
tags: tensorflow,javascript,html,webdev
canonical_url: https://medium.com/daily-now/weekly-picks-75-development-posts-465ea30bd609
cover_image: https://cdn-images-1.medium.com/max/1024/1*t1ZSR7j-BUwvPPL3rbRelg.jpeg
---

> People are the most important thing. Business model and product will follow if you have the right people.

### Weekly Picks #76 — Development Posts

- [43 most popular GitHub JS repositories in May 2019](https://app.dailynow.co/r/cb883208374e13cfb192cf74ca56620d) by [Iren Korkishko](https://medium.com/u/1b826d0247a4)
- [What’s new in Javascript?](https://app.dailynow.co/r/31a5c83ef2033101cdd0b59e0ea35b0a)
- [I built Iron Man using only HTML and CSS.](https://app.dailynow.co/r/b060c4ef20e9b80aa5a3026aaa789f87) by [Lucas Chen](https://medium.com/u/fdb20fb36102)
- [CSS Scan 2.0 — ⚡️ The fastest and easiest way to inspect or copy CSS](https://app.dailynow.co/r/48c5126b3e90e6201a067c1b289317bb)
- [[Translation] So you know HTML/CSS? Learn from scratch or improve yourself](https://app.dailynow.co/r/290b60cca8a29d847b902bd5d1647a23)
- [Almighty — Powerful configurations for macOS](https://app.dailynow.co/r/f670d2d28aa1896bae4540a364d0dbb0)
- [The Bible of The Best Node.Js Frameworks](https://app.dailynow.co/r/ca4495473d45bb67d7cd3e1622086a73)
- [Handtrack.js: Hand Tracking Interactions in the Browser using Tensorflow.js and 3 lines of code.](https://app.dailynow.co/r/5b58c803bf9991e18edffaf3a0337072) by [Victor Dibia](https://medium.com/u/304fe0310a13)
- [Shared Components Best Practices for 2019](https://app.dailynow.co/r/426a063e46c597dd9090fd050b852858) by [Jonathan Saring](https://medium.com/u/c9a6ef212193)
- [CSS can do that?](https://app.dailynow.co/r/2bad7e849092afceb2e834342b540dba)

* * *

[_Thanks to Daily_](https://www.dailynow.co/) _developers can focus on code instead of searching for news. Get immediate access to all these posts and much more just by opening a new tab._

[![](https://cdn-images-1.medium.com/max/1024/1*7bwIhcH467BKX5Ni8XWpQg.jpeg)](https://www.dailynow.co/)
ES6: Template Strings
Tags: es6, frontenddev, javascript
Published: 2019-05-22 13:34:25

---
title: ES6: Template Strings
published: true
tags: es6,front-end-developmen,javascript
canonical_url: 
---

ES6 introduced a new syntax for strings called “template string”s or “template literals.” Template strings are not just a cool new way to write strings. They come with new features as well.

Let’s take a look at the ES5 string and refactor it using a template literal.

```
// ES5 string
let myName = 'Tony Nguyen'
```

To create a template literal, just use the backtick(`) character instead of the single or double quotes. The backtick the same key as the ~ key usually below the escape key.

```

// ES6 template string
let myName = `Tony Nguyen`

```

It really is that simple. Now that you know how to write a template string let’s take a look at some of the things you can do with template strings.

### String Concatenation

In ES5, in order to concatenate a string you would have to write code that would look like this:

```
// ES5
function printName(fName, lName) {
  return 'Hi '+ fName + ' ' + lName + '!';
}

printName('Arnold','Schwarzenegger'); // "Hi Arnold Schwarzenegger!"
```

The printName function above is long and prone to error. I will often times have to write out the return more than once because I forgot to add a space or the plus sign.

With template strings you can easily concatenate a string in one line. This is because template strings can take in any valid JavaScript expression.

```
function printName(fName, lName){
  return `Hi ${fName} ${lName}!`
}

printName('Arnold','Schwarzenegger'); // "Hi Arnold Schwarzenegger!"
```

Since template strings can take in any valid JavaScript expression, you can do in-line math with template strings.

```
let bench = 440;
let squat = 545;
let deadlift = 710;

console.log(`Arnold has a combined ${bench + squat + deadlift} lbs with his big three lifts.`);

// Arnold has a combined 1695 lbs with his big three lifts.
```

### Multi-line Strings

Multi-line strings are also easily made with template strings. In ES5, there were a number of workarounds that would help create multi-line strings but, with template strings, you can just add a new line into the string.

```
// ES5
let greeting = "Hello \nWorld!"

// ES6
let greeting = `Hello
World!`
```

Voila, you have created a string with a new line in it.

This has been a very basic overview of template strings. As you can see, they are a great new syntax that will save you time and frustration when you are working with strings. However, you can do a lot more with them than the examples I have shown above, such as [tagged templates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates). You can learn more about template strings [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals).

* * *
How to automate your Git workflow
Tags: npm, node, git, github
Published: 2019-05-22 12:36:51

---
title: How to automate your Git workflow
published: true
description: A step by step guide to use gitesy
tags: npm, node, git, GitHub 
---

<h1>GITESY</h1>
A node js based cli that can automate your git workflow!!
<center>
<img src="https://thepracticaldev.s3.amazonaws.com/i/kiyjjf11n7sq1q4kfnel.png" />
</center>

Gone are the days when you had to manually create the git repo both locally and remotely.

Now you can create the repo both locally and remotely in 3-4 clicks using <b>"gitesy"</b> 


## Installation

Type this in your command prompt/terminal

```
npm i gitesy -g
```

please note - Install this as a global package otherwise this may not work as expected

---

## Usage 

### Create a new repo
- To create a local and remote repo use gitesy -n command with the name of the repo
  ```
  gitesy -n test
  ```

- After which if you are using this for the first time you will see a prompt for entering your credentials like this
  <img src="https://thepracticaldev.s3.amazonaws.com/i/7iuy5c2sgbb0r0em0d2x.png" />

  Enter them and then you will get prompts asking details of the repo fill them and then it will automatically create the repo. Then you will get the message and start working on the project !!!!
  
 - If you are not using this for the first time you will see a prompt asking whether gitesy can use creds you entered previously
<img src="https://thepracticaldev.s3.amazonaws.com/i/gpz7871kp5p2ec0dn151.gif" />
It's very easy to create a new repo and start coding. I also added the none option too, just for creating an empty git repo both locally and remotely.

### Add a new template
- To Add a template create a template add the features and then use this command from the same directory
  ```
  gitesy -a <nameOfTheTemplate>
  ```
  ![create template demo](https://thepracticaldev.s3.amazonaws.com/i/f3ob1o27x6igr0p09urs.gif)


---

## Epilogue 
You can contribute to this project [here](https://github.com/ram2510/gitesy)

Things you can do 
- fix typos
- add more general templates

Please give me your suggestions they are valuable to me.

Visit the npm page for gitesy [here](https://www.npmjs.com/package/gitesy)

If you like this npm package please share it so that we can make this a better package with suggestions. Thank you !!!!

You can connect with me here at <a href="https://twitter.com/ram2510_" target="_blank">twitter  </a> or <a href="https://www.linkedin.com/in/ram2510/">LinkedIn.</a>
Strong Will to Own Your Content in Era of Platforms
Tags: discuss
Published: 2019-05-22 12:17:22

Do anyone strongly willing to have a personal website owning all of content and how it displays?

I do want to. Something inside of me constantly resists to go all in on social media websites. I have hard time realizing that most of the content will be buried forever in a couple of days.

Do anybody can relate to what I am saying?

And the problem is that it's hard to compete with popular platforms for readers attention.

What do you think about this topic?
What Developers Should Ask in QA Interview
Tags: discuss
Published: 2019-05-22 11:05:50

---
title: What Developers Should Ask in QA Interview
published: true
description: 
tags: discuss
---
So I been started to ask to be part of the interview process for new possible new QA resources. As a developer what type of questions do you ask? I mean the person is already be asked QA type questions but the other QA people that are interviewing that person. But I was wondering what type of questions other devs ask.
Summer Internship Program 2019 @ Vibrant Academy 
Tags: iit
Published: 2019-05-22 09:54:37

Colleges are being closed because of summer vacation start, don’t waste your precious time. It’s time not for play or not for fun. Students’ life is very rich life to make your career. So utilize your summer vacation. Join summer vacation courses. Having regarded to summer vacation Vibrant Academy is going to organize a summer Internship program at the campus. Vibrant Academy is the best Kota Coaching Classes for the summer internship program. The institute is providing an opportunity to gain real-world experience. It is very useful for MBA and B.Tech students. We will offer 1 or 2 months of only workshop. The workshop is going to held on Kota campus. This is a golden opportunity for those who want to utilize their summer vacation. In this vacation, we will take care of your career and your rich time. We always ready to serve the best result for students. Vibrant Academy is India’s Best IIT JEE Coaching in India. The institute provides one class education at campus. One another thing I want to tell you if in this workshop we will offer your stipend also. There is no bar for deserving students and stipend will be provided based on candidate performance.  Vibrant Academy is famous for IIT Coaching in India. The uniqueness of this workshop-
•	We will provide Practice test 
•	We provide separate classes for this workshop
•	We give training by Experienced Faculty of the Institute
•	We will provide comprehensive Study Material 
•	We will clear all doubt of any topic
We will increase the professional skills as well as educational skill with this workshop. Students who are studying at MBA from top B- Schools or B.Tech from top IIT’s and NIT’s are eligible for this workshop. The workshop duration is 1 or 3 months. We will provide internship from Information technology (IT), operation, Marketing and Academics branch. You can apply online for this workshop by filling the registration form. If you want to get more information about this workshop or Vibrant Academy to contact us - 6377791915, 0744-2778899
Also, visit our website- 
Visit Here- www.vibrantacademy.com
Apply Online- https://form.jotform.me/91354025895462
How I Combine my Work (Outlook) and Personal (Google) Calendars
Tags: productivity, outlook, google, calendar
Published: 2019-05-26 02:36:25

---
title: How I Combine my Work (Outlook) and Personal (Google) Calendars
published: true
tags: Productivity,Outlook,Google,Calendar
canonical_url: https://seankilleen.com/2019/05/combining-calendars-across-outlook-and-google/
---

This came up in a conversation and I realized my methods might be helpful for someone. I figured I can write it up with step-by-steps here.

## Background / Goals

* I have a work calendar, via Outlook
* I have a personal calendar, using Google
* I want to overlay my work calendar in google so that I see work obligations when considering personal plans
* Similarly, I want to have access to my personal calendar from work so I don't agree to teach a training class during a family visit, etc.

## Getting Work Events into Google Calendar

The easiest way I've found so far to do this on Windows is to use [Outlook Google Calendar Sync --  a free, OSS app](https://phw198.github.io/OutlookGoogleCalendarSync/). It sits in my system tray and does a sync from Excella --> GCal since that's how I have it set up. I sync my Excella calendar to a Google calendar called "work" that I the  overlay with my personal calendar in Google Cal. 

**NOTE**: This app has to be open and running somewhere in order to sync the changes. I have an idea of porting ame of this code to use Azure functions on a timer so that it won't be tied to a machine / tray app.

## Getting Personal Events into Outlook

If you want the reverse and want to overlay your personal calendar in your outlook, you can do that with google calendar too. 

* Go into google calendar settings
* Scroll into "Integrate Google Calendar" section
* Copy the "secret address in iCal format"
* Go into your outlook account settings
* Go to the "internet calendars" tab
* Hit new & paste the URL

## How do You Accomplish This?

Your turn, dear reader! I'm very interested to hear other ways you've solved this problem, and whether you'd find a free/OSS cloud sync project beneficial. Sound off in the comments!
Custom aws cloudwatch monitoring ideas required
Tags: help
Published: 2019-05-22 08:56:32

---
title: Custom aws cloudwatch monitoring ideas required
published: true
tags: help
---

Exectation: I am trying to monitor the docker containers running on EC2 instance. For a simple use case, This is what I tried. Getting the number of container running in the machine using the simple bash script given bellow.

I will run this once working fine on cronjob such that it will count the container running and send the data to cloudwatch, every time it runs.

```
result=$(docker ps --format "{{.Names}}" | wc -l)
 aws cloudwatch put-metric-data --metric-name "Container running $result/6" --unit Count --value "$result" --dimensions Total-Container=$result --namespace System/Docker
```
![](https://thepracticaldev.s3.amazonaws.com/i/x9076ripysfux2szdp8l.png)

It might be the expected cloudwatch behavior but how do I track the latest one in the graph.
Looking for open source project to contribute
Tags: opensource, git, github, beginners
Published: 2019-05-22 08:49:53

---
title: Looking for open source project to contribute
published: true
description: 
tags: open source, git, github, beginner
---

Hey guys, I'm a front end developer looking to do his first open source contribution, my main problem is looking for projects to start with since I work for only 9 months and I've been coding for last year and a half. If any of you have some open source project you need help with or know for some project that needs contributors feel free to comment down below and I'll check it out, hopefully, this will be useful for more developers than just me.
C Programming Language
Tags: cprogrammingonline, conlinetraining
Published: 2019-05-22 08:39:07

What Is C Language?
C is a Computer Programming Language.  It us machine - independent, structured programming language which is used extensively in various applications.  C was the basics language to write everything from operating systems to complex programs like the Oracle database, Python interpreter, Git and more.

C language was introduced by  Dennis Ritchie in 1960.  C is a compiled language that once you write C program, must run it through a C compiler to turn your program into an executable that the computer can run.  

What Are The Features of C language?
C is  a portable: this means that programs once written can be run on another machines.
A C program is a collection of functions that are supported by C library.
C language is the most widely used language in embedded systems and  operating systems.
C is many time faster than BASIC.
 C its ability to extend itself.
C is a robust language with  set of built-in functions and operators that can be used to write any complex program.
In C Programs are written fast and efficient. This is due to its variety of data type and powerful operations.
The C compiler combines the capabilities of an assembly language with features of a high-level language.
Where is C used? Key Applications
C is used for compiler production
C is widely used in IOT applications
It is used for developing system applications
C is used to develop  MySQL is the most popular database software which is built using C programming language
It is widely used for desktop applications
C is widely used for developing browsers and their extensions
C programming language  is used to develop the most of applications.
Why To Learn C?
C is a basic language for many programming languages.  C as the main language will play an prominent role while studying other programming languages. C can be used widely various applications and provides faster execution.  There are many jobs available  for a C developer in the current market.
My daughter was hit in the face
Tags: dailywriting
Published: 2019-05-22 15:05:34

---
title: My daughter was hit in the face
published: true
tags: daily-writing
canonical_url: https://marcusblankenship.com/my-daughter-was-hit-in-the-face/
---

My 23-year-old daughter, Maggie, has a scar above her right eye.

She was hit in the face,

by a guy with a golf club.

 

She dropped like a rock,

blood streaming down her dress.

My wife screaming.

I was frozen, stunned.

 

I bent to help her,

still holding the club.

 

I have a careless backswing,

during putt-putt mini golf,

on Maggie’s 8th birthday.

 

I didn’t intend to hurt anyone,

but intentions often don’t matter.

The scars remain.

 

Be careful with your backswing,

and other unintended consequences of your powerful actions.

 

When you falter, which we all do, bend to help.

Apologize, and don’t pretend scars won’t remain.

 

Take care,

Marcus

The post [My daughter was hit in the face](https://marcusblankenship.com/my-daughter-was-hit-in-the-face/) appeared first on [Marcus Blankenship](https://marcusblankenship.com).
Next with Ant Design and React Spring 
Tags: react, nextjs, reactspring
Published: 2019-05-22 07:46:54

---
title: Next with Ant Design and React Spring 
published: true
description: 
tags: React, Next.js, React Spring
---

Hello people! I have been playing around with Next in combination with Ant Design and React Spring animation library, so i would to start a series where i will practice it while creating fancy website. In the next couple of articles i will be trying to create portfolio for myself from scratch.

I would like to hear your best practices, ideas, criticism, etc, so feel free to share in the comments whatever is on your mind. ;)

Part 1: Setting up environment
https://medium.com/@aleksandar.v.rajic/setting-up-next-with-ant-design-and-react-spring-d4b4dd71ad6c
Running machine code in Nim
Tags: replit, nim, jit, machinecode
Published: 2019-05-22 06:05:51

---
title: Running machine code in Nim
published: true
tags: replit, nim, jit, machinecode
---

Just a small experiment to run x86-64 machine code in Nim, essentially this is a tiny JIT loader.

{% replit @eterps/nimmachinecode %}
Looking for tips before going open source...
Tags: opensource, sideprojects, discuss
Published: 2019-05-22 05:54:11

I have my side-project that I am working on for a while now.
I am the only developer on this project and I think the community might be interested to give back and contribute so I'm thinking about going open source. 🤔

This is my first time doing this move and I am looking for the best tips from all of you who can share their experience (such as the DEV team themselves 😜).


Thanks!
Feeling too comfortable 👟 - time to go remote?
Tags: discuss, career
Published: 2019-05-22 05:44:12

Hello everybody! Web dev reporting in from Denmark. 

I'm in the situation that I'm feeling too comfortable in my current situation. I have had the same job for 2.5 years now. A job that allow me to work with my preferred tech stack and which allow for remote work - two important factors in my opinion. Furthermore I have a short commute by car from my house that lies in the same city as my work. Everything is very convenient. 

For the majority of people that might be a good situation to be in. However as a developer, we do have the option to work from any location. This option could unlock a new and exciting daily life. The ability to explore new countries, cities, people and places while getting work done could be a way to get out of that comfort zone.

A few factors to consider as I see it:

The trip could hurt one's productivity. A few examples on top of my head that may have influence: 
- Struggle to find reasonable places to stay
- Feel like exploring rather than working

Timing is an important factor as well I reckon. Going abroad to work remote with a wife and kids at home can result in a complicated situation (Not relevant in my case).

<img src="https://thepracticaldev.s3.amazonaws.com/i/donmuo35971b1zckvn77.png" width="200" height="150" />


Anyone else had the same feeling of "feeling too comfortable"? 
If so, did you do anything about it? If so, did you decide to travel around the world and do something completely different to mix up your daily life?


If anyone is currently living the digital nomad lifestyle, feel free to share tips with everyone, would be much appreciated ✌️