I hereby claim:
- I am r24y on github.
- I am r24y (https://keybase.io/r24y) on keybase.
- I have a public key whose fingerprint is 30A3 701F A5BC ECA0 1CB4 83FE 78E2 5EF9 C8C9 76C8
To claim this, I am signing this object:
| var duration = 24*3600*1000; // 24 hours as milliseconds | |
| var halfLife = 5*3600*1000; // 5 hours as milliseconds | |
| var absorpLife = 3600*1000; // 1 hour as milliseconds | |
| var end = +(new Date()); | |
| var start = end - duration; | |
| var numSteps = 24*60; | |
| var step = duration/numSteps; | |
| var startVal = 106; | |
| var rows = []; | |
| var log2 = Math.log(2); |
I hereby claim:
To claim this, I am signing this object:
| // mounting plate thickness | |
| THICKNESS = 1.4*2; | |
| // measured from Gateron switch and DSA keycap | |
| SWITCH_WIDTH = 14; | |
| SWITCH_LIP_WIDTH = 15.65; | |
| SWITCH_LIP_THICKNESS = 0.95; | |
| SWITCH_CLIP_WIDTH = 3.8; | |
| SWITCH_CLIP_GAP = 1.4; | |
| SWITCH_CLIP_DEPTH = 0.7; |
I write a pad function fairly often, and I've never been so satisfied with an implementation as I am with this one.
Generates hipster-ish Heroku-style names.
tattooed-skateboard-3254
try-hard-wolf-3343
pop-up-cronut-4510
heirloom-mimosa-3946
| # This script is the **correct** way to allow installation and use | |
| # of npm executables without sudo. | |
| # Declare where you want your global packages installed to. | |
| npm config set prefix '~/.local/share/npm' | |
| # Ensure the directory exists. | |
| mkdir -p ~/.local/share/npm | |
| # Change `.zshrc` to `.bashrc` if appropriate, but consider instead |
A quick demonstration of how Promises work with generator functions in ES6.
$ npm i
$ node_modules/.bin/babel-node promise-test.js
Output:
imaGenerator started
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="//code.jquery.com/jquery-2.1.1.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <h1>Creating an offer using <a href="https://github.com/otalk/RTCPeerConnection">RTCPeerConnection</a></h1> | |
| <pre></pre> |
| thing1 = | |
| m_a: (list) -> | |
| console.log "Processing [#{list.join ',' }]" | |
| stream_a = new Bacon.Bus | |
| stream_b = thing2.m_b(stream_a) | |
| next = -> | |
| return unless list.length | |
| setTimeout (-> stream_a.push list.shift()), 300 | |
| stream_b.onValue (result) -> | |
| console.log "Got result #{result}" |
| // usage: node testgen.js > myFile.g | |
| // alter the below variables to taste! | |
| var ORIGIN = [0,0]; | |
| var EXTENT = 90; | |
| var NUM_LOOPS = 20; | |
| var POINTS_PER_LOOP = 100; | |
| var SPEED=20000; | |
| var MAX_HEIGHT=250; | |
| var i, theta, r, h; |