Wednesday, 23 May 2012

Stop VIM scrolling two viewports simultaneously:
:set scb!

Keyword:scrollbind

Wednesday, 9 May 2012

Python Adventures Part 1

Add path using shell variable PYTHONPATH
then load module of your file (i.e. survey.py)

Must reload this everytime a change is made using reload(survey). Ugh.
To fix this, go to ipython and 
import ipy_autoreload. 
Then run 
%autoreload 2

 (other behaviours given by %autoreload ?)

To read csv, import numpy and then use function recfromscv

to get help with functions, import the module and type help(module.function)

To automatically make all things in a module accessible just do 
from module import *


Wednesday, 15 February 2012

Bash no clobber

either set noclobber to 0 or just use >| instead of >

Thursday, 19 January 2012

Remove Encryption from PDF

for i in *.pdf; do gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${i%%.*}_unen.pdf -c .setpdfwrite -f $i; done;

Tuesday, 13 December 2011

Friday, 25 November 2011

SVN add project

svn import . path/to/repository