Skip to content

Instantly share code, notes, and snippets.

View ndmgrphc's full-sized avatar

Aaron P. ndmgrphc

View GitHub Profile
import requests
zips = "59221, 73949, 86515, 42223, 86044, 84536, 97635, 02861, 71749, 81137, 63673, 88063, 89439".split(', ')
url = 'https://congress.api.sunlightfoundation.com/districts/locate?apikey=4356d7e2b68340a69fb9b5e156e9cd49&zip='
for z in zips:
r = requests.get(url + z).json()['results']
print z, r
@dkebler
dkebler / rock64shrink.sh
Last active March 4, 2023 22:45
Bash Script for Shrinking/Truncating a disk image
#!/bin/bash
# WARNING this script could easily trash a image or worse a device. DO NOT USE IT WITH A DEVICE
# It will make a copy of the image to work on by default unless you use the -o option
# which you should NOT unless your image is much bigger than >16GB
# In other words test it on a disk image file that could be damaged.
# Use the -h option to see list of options
# You MUST use -t to do the last step truncation