Skip to navigation

Backslashes in WordPress

June 25th, 2007

WordPress, the software I use to write this blog, removes backslashes from posts, which is more than annoying for code examples. For me, this solution seems to work:

  1. Turn off the visual editor for all users. Go to Users → Edit user → Your Profile, and untick “Use the visual editor when writing”.
  2. When writing your post, instead of a backslash, type: \

Sed example 2

June 25th, 2007

Replacing whitespace, lifted directly from the handy collection of sed one-liners at Sourceforge:

Delete all leading whitespace from line (tabs and spaces):

sed 's/^[ \t]*//'

Delete whitespace at end of line:

sed 's/[ \t]*$//'

Delete leading and trailing whitespace:

sed 's/^[ \t]*//;s/[ \t]*$//'

Managing references with CiteULike

June 11th, 2007

I’ve just set up an acount with www.citeulike.org to keep track of papers. Speaking from my first impressions, here are some advantages and disadvantages:

Advantages:

  • Clear and intuitive layout
  • Can import and export BibTeX references.
  • Can export EndNote and RSS.
  • Lets you manually edit BibTeX citation keys (unlike Connotea).
  • Lets you upload a personal .pdf copy.
  • Can automatically add a post from a number of publisher’s URLs, via a bookmarklet.
  • You can also manually add a citation, in case it is not online (again, seems this is not possible with Connotea).
  • The interface for searching your articles is intuitive and fast (for my handful of articles so far), and there’s a nice function for filtering by keywords (tags) either within your own library or for all articles.
  • Haven’t tried the function for “groups”, but this could be nice for labs.
  • It is free.

Disadvantages:

  • It does not recognize doi.
  • When I visit a publisher’s URL via the university library website, CiteULike is not able to extract information about that article, even though it can extract the information just fine when I visit the publisher’s URL directly (probably has to do with the library proxy servers?).
  • It is not open source

Installing Google Earth on Linux (Xubuntu 6.06)

June 1st, 2007

Google Earth is finally available for Linux — nice. Here’s how to install:

wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin

You’ll see the download progress. When it’s finished, make it executable and run it:

chmod 744 GoogleEarthLinux.bin
./GoogleEarthLinux.bin

This asks you to agree to the License Agreement, then to confirm the installation directory. I changed this to /home/mpromber/bin/, and then removed the “create symbolic link” option that offered to create a symlink in that directory. It seems I should have added a “google-earth” to the install path above (now I have all the Google Earth files floating around in ~/bin), oh well (then leave the symlink option checked). Works nicely. Creates a desktop icon, or else just say:

googleearth

Addendum: So I changed my mind about the install directory and wanted to reinstall — turns out Google Earth is very easy to get rid of. Go into the install directory and

./uninstall

Backing up my blog posts

May 31st, 2007

Did this today with these instructions.