Joined October 2012
·
Posted to
It doesn't matter where you place your jQuery scripts
over 1 year
ago
I assume he means the evergreens (chrome, firefox, to some extent safari) and possibly IE9 or 10+
Posted to
Pythonic "Switch...Case"
over 1 year
ago
You can also use a function as a switch.
def buildingtype(x):
return {
'Low-rise': 'LR',
'High-rise': 'HR',
'Mid-rise': 'MR',
'Townhouse': 'TH',
'Loft': 'LO'
}.get(x, '') # Default
Posted to
Create Postgres database with UTF-8 encoding
over 1 year
ago
Don't forget to add the name.
Also if you are using the createdb command you are in your commandline so no need for the ;
createdb -E UTF8 -T template0 --locale=en_US.utf8 <name>
Posted to
pip outdated
over 1 year
ago
Crashes when it can't find an svn location it seems.
Warning: cannot find svn location for distribute==0.6.24dev-r0
Usage: /usr/bin/pip search QUERY
/usr/bin/pip search: error: no such option: -e
That makes me a saaaad panda http://www.bumperstickerz.com/images/1000336-02-00-00-00_lg.png
Posted to
for...in vs. for
over 1 year
ago
@engineergio Is the if so that it works the same in all browers?:
if ( x != null )
@passcod and @engineergio, both of yours are very terse/sexy indeed, but I wanted the tip to be more readable. The key insight here is that the for...in-loop only iterates three times.
Achievements
303 Karma
25,543 Total ProTip Views
Raven
Have at least one original repo where some form of shell script is the dominant language
Charity
Fork and commit to someone's open source project in need
Very welcome =)