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 array = [1, 2, 3, 4, 5] | |
const fetchData = i => { | |
console.log(`fetching ${i}...`) | |
return new Promise(resolve => | |
setTimeout(() => { | |
console.log(`finished ${i}`) | |
resolve() | |
}, 1000) | |
) |
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
➜ market-shopfront-api git:(master) ✗ while true; do time ./node_modules/.bin/tsc; sleep 2; done | |
./node_modules/.bin/tsc 3.56s user 0.19s system 177% cpu 2.105 total | |
./node_modules/.bin/tsc 2.81s user 0.14s system 189% cpu 1.556 total | |
./node_modules/.bin/tsc 2.64s user 0.14s system 191% cpu 1.453 total | |
./node_modules/.bin/tsc 2.53s user 0.14s system 182% cpu 1.458 total | |
./node_modules/.bin/tsc 2.69s user 0.14s system 188% cpu 1.497 total | |
./node_modules/.bin/tsc 2.77s user 0.16s system 179% cpu 1.632 total | |
./node_modules/.bin/tsc 2.62s user 0.14s system 186% cpu 1.476 total | |
./node_modules/.bin/tsc 2.59s user 0.14s system 187% cpu 1.456 total | |
./node_modules/.bin/tsc 2.90s user 0.16s system 188% cpu 1.623 total |
browser side rendering of json resume https://github.com/jsonresume
template: https://github.com/jsonresume/jsonresume-theme-boilerplate
based on example from: https://github.com/cultofmetatron/jquery-autobars
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
sudo -v | |
brew install dnsmasq nginx | |
echo "address=/test/127.0.0.1" > /usr/local/etc/dnsmasq.conf | |
vim /usr/local/etc/nginx/nginx.conf | |
vim /usr/local/etc/nginx/servers/market-shopfront.conf | |
tee /usr/local/etc/nginx/nginx.conf > /dev/null << EOF | |
#user nobody; |
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 loadUserRequest = { type: 'loadUserRequest' } | |
const loadUserSuccess = (user) => ({ type: 'loadUserSuccess', payload: user }) | |
const loadUserFailure = (err) => ({ type: 'loadUserFailure', err }) | |
const loadPostsRequest = { type: 'loadPostsRequest' } | |
const loadPostsSuccess = (posts) => ({ type: 'loadPostsSuccess', payload: posts }) | |
const loadPostsFailure = (err) => ({ type: 'loadPostsFailure', err }) | |
const loadUser = () => { | |
return (dispatch) => { |
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
ps aux | grep node | awk 'FNR > 1 {print $2}' | xargs kill -9 |
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
#!/bin/bash | |
set -e | |
# /opt/boxen/nodenv/versions/4.4.4/bin/node | |
NODE_BIN_DIR="$(nodenv which node)" | |
# /opt/boxen/nodenv/versions/4.4.4/lib | |
NODE_LIB_DIR="${NODE_BIN_DIR%%bin*node}lib" |
NewerOlder