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 test = [1,2,3,4]; | |
const processors = [ | |
x => x * 2, | |
x => x * 3, | |
x => x * 4, | |
x => x * 5 | |
]; | |
const zipFn = test.map((e, idx) => processors[idx](e)); |
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* Stigmerge() { | |
const stage = { | |
fun: 'return "Welcome to " + a', | |
params: ['a'], | |
payload: ['wtf'] | |
} | |
while(true) { | |
if (stage.params === 'stop') return 'Thx for watching'; | |
const worker = new Function(...stage.params, stage.fun) |
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* formGen() { | |
let name, surename, date; | |
nameLabel: | |
while (true) { | |
name = yield('Enter name'); | |
if (name === 'cancel') return; | |
surenameLabel: | |
while (true) { |
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
#!/usr/bin/env bash | |
# install docker | |
# https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# install docker-compose | |
# https://docs.docker.com/compose/install/ | |
# install letsencrypt | |
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 |
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
$ cat response | |
HTTP/1.1 200 OK | |
Date: Tue, 28 Mar 2017 23:05:59 GMT | |
Pragma: no-cache | |
Content-Type: application/json | |
Expires: Sat, 01 Jan 2000 00:00:00 GMT |