Tip Jar Archives

Posts so helpful you might be compelled to tip me.

Adjacent Archive Links for WordPress

WordPress logoEver since I adopted the current design for my monthly archive pages (one that lists all my posts for that month by title, rather than paginated excerpts—Matt blogged about this approach back in the day), I’ve wanted a convenient way to page back and forth through my archives by month—without having to blindly hard-code links for $current_month−1 and $current_month+1. I discovered a few people asking for the same thing, and I found an out-of-date plugin that had attempted to accomplish it, so I decided to write my own from scratch, as part of my recent redesign. Here’s how it looks in context:

Screenshot of adjacent archive links
Screenshot of Adjacent Archive Links

Continue Reading »

Redirect Editor plugin for WordPress

WordPress logoI was looking for a WordPress plugin to manage a list of post redirects, but what I found was a little over-engineered for my tastes. I just wanted a simple web-interface to something resembling an .htaccess file. So I built it. It’s called Redirect Editor, and it provides a single textbox to manage a list of redirects, one per line, consisting of a relative URL path to match and an absolute URL destination to redirect to, separated by a space, e.g.

/2012/09/old-post/ http://www.example.com/2012/09/new-post/

Blank lines and lines that start with # (hash) are ignored and can be used for spacing and comments.

Continue Reading »

Why does that QR Code go to justinsomnia.org?

Back in 2007 I stumbled something called a QR Code. It was a neat two-dimensional barcode that encodes textual information visually—with URLs being a promising application for the emerging smartphone market (thanks to the release of the iPhone that year). So I did what any self-respecting personal blogger would do: I QR-encoded my own URL. And posted it to my blog.

QR-Code for http://justinsomnia.org/

At some point between then and now, my QR code image got lodged in the second position of Google Images’ search results for “qr code”. As a result, it became one of the most requested pages on my site, regularly clocking in several hundred requests a day. But what happened next defies rationale explanation.

Google Images results page for 'qr code' highlighting a result that points to justinsomnia.org
Google Images results, with my QR Code highlighted

Graph of monthly requests for http://justinsomnia.org/2007/12/qr-code/ from December 2007 to February 2011
Monthly requests for QR Code from Dec 2007 to Feb 2011

Continue Reading »

How to update your blog from the middle of the ocean

We are currently at 15°14’54.77″N 75°15’12.63″W, somewhere between Jamaica and Colombia, en route to Cartagena, Colombia. We should be arriving there tomorrow afternoon. I am posting this (and anything else that begins with GPS coordinates) using a Wideye Sabre 1 BGAN Terminal (or in layman’s terms: a satellite modem).

When we started planning this trip, I had resigned myself to a month without access to the internet. It sounded like a badge of courage when people asked me, “So, does the container ship have wireless?” and I answered: “Nope.” The last time I didn’t have access to the internet for 28 days straight was probably before I had access to the internet at all.

I’ll admit, I am weak. I did some cursory looking into satellite phones, Iridium and such. But they were just blindingly expensive. And I didn’t want to make calls, I just wanted an IP address! Eventually I stumbled upon Inmarsat’s BGAN, which stands for Broadband Global Area Network. Unlike the various satellite phone options, many of which only guaranteed coverage on land, BGAN covers the whole planet, continents and oceans, with the exception of the poles. It was almost too good to be true.

Inmarsat BGAN satellite coverage map
Inmarsat BGAN satellite coverage map

Continue Reading »

Ubuntu on a Lenovo ThinkPad X100e

Stephanie’s brand new ThinkPad X100e arrived today, so I got to have some fun tonight and set up Ubuntu on it for her.

Lenovo ThinkPad X100e

Installation via memory key

This was the first time I’d installed Ubuntu via memory key. Means I might not need my portable CD-ROM drive anymore…

  1. Downloaded the latest Ubuntu AMD64 Desktop ISO using BitTorrent
  2. Ran usb-creator to copy the ISO to my 2GB USB memory key (based on these instructions: Installation From USB Stick)
  3. Got the “DBus error” like the instructions anticipated, so ran the following command to format my memory key:
    sudo mkfs -t vfat /dev/sdb1
  4. Then I reran usb-creator
  5. Plugged the memory key into the X100e, booted it up, and installed Ubuntu

Getting wireless to work

Of course, bane of Linux, wireless didn’t work out of the box. This tends to be expected with brand new hardware, and it took me a while to piece together the right steps to get it working.

  1. Basically run exactly these commands (even sudo su):
    sudo apt-get install build-essential
    wget http://launchpadlibrarian.net/34090404/rtl8192se_linux_2.6.0010.1012.2009_64bit.tar.gz
    sudo tar -xvzf rtl8192se_linux_2.6.0010.1012.2009_64bit.tar.gz
    cd rtl8192se_linux_2.6.0010.1020.2009_64bit
    sudo su
    make
    make install
  2. Then reboot and you have wireless

Note: If you run the Update Manager and it contains a new Linux kernel, you’ll need to rerun make install in ~/rtl8192se_linux_2.6.0010.1020.2009_64bit to reinstall the wireless drivers. So don’t get rid of the rtl8192se… directory. Hopefully this will cease to be a problem in the next release of Ubuntu.

Getting the TrackPoint scroll button to work

Apparently xorg.conf is a thing of the past, which kind of obsoletes my previous TrackPoint “scroll button” instructions. Oh well. This is how you do it now.

  1. Install and run gpointing-device-settings
    sudo apt-get install gpointing-device-settings
    gpointing-device-settings
  2. Select TPPS/2 IBM TrackPoint on the left
  3. Check “Use wheel emulation”
  4. Select button #2

Getting the headphone jack to work

I didn’t realize this was a problem at first, but thanks to all the comments, folks got to the bottom of the issue. This is what worked for me.

  1. Edit /etc/modprobe.d/alsa-base.conf
    sudo gedit /etc/modprobe.d/alsa-base.conf
  2. Add the following two lines at the end of the file:
    options snd-hda-intel model=lenovo-101e
    options snd-hda-intel position_fix=1 enable=yes
  3. Restart the computer