This file contains 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
<Files ~ "^[\._]ht"> | |
Order allow,deny | |
Deny from all | |
Satisfy All | |
</Files> | |
Options -Indexes +FollowSymLinks +ExecCGI | |
AddHandler php5-script .php | |
AddHandler cgi-script .py |
This file contains 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, body, div, span, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, b, cite, code, | |
del, dfn, em, i, img, ins, kbd, q, samp, | |
strike, strong, sub, sup, tt, var, | |
dl, dt, dd, ol, ul, li, | |
fieldset, form, label, legend, | |
table, caption, tbody, tfoot, thead, tr, th, td | |
{margin:0; padding:0; border:0; outline:0; font-size:100%; | |
vertical-align:baseline; background:transparent;} |
This file contains 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
git symbolic-ref HEAD refs/heads/$newbranch | |
rm .git/index | |
git clean -fdx | |
# | |
# git-add files, then git-commit to finish creating the branch | |
# |
This file contains 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
ssh -N -f -D $port $host | |
# | |
# socks proxy: localhost:$port | |
# |
This file contains 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
git branch -d oldbranch | |
git push origin :oldbranch |
This file contains 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
class Something: | |
# | |
# ... | |
# class definition | |
# ... | |
# | |
@property | |
def sort_value(self): | |
return self.some_important_variable |
This file contains 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
def map_results(fields, rows): | |
keys = [f.split('.')[-1] for f in fields] | |
return tuple(dict(zip(keys, row)) for row in rows) | |
# >>> fields = ('x.id', 'y.name', 'spork') | |
# >>> rows = [(1, 2, 3), (4, 5, 6)] | |
# >>> for row in map_results(fields, rows): | |
# ... print row | |
# ... | |
# {'id': 1, 'name': 2, 'spork': 3} |
This file contains 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
>>> import twitter # http://code.google.com/p/python-twitter/ | |
>>> t = twitter.Api(username='abc', password='def') | |
>>> status = t.PostUpdate('hurr I am tweet') | |
>>> print 'http://twitter.com/%s/status/%d' % (status.user.screen_name, status.id) |
This file contains 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
Use vim's explicit fold markers to hide license headers: | |
#!/usr/bin/env whatever | |
# Copyright (c) YEAR, PERSON {{{ | |
# | |
# Permission is hereby granted, free of charge, to lorem ipsum dolor | |
# sit amet, consectetur adipiscing elit. Donec scelerisque sodales | |
# urna. Cras dolor leo, ultrices a, consectetur a, porta sit amet, | |
# nisi. Curabitur lobortis neque in lorem imperdiet mollis. | |
# |
OlderNewer