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 flatten = xs => Array.isArray(xs) | |
? [].concat(...xs.map(flatten)) | |
: xs; |
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
#333333,#1E2320,#709080,#FFFFFF,#1E2320,#FFFFFF,#F0DFAF,#CC9393 | |
// https://slackthemes.net/#/dark_zenburn |
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
// idea from: https://www.youtube.com/watch?v=APUCMSPiNh4 | |
class IllegalStateError extends Error { | |
constructor(...args) { | |
super(...args); | |
} | |
} | |
class Empty { | |
size() { |
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
// from: http://book.mixu.net/node/ch9.html | |
'use strict'; | |
const fs = require('fs'); | |
const file = fs.createWriteStream('./output.txt'); | |
process.stdin.pipe(file); | |
// stdin is paused by default |
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
// from: http://book.mixu.net/node/ch10.html | |
'use strict'; | |
const http = require('http'); | |
const url = require('url'); | |
const server = http.createServer((sreq, sres) => { | |
const { pathname } = url.parse(sreq.url); | |
const opts = { |
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
openssl genrsa -out tls.key 4096 | |
openssl req -new -x509 -key tls.key -out tls.cert -days 360 -subj |
OlderNewer