Archives week 34 of 2010

Aug. 23, 2010 - Aug. 29, 2010

Catty ssh is cool

Was looking up something for a backup operation and saw a command where someone was catting from ssh... I'd never thought of doing it before, but it does make sense:

ssh "pg_dumpall | gzip -c" > ~/cluster.sql.gz
should connect and dump the entire DB cluster (gzipped) to your local machine.
ssh "gunzip -c ...

Continue reading

All those little spots where you use strings...

x.split( '.' )
Is an idiom that shows up all over the place, particularly in list comprehensions. Run your code through 2to3 and it fails when x is a str (bytes) object, as 3.x thinks the '.' is unicode. It fails with a rather cryptic TypeError: Type str doesn't support the buffer API error as ...

Continue reading

Daily archives

Previous week

Week 33 of 2010

Next week

Week 35 of 2010