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
mux () { | |
# tmux helper function | |
templates="/home/ron/.teamocil/" | |
if [ -z $1 ] | |
then | |
echo "Sessions:" | |
tmux ls | |
echo "" | |
echo "Templates:" | |
ls $templates |
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
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
apt-cache policy docker-ce | |
sudo apt-get install -y docker-ce | |
sudo systemctl status docker | |
addusertogroup |
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 | |
clip() { | |
# sync clipboards | |
xclip -o | xclip -sel clip | |
# print to stdout | |
xclip -o | |
} |
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 | |
length=256 | |
bits=() | |
prvk="" | |
pubk="" | |
mnemonic="" | |
# collect coin flips | |
function getBits() { |
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
// listen for post message | |
// you will need to attach the listener to window instead of document for this to work | |
window.addEventListener("message", injectHandler, false); | |
// handle the update | |
function injectHandler({ data }) { | |
if (data.action === 'injectGlobal') { | |
let { scope, key, value } = data.payload; | |
config[scope][key] = value; |
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 withConstructor = constructor => o => ({ | |
__proto__: { constructor }, | |
...o | |
}); | |
const mix = (...fns) => x => fns.reduce((y, f) => f(y), x); | |
const canMove = o => { | |
return { | |
...o, |
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
window.postMessage({ action: 'injectGlobal', payload: { scope: 'general', key: 'startText', value: 'startx' }}, "*") |
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
{ | |
"deploy": { | |
"subdomain": "testphaser.withkoji.com", | |
"frontend": { | |
"output": "dist", | |
"commands": [ | |
"npm install", | |
"export NODE_ENV=production && npm run build" | |
] | |
} |
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
// https://dzone.com/articles/300-ms-click-delay-and-ios-8 | |
// https://patrickhlauke.github.io/touch/tests/results/ | |
// https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure | |
<button>Click</button> | |
<p style="color: black;">Delay was <span></span> milliseconds.</p> | |
<script> | |
var button = document.querySelector("button"), | |
span = document.querySelector("span"), | |
delay; |
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
overview: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Optimizing_canvas | |
garbage collection: http://buildnewgames.com/garbage-collector-friendly-code/ | |
bitwise optimizations: https://galactic.ink/journal/2011/11/bitwise-gems-and-other-optimizations/ | |
perf: https://developers.google.com/web/tools/chrome-devtools/rendering-tools/ |