2007: J F M A M J J A S O N D
2008: J F M A M J J A S O N D
2009: J F M A M J J A S O N D
2010: J F M A M J J A S O N D
2011: J F M A M J J A S O N D
2012: J F M A M J J A S O N D
2013: J F M A M J J A S O N D

Blog, by date: 2010_may

from the desk of travis johnson.

Getting GnuPlot to compile on OSX (from 2010/05/27)

I misunderstood an officemate’s question yesterday and set out to compile gnuplot. Stock GNUPlot will fail to compile on OSX due to an incompatibility in the readline library. So when you compile, let GNUPlot know to use the one included:

> tar xzvf gnuplot*
> cd gnuplot-4.2.39
> ./configure --prefix=/usr/local --with-readline=builtin
> make
> sudo make install

ZSH and scp/rsync globbing (from 2010/05/25)

I finally got annoyed at typing

tjohnson> scp tcj:*txt .
zsh: no matches found: tcj:*txt

I’d always fixed this by the up-CTRL-A-over-over-over-over-quote-CTRL-E-over-over-quote method, ie

tjohnson> scp "tcj:*txt" .

but the more proper and less annoying version is

tjohnson> scp tcj:\*txt .

However, in the spirit of inspired overkill, there are a couple other options. You can define some new aliases with

alias scp='noglob scp'

but that hardly counts as overkill, so instead I edited my .zshrc to include

autoload -U url-quote-magic
zle -N self-insert url-quote-magic
zstyle -e :urlglobber url-other-schema \
'[[ $words[1] == scp ]] && reply=("*") || reply=(http https ftp)'

Now, as I type scp tcj:* it replaces it with \*, negating the problem. Also, this fixes the problem where

wget http://traviscj.com/dynpage.php?var=1&importantvar=zyzyx

interprets the & as a ‘background this command’ and throws a couple of errors. Nice!

Pylab PDF (from 2010/05/25)

I’m in the process of kicking the MATLAB habit and replacing it with Python. Pylab is a reasonable approximation to the 2D plotting capabilities of MATLAB, but by default Pylab doesn’t run on headless(ie, non-GUI) boxes. So on my macbook, where I’m often running things interactively, I have

backend : macosx

and on the faster core2quad machine I send off longer-running jobs to, I used

backend : PDF

in the .matplotlib/matplotrc file.

Spaces setup (from 2010/05/25)

My workflow is probably pretty specific, but I figured I’d document it for people looking for ideas on how to set it up. This one seems to work pretty well for me.

  1. Terminal: for running stuff on my and other computers.

  2. Textmate: writing mathematics, programming code, etc

  3. Mathematica, MATLAB, and Papers

  4. Mail and Adium

  5. Firefox, Chrome, Safari

  6. iTunes and VLC

I have this arranged in a 3×2 grid, such that Textmate is top center. From there I can navigate to terminal, math programs, and Firefox directly(control-{left,right,down}). It takes two navigations to get to communication programs and entertainment, which is good for concentration while working.

Powered by Olark