This file contains hidden or 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 hash = { | |
a: 1, | |
b: 1, | |
c: 1, | |
d: 1, | |
e: 1, | |
g: 1, | |
h: 1, | |
j: 1, | |
k: 1, |
This file contains hidden or 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); | |
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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: | |
* |