I plan to use a magic number in the second major release of our BEDOPS suite to uniquely identify starch-formatted archive files. Looking at the first few bytes of the archive will help us because I plan to move the metadata to the back of the archive file, and it would be expensive to seek […]
Monthly Archives: July 2012
Using wget to grab a copy of a website for offline browsing
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 […]
Disabling “smart” quotes in WordPress posts
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.
Installing rgl in R under OS X Lion
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 […]