Skip to content

Instantly share code, notes, and snippets.

Chris Dickinson chrisdickinson

Block or report user

Report or block chrisdickinson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View deps
// my npm dep tree (fake, made of lies)
├─┬ mydep@A.B.C
│ └── bluebird@X.Y.Z
└── bluebird@M.N.O
View promises-promises.js
// my problem: (with a bit of handwaving here — imagine that each step is
// _actually_ async)
function doAThing() {
return new Promise(resolve => { // A
setTimeout(resolve, 100, Math.random())
}).then(randomNum => { // B (derived from A's result)
return randomNum * Math.random()
}).then(superRandomNumber => { // C
return superRandomNumber * originalRandomNumber
// where "originalRandomNumber" === "randomNum" from A
View Dockerfile
FROM ubuntu:14.04
RUN apt-get update && apt-get -y install wget build-essential
RUN apt-get install -y tree
RUN wget
RUN wget
RUN wget
RUN wget

Keybase proof

I hereby claim:

  • I am chrisdickinson on github.
  • I am chrisdickinson ( on keybase.
  • I have a public key whose fingerprint is 9554 F04D 7259 F041 24DE 6B47 6D5A 82AC 7E37 093B

To claim this, I am signing this object:

chrisdickinson /
Last active Aug 29, 2015
timers for runtime.js


Timers (setTimeout and friends!) for RuntimeJS.

var timers = require('runtime-timers')


setInterval(function() {
View this-isnt-even-my-final-form.js
console.log((function (ctxt) {
cats: {
with(ctxt) {
try {
return cats
} finally {
break cats
View knode.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:7479719
d = new Date(); new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1, +time.split(':')[0], +time.split(':')[1], +time.split(':')[2]) - +d
chrisdickinson / backing.js
Created Nov 4, 2013
backing code for examples.
View backing.js
// transform an element + eventName into
// a stream of those DOMEvents over time.
function events(element, eventName, selector) {
var lastEvent
, nextRead
element.on(eventName, selector, onevent)
return {read: read}
You can’t perform that action at this time.