Skip to content

Instantly share code, notes, and snippets.

View missinglink's full-sized avatar

Peter Johnson missinglink

View GitHub Profile
@missinglink
missinglink / mines.js
Last active June 25, 2023 17:39
Javascript one-liner to calculate total minesweeper neighbours
var m = [
[' ',' ',' ',' ',' '],
[' ',' ',' ',' ',' '],
['X',' ',' ',' ',' '],
[' ','X',' ',' ',' '],
[' ',' ','X',' ',' '],
]
var m = [
[' ',' ','X'],
@missinglink
missinglink / repo-list.sh
Created June 11, 2019 15:55
List all repositories by organization
ORG='whosonfirst-data';
rm -f "${ORG}.txt"
for i in {0..15}; do
curl -s "https://api.github.com/orgs/${ORG}/repos?page=${i}&per_page=100" \
| jq -r '.[] | .name' \
>> "${ORG}.txt"
done
@missinglink
missinglink / nyc.geojson
Last active July 25, 2018 14:16
'Postal City' for New York City
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@missinglink
missinglink / sanfran.geojson
Created July 25, 2018 13:29
'Postal Cities' for San Francisco
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@missinglink
missinglink / postal_cities.txt
Created July 25, 2018 12:42
Candidate 'postal cities', based off places the Census lists as a 'principal city', and whos geometry intersects with the geometry of more than one ZCTA
5300100|Aberdeen city
4801000|Abilene city
4000200|Ada city
1301052|Albany city
4101000|Albany city
3700680|Albemarle city
0100988|Albertville city
3502000|Albuquerque city
0101132|Alexander City city
2200975|Alexandria city
@missinglink
missinglink / portland.geojson
Created July 24, 2018 09:13
'Postal Cities' example for Portland OR, showing the Polygon for Census Combined Statistical Area 440 (Portland-Vancouver-Salem, OR-WA)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@missinglink
missinglink / portland.geojson
Last active July 24, 2018 08:15
'Postal Cities' example for Portland OR, showing the Polygon for Census Metropolitan/Micropolitan Statistical Area 38900 (Portland-Vancouver-Hillsboro, OR-WA)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@missinglink
missinglink / portland.geojson
Created July 20, 2018 15:14
'Postal Cities' example for Portland OR, showing 131 zip codes associated with the Census Core Based Statistical Area ID 38900
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@missinglink
missinglink / portland.geojson
Last active July 20, 2018 10:38
'Postal Cities' example for Portland OR, showing 425 zip codes associated with the Sectional Center Facility 'SCF PORTLAND OR 970'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@missinglink
missinglink / portland.geojson
Last active July 24, 2018 18:17
'Postal Cities' example for Portland OR, showing 36 zip codes associated with the Census place ID 4159000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.