Skip to content

Instantly share code, notes, and snippets.

View joshuaconner's full-sized avatar

Joshua Conner joshuaconner

View GitHub Profile
@joshuaconner
joshuaconner / mysql_splitdump.sh
Last active August 29, 2015 14:26 — forked from jasny/mysql_splitdump.sh
Split MySQL dump SQL file into one file per table or extract a single table
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump
####
if [ $# -lt 1 ] ; then
echo "USAGE $0 DUMP_FILE [TABLE]"
exit

This is a D3.js Heatmap example showing how the highest sun position of the day (which directly correlates with average temperature) changes over the year depending on the latitude of the place. The actual temperature chart would be shifted to the right a bit beacuse of thermal lag.

The data for the chart is calculated using SunCalc.

@joshuaconner
joshuaconner / README.md
Last active August 29, 2015 14:02 — forked from mbostock/.block

This choropleth encodes unemployment rates from 2008 with a quantize scale ranging from 0 to 15%. A threshold scale is a useful alternative for coloring arbitrary ranges.

// think of this as the "constructor" function - returns a GridSpace object
// so do your init stuff here
var GridSpace = function (x, y, height) {
this.x = x;
this.y = y;
this.height = height;
};
// this of this as sort of the "class definition", define your other functions here
// be warned though: everything in the prototype is shared between all GridSpace instances!