Skip to content

Instantly share code, notes, and snippets.

View hampelm's full-sized avatar

Matt Hampel hampelm

View GitHub Profile
@lucasallan
lucasallan / install_postgis_osx.sh
Created September 6, 2011 21:03 — forked from klebervirgilio/install_postgis_osx.sh
Installing PostGIS on Mac OS X and Ubuntu
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
#1. Install PostgreSQL postgis and postgres
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
"geoObjectSource": {
"type": "ArcGIS Server",
"endpoint": "http://ags.wingis.org/ArcGIS/rest/services/1_Parcels/MapServer/1/",
"name": ["LOPHouseNumber", "LOPPrefixDirectional", "LOPStreetName"],
"id": "PrimaryPIN"
}
@parisminton
parisminton / commaify.js
Created July 8, 2013 17:44
This function will automatically insert commas after the thousands place of any number. Returns a string. Useful for calculations that appear in copy. Call 'commaify(some_dynamic_integer);'
function commaify (num) {
var num_string,
i,
len,
threes = [],
remainders;
num_string = num.toString();
len = num_string.length;
remainders = len % 3;
@bensheldon
bensheldon / advice_for_cfa_fellows.md
Last active August 2, 2023 16:50
A summary of conversations I've had with current, former and future Code for America fellows.
  • Who's your customer? The department or the citizen. What’s your product? The negotiated-design process or the actual outcome itself. These things are interrelated, but ensure the entire team is aligned and in agreement on what it is you’re doing and what the outcome is you want. What do you want to say you built at the end-of-year summit? The earlier you can figure this out, the better your year will go. Project uncertainty is the mind-killer.

  • Don't negotiate with yourselves. My team would have achieved so much more if we had come to an agreement internally on how to proceed in our city design negotiations, and let CfA staff tell us if we were unreasonable. Instead, we watered down what we wanted, caved on major issues, and negotiated individually with our city partners rather than as a team.

  • Invest your time in one thing for the entire year. Your understanding of the civic problem-space may change and evolve, but creating a commitment (individually, as a team, and in your city-

@sfrdmn
sfrdmn / image_downloader.js
Last active January 8, 2024 03:39
Bookmarklet to download all images on a page
;(function() {
var images = [].slice.call(document.querySelectorAll('img'))
try {
images.forEach(function(img) {
downloadImage(img)
})
} catch (e) {
alert("Download failed.");
console.log('Download failed.', e);
}