Skip to content

Instantly share code, notes, and snippets.

-----BEGIN PGP MESSAGE-----
Version: GnuPG v2.0.20 (GNU/Linux)
owGbwMvMwMRYKyx5YOvOMhvG0wfeJTGEypbLVisl5adUKllVKyXnZKbmlYBYeYm5
qUpWStmplUmJxal6mfkKefkpqXpZxQpQNTpKZalFxZn5eUBVBnrmeuZKtTog5SDN
aZl56alFBUWZILOULNISUyyMUlMtkw1NLJOTzCwTDU0T09LMzVMMjQ0tkw2STJMs
zc2Mk4FGZuQXl6DYqgQ2Mz4zBShq7gJS72zgZOoEUu8MlCsFSyQnGqeZJyWlphmZ
GRinmALtSUuxNLJITExKTU5KMrQEKSxOLYJ6KTeruCQ1OTs1B+RgoHBZZnIqko/T
M0sySpPwaCmpLACJlacmxUN1xydl5qUAvYwcJoZAlcklmSDthiZG5paWJsYWxjpK
qRUFmUWp8ZkgFabmZhYGQKCjVFCUWqZklVeakwNyUWFePlAWaFFiOtCe4sz0vMSS
@mjsteckel
mjsteckel / gist:7c26445db86df319057c
Created September 24, 2014 21:50
All users who have made at least one gift greater than $50 over all-time
SELECT cu.id user_id,
cu.first_name, cu.last_name,
cu.subscription_status,
cu.address1, cu.address2, cu.city, cu.state, cu.zip,
phone.numbers phone_numbers,
last.total last_donation_amount,
last.created_at last_donation_date,
lifetime.max_amt lifetime_max_single_donation,
lifetime.lifetime_total_donation_amount,
lifetime.lifetime_total_donation_count,
@mjsteckel
mjsteckel / gist:4e3006149ec7dbc48107
Created September 24, 2014 16:54
New Hampshire House of Representatives districts
select * from districts where state = 'NH' and office_type_id = 8;
id | office_type_id | state | name
-------+----------------+-------+-----------------
24836 | 8 | NH | Belknap 1
24837 | 8 | NH | Belknap 2
24838 | 8 | NH | Belknap 3
24839 | 8 | NH | Belknap 4
24840 | 8 | NH | Belknap 5
24841 | 8 | NH | Belknap 6
29602 | 8 | NH | Belknap 7
@mjsteckel
mjsteckel / gist:b328275ecbbf31a37240
Created September 24, 2014 16:53
Votesmart CandidateBio.getBio?o=JSON&candidateId=126552
http://api.votesmart.org/CandidateBio.getBio?key=XYZABCDEF&o=JSON&candidateId=126552
{"bio"=>
{"generalInfo"=>
{"title"=>"Project Vote Smart - Bio - George Lambert",
"linkBack"=>"http://votesmart.org/bio.php?can_id=126552"},
"candidate"=>
{"candidateId"=>"126552",
"crpId"=>"",
"photo"=>"",