YouTube Link:

Posted in Uncategorized | Comments Off on !$

World’s smallest USB drive… now even smaller!

The PQI i810 claimed to be the smallest drive on the market at one point (I’m not sure if they still do). But having just made a chicago screw compact keychain, I no longer had a spot on my keychain for it. Small wasn’t small enough. Also the spring clip that holds the protective housing in place when expanded or contracted had just broken so I decided to do away with the housing completely.

I was a simple job with needle nose pliers and a utility knife and now I have a wallet-size USB drive:

Posted in Uncategorized | Tagged , | Comments Off on World’s smallest USB drive… now even smaller!

Stop #@$!ing up my last name!

My last name is not:

  • Braun-jones
  • Braunjones
  • Braun Jones

Yet those were my options according the the person responding from info@reunion-specialists.com. I fully understand the problem they face1:

Sorry about the limited options, alumni were entering their names with all caps or all lower case and the name badges looked terrible so we wrote this rule to keep things as consistent as possible.

But their solution is pathetic: always capitalize the first letter and any subsequent letter that is preceded by a space. Since the support contact at Reunions Specialists was completely unapologetic and not even willing to fix my name by hand, I decided to stop for 15 minutes and spoon feed the webmaster of the reunion-specialists.com. A very good (but not perfect) solution is not difficult to design if you just realize that (1) virtually no surname consists of all lowercase or all uppercase and (2) almost all mis-capitalization is due to the use of all lowercase or all uppercase. So, if the entered surname contains mixed case, the user probably meant for it to be that way. If not, do your best to guess the correct capitalization, but since the user didn’t even care enough to type it right, don’t feel bad if you don’t get it perfect. Here’s a basic PHP implementation:

This gives pretty decent results:

  1. Well, not really. They are charging $80-100 per person to attend a high school reunion so I know they have the funds to do old-fashioned human input validation. []
Posted in Uncategorized | Tagged , | Comments Off on Stop #@$!ing up my last name!

Patching and PPA'ing

I do this so irregularly that I can never remember the proper steps and haven’t been able find a simple source that has all the information I need, so here it is.

  1. Get the source with
  2. Make the changes
  3. Add the change log entry by running the dch (Debian CHange) tool from the project’s root directory (i.e. the directory that contains the debian directory)

    Simplify this process by setting two environment variables in your Bash user config:

    Also make sure to follow these version numbering rules:

    2.6.0-1 The first Debian package of version 2.6.0. No Ubuntu changes were included
    2.6.0-1ubuntu1 The first Ubuntu package based on the Debian package version 2.6.0-1
    2.6.0-0ubuntu1 There was not a Debian package yet and this is the first Ubuntu version of package 2.6.0
    2.6.1-1ubuntu1~svn1 The first development release of what will be 2.6.1-1ubuntu1. package-1.1~svn1 < package-1.1, so that it can be used for pre-release versions, such that package-1.1 would replace package-1.1~svn1 when released.
    2.6.0-1ubuntu1+myppa1 Patched version of 2.6.0-1ubuntu1. + does the opposite of ~, so that package-1.1+myppa1 replaces package-1.1.
  4. Still in the project’s root directory, build the source package:
  5. If you just want to build the package and install it (skipping the next step) you can drop the -S option and debuild will default to building the binary package (-b).

  6. Upload to your PPA:
Posted in Uncategorized | Tagged , , , | Comments Off on Patching and PPA'ing

Lifestyle Creep

As far as I know, this Mint blog post coined this phrase, but I actually like this post from diveintomark.org that covers the same topic of happiness through simple living. Things like shedding material attachments.

Posted in Uncategorized | Comments Off on Lifestyle Creep

Debian/Ubuntu Package Installation Shortcut

Alt-F2 then type

Simple, quick, and should work in any window manager. Just remember that package names are case sensitive and almost always lowercase.

Here’s an example where I install XBMC:

Then just click Install:

This example is with Ubuntu’s default window manager, GNOME, but should work basically the same way in any other window manager, just not as pretty. *ducks*

Posted in Uncategorized | Tagged , | Comments Off on Debian/Ubuntu Package Installation Shortcut

Synergy for HTPC control

Synergy. Great app.
Synergy for HTPC control. Great application.

Setup is pretty simple, but the Synergy HOWTO on the Ubuntu Community Documentation was pretty horrendous. I decided I’d give back a little and did a major clean up/rewrite of it and now it is actually usable.

The one technical contribution I made was to speed up the X/GDM scripts slightly. Instead of:

It is now:

You could say it saves less than a second. Or, you could say it’s about a 10x speedup 🙂

Now if someone would just write a synergy client for the Android platform I could get rid of Gmote and all it’s annoying quirks.

Posted in Uncategorized | Tagged , , | Comments Off on Synergy for HTPC control

Waking Up is Hard to Do

Since I couldn’t possibly write it any better, this is plagarized from the user page of a random Gnome developer:

  • 2:00 AM: Set alarm for 10 am (physical switch)
  • 2:03 AM: Tape piece of paper over alarm with the text “Why are you ruining my life?”
  • 2:07 AM: Go to bed
  • 2:15 AM: Fall asleep
  • ??? AM: Alarm is switched off, and the piece of paper is retaped over the alarm by a mysterious force. Abducted by aliens? Gremlins? Cruel alter ego?
  • 12:17 PM: Wake up with no memory of the alarm being disabled. Paper is still taped over the alarm like the alarm was never turned off (?!?)
  • 12:18 PM: Perform thorough exam for signs of alien abduction: scars, incisions, chips in the back of my neck, probes in various orifices. Results, negative
  • 12:19 PM: Inspect apartment security fixtures. Deadbolt: in place. Physical chain slider thing: in place. Pole blocking sliding glass door: in place. Grill over fan vent in bathroom: in place. Gremlin trap: empty

Conclusion: I have a cruel alter ego who wakes up when the alarm goes off, disables it for who knows what reason, laughs mischeviously, and then goes back to bed.
Solution: Tie myself up before going to bed.
Problem: How do I get out of bed when I’m back to my calm mild mannered normal self?

Posted in Uncategorized | Tagged | Comments Off on Waking Up is Hard to Do

Better FOSS QA Testing

I just had a random thought when I came across the following in the Changelog for VirtualBox 3.1:

Mac OS X hosts (64 bit): don’t interpret mouse wheel events as left click (bug #5049)

This seems like something basic that should have been caught in a beta release, but it didn’t because there is no way to monitor the use case coverage. The typical QA process for most FOSS applications is to release a Beta version, watch the bug reports pour in, fix them, and repeat.

This is great, except – Wait, no, that’s not what I meant to say. This sucks. Of all those beta users who downloaded gizmo-0.9beta how many actually tried using, say, the HTTP proxy feature? Or ran the application over a dial-up connection? Or ran on 64-bit OS X?

There are all kinds a solutions to this problem, all of which could be integrated into one of the many software project managment tools out there like code.google.com, Trac, sf.net, etc.

Ask for an email address when before reaching the beta download link and follow up a week later asking the user to fill out a quick report about the environment they ran the software in and, optionally, a list of the programs features they used. Click a green check next to the feature if it worked properly, and a red X if the feature did not work. After the form is submitted, post a screen with links to the effect of “Click here to submit a bug report for your problems you experienced with xyz”

Take that one step further and ask for permission to collect information about the environment the first time it launches. If the user is willing to loose anonymity they can also enter their email address and the form they they are emailed one week later will be pre-populated with as much information about their environment/usage experience as possible.

Even better, turn this data into any number of cool visualizations which are publicly available in real time. Developers can quickly see what aspects of the software are problematic and, more importantly, what environments have not been test much (or at all). Hopefully they would decide to make some sort of concerted effort to get test coverage for those areas. And by making the data public and easily accessible in the form of pretty charts, users can see how well tested the application is on their particular platform/processor/new-fangled-peripheral.

Okay, that’s enough ranting for tonight.

Posted in Uncategorized | Tagged , | Comments Off on Better FOSS QA Testing

Easy, automated backups with rdiff-backup

Let me start by saying rdiff-backup is exactly the tool I set out to find when looking for a backup solution. It makes use of librsync so you get all the goodness of the rsync remote-delta optimization algorithm, plus incremental backups. To top it off, your most recent backup is stored as a simple mirror so recovering your most recent backup of a given file is just a matter of (s)cp’ing it.

To setup automated, unattended backups (the holy grail of data backups) I used a good HOWTO guide for setting up unattended backups. so I won’t duplicate that; I’ll just summarize and detail the parts that are unique to Debian or ARM/embedded systems (I’m running Debian squeeze on a SheevaPlug). For simplicity, I’ll use the same machine names as were used in the original HOWTO – kitty for the backup server and fishie for the machine to be backed up. I’m only backing up one home directory on fishie for a hypothetical user we’ll call nemo.

  1. First, install rdiff-backup on kittie and fishie:
  2. Create an account for your backup bot:
    My 1 TB USB hard drive is mounted at /var so that is where I place the home directory. This also follows the FHS guidelines.
  3. Create a public/private key pair for backupbot, copy it to the authorized_keys file of nemo@fishie, then test it:
  4. Assuming the above commands worked, you should now be logged in as nemo@fishie. Open an editor and prepend the following to the long line of gibberish that was just added to ~nemo/.ssh/authorized_keys
    Now any SSH session that is authenticated using this key will (1) automatically launch rdiff-backup in server mode and (2) have several SSH features disabled (for extra security).
  5. As backupbot, open ~backupbot/.ssh/config (sudo -u backupbot emacs ~backupbot/.ssh/config) and enter the following:
    Some notes about these options:
    • I don’t use root to log into the remote machines because I’m only backing up home directories. This means you should take care to not to create files within your home directory that you do not have read access to (or at least keep them confined to one subdirectory so that rdiff-backup can skip them with a simple –exclude option). To find and fix any files that you may have already created while (e.g.) running as root use the following command:
    • The first time I ran a backup I used ‘compression yes’. I promise never to do that to you again, poor little SheevaPlug. If you have a slower link speed or a faster CPU then compression may make sense. For more optimization you may want to experiment with ‘cipher blowfish’ option. It can supposedly run at 88% of the speed of ‘cipher none’ but I haven’t had a chance to play with it myself.
  6. The last step is to automate the backup. Run sudo -u backupbot EDITOR=emacs crontab -e. Add the following crontab line:
    This will run a backup every night at 12:30 AM and delete any incremental backups older than 3 months.

I’ll do a follow up post on how I setup postfix with Gmail’s SMTP servers. So that each user gets an email each morning with the status of the backup.

Posted in Uncategorized | Tagged , , , , | Comments Off on Easy, automated backups with rdiff-backup