Skip to content

The nth Backup Solution

In the past, I had developed my own backup solution.  Unfortunately, over time it didn’t work out (mainly from changing systems, moving, using a laptop instead of a desktop, and maintaining it).  However, I still like the idea of incremental backups as well as a mirrored version of my files (it saves space and lets me keep a history going back some number of days).

(Continued)

Mozilla Fun

I was just looking at some XML, and saw that the namespace for XUL is

http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul

It looks like someone likes Ghostbusters at Mozilla.  I just found it amusing.

Technology and Courage

A few weeks ago, Ivan Sutherland came to Washington University to give a talk to drum up interest in a new idea he is working on (Fleet, Infinity & Marina [PDF slideshow]).  In my experience, most “old guy” talks aren’t that interesting because they meander with long tangential stories about their children.  Luckily, those were kept to a minimum and he had a good sense of humor too!

Now—interesting as the talk was—he suggested everyone read his only non-technical paper titled, “Technology and Courage” [PDF from Sun].  It took me until yesterday to read it, but it was certainly an interesting article.  I recommend everyone read it.

RSS Sucks.

I’ll admit that I haven’t spent too much time working with RSS feeds, but so far I’m unimpressed.  All they really seem to provide is a consistent view of published data for clients to read when they want.  That seems okay, but inefficient and a little redundant.  It seems like you could implement the same thing by just sending an email to people who want to subscribe.  At least then the end-user doesn’t have to use both an email client and feed reader (yes, I understand some programs combine the two technologies).  Alright, fine maybe you don’t want to give the “evil-faceless-corporate-giant” your email address, after all you know they’re going to sell it to someone.  Is there a better way to publish data? (Continued)

Remote Instance of Firefox via SSH -X

Firefox is a pretty decent web browser.  However, it can be a bit more clever than I want it at times.  For example, if I want to SSH into a remote machine and launch a instance of Firefox — to take on the remote machine’s IP address or access localhost — I would have to close the local instance then launch the remote instance.  That is annoying and unacceptable behaviour.

Luckily, the solution is fairly straightforward.  Once you have SSH’d into a remote host (using ssh -X), you simply need to run firefox -no-remote. Of course you may want to tack on > /dev/null and an ampersand & to ignore the output and background the task. (Thanks to The Open Sourcer.)

With Firefox 2.x this behaviour was somewhat undocumented, but with Firefox 3.x, running firefox --help from the command line shows the -no-remote option.  It also seems that the default (i.e. -remote), is “documented” on Mozilla’s site for Remote Control of UNIX Mozilla.

If you wanted to make the -no-remote behaviour the default when SSH’d into remote machines, you could simply add a few lines to your bash profile to alias the firefox command.

# If we're forwarding X over SSH, make firefox execute on this machine
if [ -n "$SSH_CONNECTION" -a -n "$DISPLAY" ]; then
    alias firefox='firefox -no-remote'
fi

At least that is what I did.

Archiving your Mail

For those that don’t know, I use mutt for my email needs. This provides several niceties such as stripping out all the various formatting people like to include in their emails (fonts, graphics, etc), a keyboard driven interface, and, well, it just sucks less that most mail clients.

With mutt I choose to download all my email via POP3 to a local machine where I can read it when I get around to it (rigorous, isn’t it). After I read a message and deem it complete I move it to a folder named after the sender (or possibly a group) where I can grep the files and read them at a later date.

However, after a while these files pile up and I need to periodically compress and archive them. This, of course, gets annoying and frequently forgotten. To solve this I needed a script that could parse messages in a number of mail formats, find a date, and determine if it is beyond some threshold at which point it should be archived. These requirements brought me to archivemail. Archivemail supports several input formats (IMAP, mh, mbox, Maildir), archives the messages, and outputs a single mbox formatted file (that can be compresses). While I’m not a huge fan of the mbox format I can easily deal with it for archived mail.

(Continued)

git branch –force

The headaches of coordinating a transition from svn => bzr at $JOB a few months ago have had time to fade, and I’ve now had some time to get used to using a DVCS on a day-to-day basis. Much like the experience of working with revision control is to the absence of it, I’ve found that the move to distributed revision control from centralized leaves one reluctant to return to the old way.

So, I’ve got Bazaar down pretty well—it’s design has been engineered for a smooth transition from Subversion—but Git is a different beast.

Git breaks a lot of the conceptual assumptions made in svn-land that you didn’t even know you were using to understand your daily VCS use; the basic “checkout, update, commit” operations don’t cleanly map to the git paradigm. This can create many WTF moments spent staring at lines of help like:

git-rebase - Forward-port local commits to the updated upstream head

The payoff for diving into these treacherous waters is, IMHO, worth it. When your first ‘git commit’ or ‘git checkout’ comes back within a few milliseconds and you’re left sitting there still trying to believe it’s already done… this is when you realize “Wow, this tool might actually change the way I work.”

rubygems requirement syntax for config.gem :version

This shouldn’t have been as difficult to find as it was, so I figured I’d better throw it somewhere.

  OPS = {
    "="  =>  lambda { |v, r| v == r },
    "!=" =>  lambda { |v, r| v != r },
    ">"  =>  lambda { |v, r| v > r },
    "<"  =>  lambda { |v, r| v < r },
    ">=" =>  lambda { |v, r| v >= r },
    "<=" =>  lambda { |v, r| v <= r },
    "~>" =>  lambda { |v, r| v = v.release; v >= r && v < r.bump }
  }

Found deep in the rubygems source.

If YAML.dump can’t produce valid YAML…

Yesterday I had fun with ruby’s YAML module not loading a piece of YAML I needed it to load. Syntax Error… fine–all in a day’s work. But then I started looking at the YAML in question and I realized, this was GENERATED by the module itself!

(Continued)

A Quick Introduction to Makefiles

Today at the Marquette Student ACM meeting, I gave a short presentation (PDF) about development on Linux.  Specifically using Makefiles.  As promised I have uploaded it to this site and I will give a little more information in this post.

(Continued)