Skip to content

Instantly share code, notes, and snippets.

View jhaubrich's full-sized avatar

Jesse Haubrich jhaubrich

View GitHub Profile
@jhaubrich
jhaubrich / a_chart.js
Created August 9, 2012 15:52
multiline chart using nvd3's preferred json structure
var chart = d3.select("#chart").append("svg")
.attr("width", w)
.attr("height", h)
.append("g")
.attr("id", "plotarea")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")")
// DRAW DATALINES
path = chart.selectAll("path.dataline")
.data(data)
@jhaubrich
jhaubrich / index.html
Created August 2, 2012 15:38
Thinking Without Joins
<html>
<head>
<title>not a line chart</title>
</head>
<body>
<script src="http://d3js.org/d3.v2.js"></script>
<script>
var data =
[
@jhaubrich
jhaubrich / index.html
Created August 2, 2012 01:56
not a line
<html>
<head>
<title>not a line chart</title>
</head>
<body>
<script src="http://d3js.org/d3.v2.js"></script>
<script>
var data =
@jhaubrich
jhaubrich / index.html
Created August 2, 2012 01:43
not a line chart
<html>
<head>
<title>not a line chart</title>
</head>
<body>
<script src="http://d3js.org/d3.v2.js"></script>
<script>
var data =
<html>
<head>
<title>line chart</title>
<link href="nvd3/src/nv.d3.css" rel="stylesheet">
<style>
body {
overflow-y:scroll;
}
@jhaubrich
jhaubrich / gitio
Created May 30, 2012 18:26
Turn a github.com URL into a git.io URL. (LINUX)
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard. (requires xsel)
url = ARGV[0]
code = ARGV[1]
@jhaubrich
jhaubrich / list_loop_over_copy.py
Created December 27, 2011 21:03 — forked from bjcubsfan/list_loop_over_copy.py
How to list over a copy of a loop
HA! You've been forked!
!/usr/bin/env python
import pdb
expected_rngs = range(0,10)
file_list = [0, 1, 2, 3, 4, 5, 6, 8, 9]
for antenna in expected_rngs[:]:
print "*********************************************************************"