When I want to make BEDOPS documentation available for offline browsing, here is the command I use:

wget –no-parent –recursive –page-requisites –html-extension –convert-links -E -l 2 http://code.google.com/p/bedops

This handy wget statement fixes up the img and other URL references so that links to images and other resources load up from the local copy. So what the end user sees is almost exactly like what she would see if the documentation was retrieved through a network connection. Very nice.

Read More

WordPress replaces quotation marks with curly equivalents, which is really frustrating when trying to copy and paste code. Add remove_filter('the_content', 'wptexturize'); to the bottom of the theme’s functions.php file.

Interestingly, this doesn’t seem to affect post titles, but that’s okay with me.

Read More

I had recently updated my copy of R to 2.15.1 and ended up needing to reinstall some libraries, including rgl.

If you use this R library, it can be tricky to install with the built-in build of Mesa/OpenGL in Lion. In fact, a straightforward install.packages("rgl") just won’t work at all.

But after using MacPorts to install freeglut, I found the following R command helps build rgl successfully:

install.packages(“rgl”, repos=”http://R-Forge.R-project.org”, configure.args=”–disable-cocoa –with-gl-includes=/opt/local/include –with-gl-libs=/opt/local/lib –with-x”)

Once installed, rgl can make cool figures, like this:

Read More