Skip to content

Instantly share code, notes, and snippets.

Dan Zajdband impronunciable

View GitHub Profile

Minimum Viable Async with Node 6

With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.

This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async + await.

The promise

View html2canvas.js
* @author mrdoob /
function html2canvas( element ) {
var range = document.createRange();
function getRect( rect ) {
rauchg /
Last active Jun 19, 2017
Writing ES6 today, effectively.

Effective transpiling of ES6

After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.

I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.

The main tool

When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on:

zenorocha / .hyper.js
Last active May 29, 2020 — forked from millermedeiros/
Setup macOS Sierra (10.12)
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
tj / gist:5326925
Created Apr 6, 2013
npm-search results
View gist:5326925
λ npm-search (master): time ./query express > /dev/null
real 0m0.488s
user 0m0.162s
sys 0m0.027s
λ npm-search (master): time npm search express > /dev/null
real 0m3.639s
user 0m1.989s
sys 0m0.171s
soplakanets / password.js
Created May 19, 2011
Password hashing for node.js
View password.js
var crypto = require('crypto');
var SaltLength = 9;
function createHash(password) {
var salt = generateSalt(SaltLength);
var hash = md5(password + salt);
return salt + hash;
You can’t perform that action at this time.