made with esnextbin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function readHugeData() { | |
readHugeData.promise = readHugeData.promise || asyncCallAsPromise(); | |
return readHugeData.promise; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* common react, redux staff here | |
*/ | |
import {Router, createRoutes} from 'react-router'; | |
import createBrowserHistory from 'history/lib/createBrowserHistory'; | |
import rawRoutes from './routes'; | |
import store from './store'; | |
function mixStoreToRoutes(routes) { | |
return routes && routes.map(route => ({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function someAction({x, y, z}) { | |
console.log('x:', x); | |
console.log('y:', y); | |
console.log('z:', z); | |
} | |
someAction({ | |
y: 1, | |
z: 2 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// nested | |
callA().then(function () { | |
return callB().then(function () { | |
return callC() | |
}); | |
}); | |
// equivalent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var gutil = require('gulp-util'); | |
var fs = require('fs') | |
var files = { | |
js: { | |
src: 'path to src', | |
dst: 'path to dst' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function пше () { | |
case $1 in | |
курва ) | |
shift; | |
git commit $@;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
int MOTOR_PIN = 9; | |
int MIN = 1000; | |
int MAX = 2000; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> ./open-remote.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('davy'); | |
//get user as promise | |
function getUser() { | |
return new Promise(function (resolve) { | |
setTimeout(function () { | |
resolve('user name'); | |
}, 1000); | |
}); | |
} |
NewerOlder