Skip to content

Instantly share code, notes, and snippets.

@ivtpz
ivtpz / .block
Created May 21, 2017 07:00
fresh block
license: mit
@ivtpz
ivtpz / .block
Last active May 21, 2017 14:59
Updating directed graph
license: mit
@ivtpz
ivtpz / .block
Created May 21, 2017 06:55
fresh block
license: mit
@ivtpz
ivtpz / .block
Last active May 21, 2017 06:59
Spinning graph
license: mit
@ivtpz
ivtpz / .block
Created May 21, 2017 06:16 — forked from mbostock/.block
Connected Particles
license: gpl-3.0
@ivtpz
ivtpz / fakeReact.js
Created March 4, 2017 17:59
Using ES6 arrow functions and higher order functions to make life easy in React components
// NOTE - this will only run with Babel preset Stage-0 (experimental features)
// Arrow functions as methods is still an experimental Babel feature
// EXAMPLE 1 - Using bind and multiple update functions
class Parent {
constructor() {
this.state = {
name: 'No name yet',
email: 'No email yet'
}
@ivtpz
ivtpz / BST.js
Last active January 4, 2017 23:48
Start of a JavaScript Binary Search Tree
class BST {
constructor(value) {
this.root = new Node(value);
}
insert(value) {
var recurse = function(node) {
if (value < node.value) {
node.left ? recurse(node.left) : node.left = new Node(value);
} else {