Skip to content

Instantly share code, notes, and snippets.


Sophia Parafina spara

  • Count Down City
  • Twitter @spara
View GitHub Profile

d3.unconf example gist. Fork it here.


d3.unconf example gist. Fork it here.

View dstk.js
{ {
dma_code: 807,
spara / big-ignite.html
Created May 5, 2014
Src for big with ignite style timer
View big-ignite.html
<!DOCTYPE html>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<style type='text/css'>
body {
View resource_details_response_object_icarol_1.txt
HTTP/1.1 200 OK
Cache-Control: max-age=25200, private
Content-Type: application/json; charset=utf-8
Expires: Sun, 02 Jun 2013 09:28:30 GMT
Last-Modified: Wed, 29 May 2013 14:17:34 GMT
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-ServerName: WEB3
Date: Sun, 02 Jun 2013 02:28:30 GMT
View csv_to_json.rb
#!/usr/bin/env ruby
require 'csv'
require 'json'
if ARGV.size != 2
puts 'Usage: csv_to_json input_file.csv output_file.json'
puts 'This script uses the first line of the csv file as the keys for the JSON properties of the objects'
spara / gist:bbb79c7df2a3272b1cae
Created Jun 25, 2014
geocode texas beverage tax receipts
View gist:bbb79c7df2a3272b1cae
require 'rubygems'
require 'cgi'
require 'net/http'
require 'open-uri'
require 'json'
file ='bev01-22.tsv').read
data =
spara /
Created Mar 22, 2011
OpenGeo Suite installer for Ubuntu with Apache proxy configured
# setup repository
sudo wget -qO- | apt-key add -
sudo chmod 655 /etc/apt/sources.list
sudo echo "deb lucid main" >> /etc/apt/sources.list
sudo chmod 644 /etc/apt/sources.list
sudo apt-get update
# install opengeo suite
spara /
Created May 28, 2011
Install locker from The Locker Project on Ubuntu
#install node.js
sudo apt-get upgrade
sudo apt-get -y install git
sudo apt-get -y install gcc g++
git clone --depth 1
cd node/
export JOBS=2
mkdir ~/local
spara / counties_by_state.rb
Created Jul 22, 2011
ruby snippet that iterates through counties by state
View counties_by_state.rb
states = ["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"]
states.each do |state|
case state
when "AL"
counties = ["Autauga"," Baldwin"," Barbour"," Bibb"," Blount"," Bullock"," Butler"," Calhoun"," Chambers"," Cherokee"," Chilton"," Choctaw"," Clarke"," Clay"," Cleburne"," Coffee"," Colbert"," Conecuh"," Coosa"," Covington"," Crenshaw"," Cullman"," Dale"," Dallas"," DeKalb"," Elmore"," Escambia"," Etowah"," Fayette"," Franklin"," Geneva"," Greene"," Hale"," Henry"," Houston"," Jackson"," Jefferson"," Lamar"," Lauderdale"," Lawrence"," Lee"," Limestone"," Lowndes"," Macon"," Madison"," Marengo"," Marion"," Marshall"," Mobile"," Monroe"," Montgomery"," Morgan"," Perry"," Pickens"," Pike"," Randolph"," Russell"," Shelby"," St. Clair"," Sumter"," Talladega"," Tallapoosa"," Tuscaloosa"," Walker"," Washingt