Skip to content

Instantly share code, notes, and snippets.

View chrislkeller's full-sized avatar

Chris Keller chrislkeller

View GitHub Profile
@chrislkeller
chrislkeller / README.md
Last active December 9, 2015 16:39
Demo: increment-slider-map

Demo: increment-slider-map

This repo's location has changed.

@chrislkeller
chrislkeller / README.md
Created December 19, 2012 20:48
json-from-ft

Demo: Pull json from Fusion Tables

This repo's location has changed.

@chrislkeller
chrislkeller / README.md
Last active December 10, 2015 02:48
Plots a marker on a map after a user inputs their address.

Demo: search-address-map-marker

This repo's location has changed.

@chrislkeller
chrislkeller / README.md
Last active December 11, 2015 22:19
Super simple shell script to take boilerplate FOIA language and create a markdown file.

Snippets: Creating a FOIA

This is a super simple shell script that takes boilerplate FOIA language and creates a markdown file that can be addressed to a particular agency.

You will still have to add the address, city, state and zip code of the agency, and the type of data being requested, but this is a step up from having a file that I copy and paste from.

The script takes a filename as an argument. That filename will have the date prepended to it so you can see at a glance which were sent out when.

Usage

@chrislkeller
chrislkeller / west_wing.coffee
Last active December 17, 2015 20:08
A simple experiment with coffeescript, writing a hubot script with random west wing quotes...
# Description:
# West Wing Quotes
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@chrislkeller
chrislkeller / fire_scraper.py
Last active December 18, 2015 13:19
A simple example of a scraperwiki python scraper for a recent Hacks/Hackers L.A. meetup...
#!/usr/bin/env python
import logging
import re
import time, datetime
import mechanize
from BeautifulSoup import BeautifulSoup, Tag, BeautifulStoneSoup
# log everything and send to stderr
logging.basicConfig(level=logging.DEBUG)
@chrislkeller
chrislkeller / crowdsourced-map.md
Last active December 20, 2015 16:09
Source Blog post on using Google Apps Scripts to automate some tasks needed for a crowdsourced map...

Back in November, on my second day at KPCC, I collaborated with Kim Bui on a crowd-sourced map that attempted to gather information from voters who wanted to share their experience at the polls.

We successfully powered the map using a bunch of Google tools -- a form, a spreadsheet and a Fusion Table -- along with some duct tape and some manual labor.

Some six months later I've become more comfortable here, and more comfortable with Google Apps Scripts thanks to some great examples from others. So as I re-purposed the idea for an election back in M

<div><span>05:51:34 AM</span>
<span>08.15.13</span></div>
<div><a href='https://twitter.com/kimbui'><img src='http://a0.twimg.com/profile_images/807941574/avatar2_normal.jpg' /></a></div>
<div>I missed #wjchat w two of my favorites: @jmfbrooks &amp; @webjournalist. To make up for it, Im helping @justinlarsen finish transcript coding.</div>
<div><a href='https://twitter.com/kimbui/status/367886263010865152'>I missed #wjchat w two of my favorites: @jmfbrooks &amp; @webjournalist. To make up for it, Im helping @justinlarsen finish transcript coding.</a></div>
<div>kimbui</div>
<div>Los Angeles, CA</div>
<div><span>05:40:12 AM</span>
<span>08.15.13</span></div>
@chrislkeller
chrislkeller / 2013_nfl_sked.csv
Created September 9, 2013 00:31
2013 NFL schedule in csv format...
season week Date tv location time_eastern game
2013 1 Thu, Sep 5 NBC Sports Authority Field at Mile High 8:30 p.m. Baltimore at Denver
2013 1 Sun, Sep 8 CBS Ralph Wilson Stadium 1:00 p.m. New England at Buffalo
2013 1 Sun, Sep 8 CBS Soldier Field 1:00 p.m. Cincinnati at Chicago
2013 1 Sun, Sep 8 CBS FirstEnergy Stadium 1:00 p.m. Miami at Cleveland
2013 1 Sun, Sep 8 FOX Mercedes-Benz Superdome 1:00 p.m. Atlanta at New Orleans
2013 1 Sun, Sep 8 FOX MetLife Stadium 1:00 p.m. Tampa Bay at NY Jets
2013 1 Sun, Sep 8 CBS Heinz Field 1:00 p.m. Tennessee at Pittsburgh
2013 1 Sun, Sep 8 FOX Ford Field 1:00 p.m. Minnesota at Detroit
2013 1 Sun, Sep 8 CBS Lucas Oil Stadium 1:00 p.m. Oakland at Indianapolis
Downloading/unpacking psycopg2==2.5.1
Downloading psycopg2-2.5.1.tar.gz (684kB): 684kB downloaded
Running setup.py egg_info for package psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2
building 'psycopg2._psycopg' extension
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5.1 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090202 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/Applications/Postgres.app/Contents/MacOS/include -I/Applications/Postgres.app/Contents/MacOS/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/psycopgmodule.o
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstri