Skip to content

Instantly share code, notes, and snippets.

<svg width="600" height="400" xmlns="http://www.w3.org/2000/svg">
<defs>
<style>
.title { font: bold 28px -apple-system, BlinkMacSystemFont, sans-serif; fill: #1a1a1a; }
.name { font: 24px -apple-system, BlinkMacSystemFont, sans-serif; fill: #1a1a1a; }
.status { font: 18px -apple-system, BlinkMacSystemFont, sans-serif; fill: #666; }
.dragging { opacity: 0.8; }
</style>
</defs>
@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 {