- Swap Control and Caps Lock in System Preferences -> Keyboard -> Modifier Keys
- Google Chrome http://www.google.com/chrome/
- iTerm2 http://www.iterm2.com/
- Oh my zsh https://github.com/robbyrussell/oh-my-zsh/
- XCode (from the mac app store)
- XCode command line tools (run XCode, go to Preferences -> Downloads -> Command Line Tools)
- Homebrew https://github.com/mxcl/homebrew/wiki/installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires, gdal, wget, spatialite, R with (maptools, RColorBrewer, classInt) | |
# You should be able to put any state/county combination in here and get a map made | |
# Replace spaces with an underscore ie: | |
#state=New_York | |
#county=New_York | |
# | |
#state=ILLINOIS | |
#county=Cook | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv, os.path | |
import os | |
import httplib, base64 | |
import getpass | |
username = raw_input("Username:") | |
password = getpass.getpass("Password:") | |
subdomain = raw_input("Subdomain:") | |
project = raw_input("Project id:") | |
filename = raw_input("Tickets file:") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import csv | |
import json | |
r = csv.reader(open("data.csv")) | |
headers = r.next() | |
countries = headers[1:] | |
def saveData(output): | |
filename = "ranked" | |
print "Writing JSON output to %s.json" % filename |
You want the most up-to-date shapefile of Congressional districts, but you don't want Michigan to be a giant blob.
(The Census Bureau offers some cartographic boundary shapefiles without this problem, but they aren't always the most current.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File # 1 | |
# https://drive.google.com/open?id=1Lhz23JP4gRW4p_01D7OzaL60CT1wfem- | |
# File # 2 | |
# https://drive.google.com/open?id=1XOWD8COTdDx30HNLZgrp57WzWUGOtaKA | |
# NOTE: To load data, you must download both the extract's data and the DDI | |
# and also set the working directory to the folder with these files (or change the path below). | |
#install.packages("tidyverse") |
I had a repo with dozens of abandoned or merged remote branches. Before deleting them wholesale, I wanted to know just how old they were.
I adapted this Stack Overflow answer, but dressed it up
in a for
loop since I wanted all of them. Also, since I wanted to sort them, I switched the date format to %cs
(Short ISO),
which didn't work in git 2.18.0
but does work in 2.28.0