Skip to content

Instantly share code, notes, and snippets.

@chadwhitacre
chadwhitacre / of this file.html
Created August 1, 2011 19:16
What's the gist?
<div>Blah!</div>
@chadwhitacre
chadwhitacre / connect4.py
Created March 19, 2012 13:01
My submission for the Thumbtack PyCon schwag
#!/usr/bin/env python
import json
import sys
# Set up directions.
# ==================
# a b c
# d e
# f g h
We couldn’t find that file to show.
@chadwhitacre
chadwhitacre / repair.py
Created July 27, 2012 22:42
This is the script I used to repair Gittip.com issue #202
#!/usr/bin/env python
from gittip import wireup
db = wireup.db()
names = open('affected.txt').read().splitlines()
for name in names:
@chadwhitacre
chadwhitacre / repair.py
Created July 27, 2012 23:14
This is the script I used to repair Gittip.com issue #202 for $0.50 people
#!/usr/bin/env python
import datetime
from gittip import wireup
db = wireup.db()
names = open('affected-less.txt')
@chadwhitacre
chadwhitacre / migrate.py
Created August 16, 2012 13:43
Script used to wire up balanced_card_uri migrated from Stripe
#!./env/bin/python
import csv
import sys
from gittip import billing, wireup
db = wireup.db()
wireup.billing()
"""Used when a person needed to go to Balanced to verify their merchant details
they are redirected here after the fact.
"""
from aspen import Response
from gittip import billing
#=========================================================================== ^L
if user.ANON:
raise Response(404)
"""Used when a person needed to go to Balanced to verify their merchant details
they are redirected here after the fact.
"""
from aspen import Response
from gittip import billing
#=========================================================================== ^L
if user.ANON:
raise Response(404)
from datadirect.dataset.aggregation_mixin import AggregationMixin
def test_aggregation_mixin_is_instantiable():
actual = AggregationMixin().__class__
assert actual is AggregationMixin, actual
@chadwhitacre
chadwhitacre / gist:3593759
Created September 2, 2012 02:00
On Jamming One's Personal Brand

I studied Greek in college, which meant I was temping soon after. My best gig was in an internal medicine office, where I sat in a closet calling insurance companies all day, and the ladies teased me for being a virgin, and also thought I was quaintly cute. Two of them attended my wedding.

In the closet, while calling the insurance companies, I stared at an old DOS medical records system. Each screen was a different human, a person, reduced to an ASCII medical records profile along familiar axes: name, age, gender, race, and then medical history. By the end of my stint I had an image of a reconstituted person, a human, appear (to my conscious mind) instantly upon switching screens. This was late 1999, the age of The Matrix, and I identified with Mouse, the geeky young character who scans the falling green characters and cognizes the world itself. Martha Schwartz, old lady, 309 lbs., sitting on her couch with a walker in front of her, tube