Skip to content

Instantly share code, notes, and snippets.

@jdherg
jdherg / dance_model.js
Created June 25, 2015 15:16
Contrapositive 20150624 Progress
var tau = 2*Math.PI;
var Hands4 = function(center, radius, dance) {
this.center = center;
this.radius = radius;
this.dancers = [];
this.dance = dance;
};
@jdherg
jdherg / index.html
Last active August 29, 2015 14:23
Double Binary Bouncers
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.orbiter {
fill: #000;
}
.orbit {
fill: none;
@jdherg
jdherg / index.html
Created June 21, 2015 23:30
Simple Binary Orbit
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.orbiter {
fill: #000;
}
.center {
fill: #CCC;
import sys
def calc_weight(c, m):
return sum(
[c_i * (m_i + 100) for m_i, c_i in zip(m, c)])
def main():
if len(sys.argv) < 1:
@jdherg
jdherg / keybase.md
Last active August 29, 2015 14:07
Keybase Proof

Keybase proof

I hereby claim:

  • I am jdherg on github.
  • I am jdherg (https://keybase.io/jdherg) on keybase.
  • I have a public key whose fingerprint is CB74 0D88 F0AD 0F0B 9DB1 0F20 9DBE ACA5 EA1F 19A7

To claim this, I am signing this object:

@jdherg
jdherg / README.md
Last active December 23, 2015 15:29
XOXO Attendee Trie

It's been so fun to see all of the unique names at XOXO2013 but also to see the overlap (There are 18 Chris's registered!). The experience inspired me to generate a prefix tree (or trie) from the first names of the attendees and put them into a tree visualizer (that I pulled from one of Mike Bostock's d3.js examples: http://bl.ocks.org/mbostock/4339607 ). You can see it online at http://bl.ocks.org/jdherg/6655943 . For fun, I've also uploaded a list of all of the first names unique-ified and sorted by count.