Skip to content

Instantly share code, notes, and snippets.

@waggertron
waggertron / gist:5a57a584f876d49b6b92b02e1fc9a18d
Created December 8, 2016 07:01 — forked from dburger/gist:1008320
Javascript Array Binary Heap
/*
array implementation of a binary heap, example usage:
// can optionally provide a comparison function, a function for a max
// heap is the default if no comparison function is provided
var bh = binaryHeap();
bh.push(5);
bh.push(34);
bh.push(16);
var max = bh.pop(); // 34
@waggertron
waggertron / introrx.md
Created November 9, 2016 03:15 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@waggertron
waggertron / introrx.md
Created November 9, 2016 03:15 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@waggertron
waggertron / destructuring.js
Created October 18, 2016 18:09 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];