jake RSS


jakehofman.com

Archive

Nov
19th
Thu
permalink

tip: python

quick and easy way to remove non-ascii characters from a string: filter(lambda c: ord(c)

tips  python 
Nov
17th
Tue
permalink

tip: shell

use !, ^, etc. for quick navigation of previous commands http://bit.ly/1BLVdt

tips  shell 
Nov
15th
Sun
permalink

tip: bash

use parameter expansion to remove file extensions in shell scripts, e.g. ${file%.*} http://bit.ly/4mJ8ev

tips  bash 
Oct
12th
Mon
permalink

tip: python

to create a nested defaultdict of defaultdicts, use d = defaultdict(lambda : defaultdict(int)) http://bit.ly/tUbev

tips  python 
Aug
17th
Mon
permalink

tip: networking

use tcdump to capture packet traffic sudohttp://bit.ly/COr2z

tips  networking 
Aug
10th
Mon
permalink

tip: matlab

use java.util.Hashtable for a hashtable http://tinyurl.com/d5rwv6

tips  matlab 
Aug
6th
Thu
permalink

tip: shell

script from @dreev to transparently use gnu screen over ssh for persistent logins http://bit.ly/lYNtG

tips  shell 
Aug
4th
Tue
permalink

tip: macosx

to fix 403 forbidden error on apache in 10.5 (leopard), create appropriate /etc/apache2/users/user.conf file http://bit.ly/242lt

tips  macosx 
Jul
28th
Tue
permalink

tip: mysql

use show tables like “table_name” to see if a table exists http://bit.ly/SjdBG

tips  mysql 
permalink

tip: python

return rows as dicts with mysqldb using the DictCursor class http://bit.ly/56bBm

tips  python