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 wait = (ms) => | |
new Promise((resolve, reject) => { | |
if (Math.random() > 0.5) { | |
return reject('NOPE!'); | |
} | |
setTimeout(() => { | |
resolve('Done!'); | |
}, ms); | |
}); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/** | |
* Once this is running open your browser and hit http://localhost | |
* You'll see that the request hits the proxy and you get the HTML back | |
*/ | |
'use strict'; | |
const net = require('net'); | |
const http = require('http'); |
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
--no-group | |
--color | |
--ignore-directory=is:node_modules | |
--ignore-file=is:Markserv.log | |
--ignore-file=is:npm.debug.* | |
--type-set=css:ext:less | |
--type-set=css:ext:scss |
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
module.exports = { | |
"AWS": { | |
"Region": "us-east-1", | |
"ClientId": "304laiduvj1ld6ls8s2lsjfipa", | |
"UserPoolId": "us-east-1_aaksjfhTo", | |
"IdentityPoolId": "us-east-1:018b7af4-9384-8afe-019d-013cc0192d001", | |
"LoginEndpoint": "cognito-idp.us-east-1.amazonaws.com/us-east-1_aaksjfhTo" | |
} | |
} |
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
enum FailExits { | |
ologn, | |
nochop | |
} | |
let exit = FailExits.ologn | |
let iterCount:number | |
let maxIterations: number | |
const compare = (target: number, ary: number[], start: number, end: number): number[] | number | boolean => { |
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
{ | |
"title": "Caps Move Vim", | |
"rules": [ | |
{ | |
"description": "Change Capslock + H/J/K/L to Arrow Keys", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "i", |
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
const crypto = require('crypto') | |
const sha1 = path => new Promise((resolve, reject) => { | |
const hash = crypto.createHash('sha1') | |
const rs = fs.createReadStream(path) | |
rs.on('error', reject) | |
rs.on('data', chunk => hash.update(chunk)) | |
rs.on('end', () => resolve(hash.digest('hex'))) | |
}) |
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
/** | |
* Carlton Quadtree | |
* - A Quad Tree implementation in ESNext | |
* - Alistair MacDonald (f1lt3r) | |
* - MIT License | |
* | |
* Demos: http://f1lt3r.github.io/carlton-quadtree | |
* | |
* Example: | |
* |
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
const blinkOn = '\x1b\x5b\x35\x6d'; | |
const blinkOff = '\x1b\x5b\x30\x6d'; | |
const scrubSeq = '\x1b\x5b\x44'; |