Skip to content

Instantly share code, notes, and snippets.

View waldoj's full-sized avatar

Waldo Jaquith waldoj

View GitHub Profile
@waldoj
waldoj / gist:959972
Created May 6, 2011 23:09
Google Apps MX
View gist:959972
ASPMX.L.GOOGLE.COM 1
ALT1.ASPMX.L.GOOGLE.COM 5
ALT2.ASPMX.L.GOOGLE.COM 5
ASPMX2.GOOGLEMAIL.COM 10
ASPMX3.GOOGLEMAIL.COM 10
@waldoj
waldoj / javascript-session.html
Created May 14, 2011 18:55
An effort to create a simple session array manipulation function in JavaScript.
View javascript-session.html
<!DOCTYPE html>
<head>
<meta charset="utf-8"/>
<script src="https://www.google.com/jsapi?key=ABQIAAAAn01L8sl4uwWn5vTPpoEoXhQlhX9aoLwtuBlP8SLx1ePnrLY9UBT9g3_4EQBp1uyDz1sgvvv7UqG-nQ"></script>
<script>
google.load("jquery", "1.4.3");
</script>
<script src="http://socorro.googlecode.com/svn/trunk/webapp-php/js/jquery/plugins/jquery.cookies.2.2.0.js"></script>
</head>
@waldoj
waldoj / gist:1529336
Created December 28, 2011 19:38
New York Times Spam
View gist:1529336
Received: by 10.205.118.139 with SMTP id fq11cs260036bkc;
Wed, 28 Dec 2011 10:17:19 -0800 (PST)
Received: by 10.236.128.197 with SMTP id f45mr43681988yhi.44.1325096238701;
Wed, 28 Dec 2011 10:17:18 -0800 (PST)
Return-Path: <16ac06ddelayfovciab7saeiaaaaaax5gy2jaoseiuiyaaaaa@email.newyorktimes.com>
Received: from dmx1.bfi0.com (dmailer0121.dmx1.bfi0.com. [208.70.142.121])
by mx.google.com with ESMTP id v2si13633651ane.208.2011.12.28.10.17.18;
Wed, 28 Dec 2011 10:17:18 -0800 (PST)
Received-SPF: pass (google.com: domain of 16ac06ddelayfovciab7saeiaaaaaax5gy2jaoseiuiyaaaaa@email.newyorktimes.com designates 208.70.142.121 as permitted sender) client-ip=208.70.142.121;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of 16ac06ddelayfovciab7saeiaaaaaax5gy2jaoseiuiyaaaaa@email.newyorktimes.com designates 208.70.142.121 as permitted sender) smtp.mail=16ac06ddelayfovciab7saeiaaaaaax5gy2jaoseiuiyaaaaa@email.newyorktimes.com; dkim=neutral (bad format) header.i=@email.newy
@waldoj
waldoj / input.py
Created May 5, 2012 01:43
Learning Python
View input.py
# Import needed libraries.
import csv, urllib2
# Retrieve the contents of the CSV report file
csv_file = urllib2.urlopen('http://www.sbe.virginia.gov/sbe_csv/CF/Report.csv').read()
# Convert the contents of the CSV file to a list.
# (Shouldn't this use a try / except?)
Report = csv.reader(csv_file)
@waldoj
waldoj / gist:2856039
Created June 2, 2012 01:10
Grovo Spam
View gist:2856039
Delivered-To: waldo@example.org
Received: by 10.68.54.104 with SMTP id i8csp237073pbp;
Fri, 1 Jun 2012 15:48:48 -0700 (PDT)
Received: by 10.68.190.97 with SMTP id gp1mr14781143pbc.76.1338590928850;
Fri, 01 Jun 2012 15:48:48 -0700 (PDT)
Return-Path: <flickr@shareapixel.com>
Received: from feb.oneclickunsub.com (feb.oneclickunsub.com. [72.87.249.52])
by mx.google.com with ESMTP id ro10si6383793pbc.312.2012.06.01.15.48.48;
Fri, 01 Jun 2012 15:48:48 -0700 (PDT)
Received-SPF: neutral (google.com: 72.87.249.52 is neither permitted nor denied by best guess record for domain of flickr@shareapixel.com) client-ip=72.87.249.52;
@waldoj
waldoj / chinese-ips.txt
Created August 4, 2012 03:13
Chinese IP Blocks
View chinese-ips.txt
1.202.0.0/15 14.144.0.0/12 14.208.0.0/12 27.8.0.0/13 27.16.0.0/12 27.36.0.0/14 27.40.0.0/13 27.54.192.0/18 27.106.128.0/18 27.115.0.0/17 27.152.0.0/13 27.184.0.0/13 58.16.0.0/15 58.20.0.0/16 58.21.0.0/16 58.22.0.0/15 58.34.0.0/16 58.37.0.0/16 58.38.0.0/16 58.40.0.0/16 58.42.0.0/16 58.44.0.0/14 58.56.0.0/15 58.58.0.0/16 58.59.0.0/17 58.60.0.0/14 58.68.128.0/17 58.82.0.0/15 58.100.0.0/15 58.208.0.0/12 58.242.0.0/15 58.246.0.0/15 58.248.0.0/13 59.32.0.0/13 59.40.0.0/15 59.42.0.0/16 59.44.0.0/14 59.51.0.0/16 59.52.0.0/14 59.56.0.0/13 59.72.0.0/16 59.108.0.0/15 59.174.0.0/15 60.0.0.0/13 60.11.0.0/16 60.12.0.0/16 60.24.0.0/13 60.160.0.0/11 60.194.0.0/15 60.208.0.0/13 60.216.0.0/15 60.220.0.0/14 61.4.64.0/20 61.4.80.0/22 61.4.176.0/20 61.48.0.0/13 61.128.0.0/10 61.135.0.0/16 61.136.0.0/18 61.139.0.0/16 61.145.73.208/28 61.147.0.0/16 61.152.0.0/16 61.160.0.0/16 61.162.0.0/15 61.164.0.0/16 61.175.0.0/16 61.177.0.0/16 61.179.0.0/16 61.183.0.0/16 61.184.0.0/16 61.185.219.232/29 61.187.0.0/16 61.188.0.0/16 61.191.0.0/16
@waldoj
waldoj / ahs-stony-point.txt
Created August 29, 2012 23:58
AHS Letter Regarding Stony Point Shooting
View ahs-stony-point.txt
From: ALBEMARLE HIGH SCHOOL <email@blackboardconnect.com>
Date: Wed, Aug 29, 2012 at 4:17 PM
Subject: Dear Albemarle High School Families
A message from ALBEMARLE HIGH SCHOOL
Dear Albemarle High School Families:
Sadly, the Albemarle County police department announced today that four people lost their lives as the result of an incident that occurred in a house on Stony Point Road. Two of those people were Albemarle County public school students, including Lily Romando, a junior at Murray High School and a wonderful young lady well known to our own Albemarle high school community. Her brother, Andrew, an eighth grader at Sutherland, also died.
Very few details are available at this time. The police are moving forward with an investigation. They have described this as an isolated incident and have said there is no danger to the larger community.
@waldoj
waldoj / va-transportation-feeds.txt
Created February 28, 2013 03:28
GeoJSON files for real-time Virginia transportation data.
View va-transportation-feeds.txt
These are the data sources that drive the 511virginia.org mapping site.
http://www.511virginia.org/data/icons.cameras_inactive.geojson
http://www.511virginia.org/data/geojson/icons.inactive_construction.geojson
http://www.511virginia.org/data/icons.cameras.geojson
http://www.511virginia.org/data/geojson/icons.ord_dms_active.geojson
http://www.511virginia.org/data/geojson/icons.scheduled_bridge_opening.geojson
http://www.511virginia.org/data/geojson/icons.construction.geojson
http://www.511virginia.org/data/geojson/icons.incident.geojson
http://www.511virginia.org/data/geojson/icons.weather.geojson
@waldoj
waldoj / 15.2-627.json
Created March 16, 2013 18:54
Sample API response from Virginia Decoded's Law method.
View 15.2-627.json
{
"section_number": "15.2-627",
"section_id": "7508",
"structure_id": "1980",
"catch_line": "Department of education.",
"history": "Code 1950, § 15-324; 1956, c. 153; 1962, c. 623, § 15.1-644; 1980, c. 559; 1981, c. 246; 1982, cc. 32, 75; 1995, c. 8; 1996, c. 873; 1997, c. 587.",
"full_text": "<p>The department of education shall consist of the county school board, the division superintendent of schools and the officers and employees thereof. Except as herein otherwise provided, the county school board and the division superintendent of schools shall exercise all the powers conferred and perform all the duties imposed upon them by general law. Except for the initial elected board which shall consist of five members, the county school board shall be composed of not less than three nor more than nine members; however, there shall be at least one school board member elected from each of the county’s magisterial or election districts. The members shall be elected by popular vote from election districts cote
@waldoj
waldoj / ubuntu-ckan.sh
Last active December 15, 2015 07:49 — forked from JoshData/gist:5212696
The steps required to get CKAN running on Ubuntu 12.10. Note that they are not the same as [the official instructions](http://docs.ckan.org/en/latest/install-from-source.html), because those do not work.
View ubuntu-ckan.sh
# Spin up an Ubuntu 12.10 LTS (64bit) server.
# The following are based on the source install of CKAN....
# http://ckan.readthedocs.org/en/latest/install-from-source.html
# install dependencies
sudo apt-get update
sudo apt-get install python-dev postgresql libpq-dev python-pip python-virtualenv git-core libcap-dev
# We'll install in the ubuntu user's home directory, i.e.