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
# DMA Code Descriptions | |
# http://mdrdirectories.com/pdfs/dma.pdf | |
dma_list = [ | |
{'name': 'Abilene – Sweetwater', 'dma_code': 662, 'rank': 165}, | |
{'name': 'Albany – Schenectady – Troy', 'dma_code': 532, 'rank': 57}, | |
{'name': 'Albany, GA', 'dma_code': 525, 'rank': 145}, | |
{'name': 'Albuquerque – Santa Fe', 'dma_code': 790, 'rank': 44}, | |
{'name': 'Alexandria, LA', 'dma_code': 644, 'rank': 179}, | |
{'name': 'Alpena', 'dma_code': 583, 'rank': 208}, |
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
state_list = [ | |
{ 'name': 'ALABAMA', 'abbr': 'AL' }, | |
{ 'name': 'ALASKA', 'abbr': 'AK' }, | |
{ 'name': 'AMERICAN SAMOA', 'abbr': 'AS' }, | |
{ 'name': 'ARIZONA', 'abbr': 'AZ' }, | |
{ 'name': 'ARKANSAS', 'abbr': 'AR' }, | |
{ 'name': 'CALIFORNIA', 'abbr': 'CA' }, | |
{ 'name': 'COLORADO', 'abbr': 'CO' }, | |
{ 'name': 'CONNECTICUT', 'abbr': 'CT' }, | |
{ 'name': 'DELAWARE', 'abbr': 'DE' }, |
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
### Quick SSH tunnel for mysql connection ### | |
# 3307 = local port to use | |
# mysqlserver = name/ip of mysql server | |
# 3306 = port number for remote mysql | |
# user@gateway = server you want to tunnel through | |
ssh -L 3307:mysqlserver:3306 user@gateway | |
# Now you can access remote mysql server locally by going to localhost |
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
# lol, bad time to go get coffee | |
if do_remove == 'Y': | |
sudo('rm /') |
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
alias apt-list='dpkg --get-selections' |
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
### app.templatetags.default_filters.py | |
from django import template | |
register = template.Library() | |
@register.filter("phone_format") | |
def phone_format(value): | |
""" | |
Returns pretty formatted 10 digit US phone number as string | |
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
# virtualenv, virtualenvwrapper, & pip settings - http://www.doughellmann.com/docs/virtualenvwrapper/tips.html | |
export WORKON_HOME=$HOME/.virtualenvs | |
export PIP_VIRTUALENV_BASE=$WORKON_HOME | |
export PIP_RESPECT_VIRTUALENV=true | |
source /usr/local/bin/virtualenvwrapper.sh |
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
complete -C "perl -le '\$p=qq#^\$ARGV[1]#;@ARGV=q#$HOME/.ssh/config#;/\$p/&&/^\D/&¬(/[*?]/)&&print for map{split/\s+/}grep{s/^\s*Host(?:Name)?\s+//i}<>'" ssh |
NewerOlder