Skip to content

Instantly share code, notes, and snippets.

View paulsmith's full-sized avatar
😀
Hi, friends

Paul Smith paulsmith

😀
Hi, friends
View GitHub Profile
import urllib, re
from pprint import pprint as pp
from datetime import datetime, timedelta
from geopy.geocoders import Google
import MySQLdb
from time import sleep
bcpd_arc_url = "http://maps.baltimorepolice.org/servlet/com.esri.esrimap.Esrimap?ServiceName=BaltimorePolice&CustomService=Query&ClientVersion=3.1&Form=True&Encode=False"
districts={"Northwest":
@paulsmith
paulsmith / echo.c
Created October 7, 2009 18:40
Unix is C—a preforking echo server inspired by tomayko.com and jacobian.org’s recent “* is Unix” posts
/**
* A simple preforking echo server in C.
*
* Building:
*
* $ gcc -Wall -o echo echo.c
*
* Usage:
*
* $ ./echo
@paulsmith
paulsmith / gist:54275
Created January 28, 2009 23:56
wrap a series of bash commands
#!/bin/bash
prog=$(basename $0)
logger="logger -t $prog"
# Logs to syslog and stderr
gripe () {
$logger -s "$*"
}