Moved to https://github.com/mtigas/dotfiles/blob/master/bin/twittersearch.py
This file contains hidden or 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 | |
# Using `ffmpeg` to convert an arbitrary video file to an ipad-compatible M4V (h264+AAC) | |
# file. Mac-specific since libfaac has occasional audio glitches and the `afconvert` command | |
# is of a much higher quality (since it uses the system's Quicktime libs). | |
# Assumes ffmpeg and x264 (and other libs ffmpeg uses to decode various video formats | |
# you want) are installed. | |
# | |
# Easy mode: | |
# * Install homebrew: http://github.com/mxcl/homebrew |
This file contains hidden or 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
AP_STATES_NORMALIZATION = { | |
'ak': 'Alaska', | |
'al': 'Ala.', | |
'ala': 'Ala.', | |
'alabama': 'Ala.', | |
'alaska': 'Alaska', | |
'american samao': 'A.S.', | |
'american samoa': 'A.S.', | |
'ar': 'Ark.', | |
'ariz': 'Ariz.', |
This file contains hidden or 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
read -a choices <<<'Agnes Kathy Princess Vicki Victoria Bruce Fred Junior Ralph Albert Bahh Bells Boing Bubbles Cellos Deranged Hysterical Trinoids Whisper Zarvox'; n=${#choices[*]}; voice=${choices[$((RANDOM%n))]}; curl https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=wmhartnett | grep '<description>.*</description>' | sed -e 's/<\/*description>//g' -e 's/ \/ wmhartnett//g' -e 's/wmhartnett: //g' | say -v $voice |
This file contains hidden or 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
from django import template | |
register = template.Library() | |
from templatetag_sugar.register import tag | |
from templatetag_sugar.parser import Constant, Variable, Name | |
from .utils import get_next_or_previous | |
""" | |
Efficient and generic get next/previous tags for the Django template language, |
This file contains hidden or 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
// Source: http://www.census.gov/geo/www/ansi/countylookup.html | |
var countyToFIPS = { | |
'Alabama': { | |
'Autauga County': '01001', | |
'Baldwin County': '01003', | |
'Barbour County': '01005', | |
'Bibb County': '01007', | |
'Blount County': '01009', | |
'Bullock County': '01011', |
This file contains hidden or 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
from django.views.generic import dates | |
from django.views.generic.list import ListView | |
from django.views.generic.detail import DetailView | |
from django.contrib.syndication.views import Feed | |
from django.shortcuts import get_object_or_404 | |
from django.db.models import Q, Count, Aggregate | |
from fallen.models import Casualty, Theater, Branch, HomeState, CauseOfDeath, IncidentProvince | |
from django.template.defaultfilters import upper | |
from haystack.views import SearchView | |
import datetime |
- 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 hidden or 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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="fb-root"></div> | |
<script src="//connect.facebook.net/en_US/all.js"></script> | |
<script> | |
FB.init({ |
- don't blow your deadline
- don't be wrong
OlderNewer