Skip to content

Instantly share code, notes, and snippets.

View wayneburkett's full-sized avatar

Wayne wayneburkett

  • Providence, RI
View GitHub Profile
@wayneburkett
wayneburkett / xcode_sdk_link.sh
Created June 12, 2014 19:09
Link SDKs in one version of XCode to another (when more than one version of XCode is installed)
@wayneburkett
wayneburkett / hnsort.user.js
Last active September 26, 2015 07:28
Sort the Hacker News front page
// hnsort
// v0.3
// Copyright (c) 2009, Wayne Burkett
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
// ==UserScript==
// @name hnsort
// @namespace http://wayneburkett.com
// @description Sort articles on the Hacker News homepage
@wayneburkett
wayneburkett / markasread.user.js
Last active April 20, 2018 19:13
Mark previously-read Hacker News comments
// MarkAsRead
// v0.1
// Copyright (c) 2008, Wayne Burkett
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
// ==UserScript==
// @name MarkAsRead
// @namespace http://dionidium.com/projects/greasemonkey/
// @description Mark previously-read Hacker News comments
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wayneburkett
wayneburkett / generate.bash
Last active March 27, 2019 18:35
St. Louis properties owned by Paul McKee's Northside Regeneration LLC
# see this gist for instructions to generate the database of parcels this was created from
# https://gist.github.com/wayneburkett/9fc130e1e2f1f6105a6fa2c0e74c2e3c
ogr2ogr -f GeoJSON northside.geojson prcl.shp -t_srs EPSG:4326 -select handle -where "ownername LIKE 'NORTHSIDE REGEN%'"
@wayneburkett
wayneburkett / git.alias.about.sh
Created April 22, 2019 17:21
Git description alias
alias.about !describe() { msg="$1"; git config branch."$(git rev-parse --abbrev-ref HEAD)".description ${msg:+"$msg"}; }; describe
@wayneburkett
wayneburkett / everylotpvd
Last active November 8, 2019 13:16
Create an everylotbot for Providence, RI
# download the shapefile and dump it into a database
mkdir tmp && \
curl -L "https://data.providenceri.gov/api/geospatial/78bu-i8at?method=export&format=Shapefile" -o tmp/prcl.zip && \
cd tmp && \
unzip prcl.zip && \
ogr2ogr -f SQLite prcl_raw.db geo_export_*.shp -t_srs EPSG:4326
# create a table with everything you'd need to run an everylot bot
# http://fakeisthenewreal.org/everylot/
# change the table name to whatever the downloads give you (it's randomized)
# get a pared-down database of the trees in NYC
# the downloaded CSV is ~210M
# the generated DB is ~22M
mkdir trees && \
curl -L "https://data.cityofnewyork.us/api/views/uvpi-gqnh/rows.csv?accessType=DOWNLOAD" -o trees/trees.csv && \
ogr2ogr -f SQLite trees.db trees/trees.csv -nln trees -dialect sqlite \
-sql "SELECT tree_id AS id, \
ROUND(latitude, 6) lat, \
ROUND(longitude, 6) lon \
FROM trees"