Skip to content

Instantly share code, notes, and snippets.

View aboutaaron's full-sized avatar

Aaron Williams aboutaaron

View GitHub Profile
@rnagle
rnagle / ChartView.js
Created March 7, 2014 19:17
ChartView.js
/**
* Original author: David Eads (https://github.com/eads)
*
* Wrap D3 charting components in a simple Backbone view interface
*
* Provides a redrawing path, data sync, and fallback for non-d3 browsers.
*
* Views that extend ChartView should implement their own "draw" function and go to work.
*
* var collection = new Backbone.Collection([ ["Maria", 33], ["Heather", 29] ]);
function addMahZipCodez() {
// grab basic sheet data
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
var values = rows.getValues();
// init some locals for looping over each row
var row;
@karmadude
karmadude / README.md
Last active February 7, 2017 08:24
San Francisco Contours
@rengel-de
rengel-de / index.html
Last active January 2, 2025 07:35
Timeline for d3 - proof-of-concept
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="keywords" lang="de" content="Zeitleiste, Zeitlinie, Zeitkarte, Geschichte, Chronologie">
<meta name="keywords" lang="en" content="Timeline, Timemap, History, Chronology">
<title>Timeline - Proof-of-concept</title>
<!-- That's my local d3 path. When working locally, use your local path. -->
@yanofsky
yanofsky / LICENSE
Last active March 14, 2025 18:19
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
<string>(?:^\s+)?(&lt;)((?i:script))\b(?![^&gt;]*/&gt;)</string>
=>
<string>(?:^\s+)?(&lt;)((?i:script))\b(?!([^&gt;]*text/template[^&gt;]*|[^&gt;]*/>))</string>
@robdimarco
robdimarco / postgis.rb
Created February 22, 2013 22:36
Brew recipe to install postgresql 9.2 and postgis 1.5.8. To run brew install https://gist.github.com/robdimarco/5017114/raw/2e9d55c70ac2ed35d1978eee74780dbb211ecb89/postgis.rb
require 'formula'
def raster?
ARGV.include? '--with-raster'
end
def topology?
ARGV.include? '--with-topology'
end
@lossyrob
lossyrob / install-gdal
Last active August 10, 2017 18:53
Script to install GDAL on Ubuntu 12.04 LTS
# Install subversion
sudo apt-get -y install subversion
# Install g++
sudo apt-get -y install g++
# Install Hierarchical Data Format library
# NOTE: This library is not necessarily needed, but was required
# in order for this to compile against a clean Ubuntu 12.04 LTS system.
# I didn't need it on a clean EC2 Ubuntu 12.10 instance, so
@jdjkelly
jdjkelly / pitchfork_backbone.js
Created September 20, 2012 14:06
Core Pitchfork Backbone App
// This is the core part of Pitchfork.com's Backbone app.
// The autobahn object in particular is a great example of how to layer backbone on to a traditional, CMS-driven media site while maintaing server-side view rendering.
var p4k = window.p4k || {};
$(function() {
var a = p4k.core = p4k.core || {};
a.Task = function(c, b) {
this.fn = c;
this.initialize(b)
};
@hrldcpr
hrldcpr / tree.md
Last active January 6, 2025 22:43
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!