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
<select name='day'> | |
<option value="1">1</option> | |
<option value="2">2</option> | |
<option value="3">3</option> | |
<option value="4">4</option> | |
<option value="5">5</option> | |
<option value="6">6</option> | |
<option value="7">7</option> | |
<option value="8">8</option> | |
<option value="9">9</option> |
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
from fabric.api import * | |
[...] | |
def gzip_assets(): | |
""" | |
GZips every file in the assets directory and places the new file | |
in the gzip directory with the same filename. | |
""" | |
local('python gzip_assets.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
javascript:var%20h=location.href,a="www.scpr.org",b="localhost:8000";function%20s(){if(h.search(a)!=-1)z();else%20if(h.search(b)!=-1)y();else%20return%20false}function%20x(c){location.href=c}function%20y(){x(h.replace(b,a))}function%20z(){x(h.replace(a,b))}s(); |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
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
# from simonw's code to djangopeople.net | |
import re | |
notalpha_re = re.compile('[^a-zA-Z0-9]') | |
def derive_username(nickname): | |
nickname = notalpha_re.sub('', nickname) | |
if not nickname: | |
return '' | |
base_nickname = nickname | |
to_add = 1 |
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
/* | |
dribbble custom selection css | |
from http://dribbble.com/stylesheets/master.css | |
*/ | |
/* custom selection colors */ | |
::-moz-selection { | |
color: #fff; | |
color: rgba(255,255,255,.85); |
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
<div class="html5audio"> | |
<div id="no-ogg" style="display:none;"> | |
<div id="flash-player"> | |
<a href="foo.mp3">Download Audio</a> | |
</div> | |
</div> | |
<audio controls> | |
<source src="foo.mp3" type="audio/mpeg" /> | |
<div id="flash-player"> | |
<a href="foo.mp3">Download Audio</a> |
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
# from python docs (http://docs.python.org/library/decimal.html) | |
def moneyfmt(value, places=2, curr='', sep=',', dp='.', | |
pos='', neg='-', trailneg=''): | |
"""Convert Decimal to a money formatted string. | |
places: required number of places after the decimal point | |
curr: optional currency symbol before the sign (may be blank) | |
sep: optional grouping separator (comma, period, space, or blank) | |
dp: decimal point indicator (comma or period) |
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
/* syntax.css for pygments */ | |
/* from http://github.com/mojombo/tpw/blob/master/css/syntax.css */ | |
.highlight { background: #ffffff; } | |
.highlight .c { color: #999988; font-style: italic } /* Comment */ | |
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ | |
.highlight .k { font-weight: bold } /* Keyword */ | |
.highlight .o { font-weight: bold } /* Operator */ | |
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ | |
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ |
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
# inspired by dopplr's color squares | |
# http://blog.dopplr.com/2007/10/23/in-rainbows/ | |
from hashlib import md5 | |
from string import Template | |
hood_block = Template(""" | |
<div class="neighborhood" id="$cityid"> | |
<div class="neighborhood-color" style="background-color:#$bghex;"></div> | |
<div class="neighborhood-text">$cityname</div> |
OlderNewer