Skip to content

Instantly share code, notes, and snippets.

@dalekunce
dalekunce / gifs
Last active August 29, 2015 13:56
http://media.giphy.com/media/4nlK5QgKU8wZW/giphy.gif
West Wing
http://persephonemagazine.com/wp-content/uploads/2013/09/wrongnessandbewrong.gif
http://24.media.tumblr.com/tumblr_m5064d1Ysa1r9i0fuo1_500.gif
The Wire
http://media.giphy.com/media/Mr8Bw7qlrukr6/giphy.gif
http://media.giphy.com/media/5aUbkfOovwW0E/giphy.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# 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 will install postgres and postgis using one formula
brew install postgis
initdb /usr/local/var/postgres
@dalekunce
dalekunce / wget files
Created September 30, 2014 02:35
wget multiple files from file
#!/bin/sh
url=$(awk -F = '{print $2}' url.txt)
for i in $(cat file.txt);
do
wget "${url}${i}"
done
@dalekunce
dalekunce / hottask_to_shapefile.sh
Last active August 29, 2015 14:10
hottask_to_shapefile.sh
#!/bin/bash
#######################################################
##
## Created by Dale Kunce: (dale.kunce@redcross.org)
## Download a @hotosm task manager task and output to shapefile.
##
## chmod +x hottask_to_shapefile.sh
## ./hottask_to_shapefil.sh <task#>
##
#######################################################
@dalekunce
dalekunce / fix-macosx.py
Created December 26, 2014 12:32
yosemite spotlight privacy settings
#!/usr/bin/python
from Foundation import NSMutableArray, NSMutableDictionary
from Foundation import CFPreferencesSynchronize, CFPreferencesCopyValue, CFPreferencesCopyKeyList, CFPreferencesSetValue, CFPreferencesCopyMultiple, CFPreferencesSetMultiple, kCFPreferencesCurrentUser, kCFPreferencesAnyHost
import os, sys
# We only handle Yosemite's spotlight for now
majorRelease = int(os.uname()[2].split(".")[0])
if majorRelease < 14:
print "Good news! This version of Mac OS X's Spotlight is not known to invade your privacy."
@dalekunce
dalekunce / macosx_fileext.sh
Created December 26, 2014 18:35
macosx_fileext.md
#Disable ext change warning
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
#Show all filename extensions in Finder by default?
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
@dalekunce
dalekunce / arc_offices.geojson
Last active August 29, 2015 14:12
American Red Cross International Offices
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dalekunce
dalekunce / canaan.geojson
Created January 23, 2015 01:32
canaan haiti
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dalekunce
dalekunce / task_1014.json
Created April 28, 2015 10:41
HOT_Task_1014
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.