Open source

Patch to add -p option to touch, a la mkdir -p

The other day I realized that often when I'm using touch, I'd like it to have the ability to create ancestor directories that don't exist, a la mkdir -p. I quickly hacked together a shell script to do what I want.

Then I thought that this might be a generally useful extension to touch, so I thought I'd take a stab at adding it directly to the touch source code in GNU coreutils. Here's my patch, which I sent to the mailing list:

OS/2 Warp 4 in QEMU on Linux

Well OS/2 does work in QEMU, though I guess you might say that I cheated a bit - I did this by doing the install in VMware Player and then using qemu-img to convert the file from a vmdk to a qcow.

os2warp4_qemu

Improving touch

I've sometimes wished that the UNIX touch command had the same -p option as mkdir. With a little bit of scripting, it can:

#!/bin/sh

mkdir="/bin/mkdir"
touch="/usr/bin/touch"

for arg in $*; do
    if [ "$arg" = "-p" ]; then
        opt_p=true
        continue
    fi
    if [ "$opt_p" = "true" ]; then
        $mkdir -p $(dirname $arg) && $touch $arg
    else
        $touch $arg
    fi
done

Deb A Day

What a great idea! This site will highlight Debian/Ubuntu packages that you may not know about on a regular basis. I hope it keeps going.

http://debaday.debian.net/

STLport

The C++ programmers among you might be interested in this:

http://www.stlport.org/

STLport is an STL implementation that has some interesting features:

  • Debug mode
  • Thread safety
  • Exception safety
  • Portable to many platforms, including Windows/Visual C++

RHEL4 qemu-0.8.2 package

The following RPMs were built by downloading the 0.8.0 source RPMs from rpmforge, making a few minor mods, and then rebuilding:

Binary packages:

Source package:

User Mode Linux: SKAS0 poorly documented

It's unfortunate that SKAS0 mode is poorly documented on the User Mode Linux (UML) web site. For example, this page about SKAS doesn't mention it. It is explained in Jeff Dike's UML book though.

I wish they would update the UML web site as it gives the impression that TT and SKAS3 are the only choices, which is no longer true, as SKAS0 was added to the kernel in version 2.6.13.

Ubuntu 6.10 on my PowerBook

My PowerBook has been continually crashing in OS X. As a last ditch attempt at salvaging it (or proving beyond the shadow of a doubt that the hardware is bad), I'm running the PowerPC version of Ubuntu on it.

Ubuntu 6.10 on my PowerBook

Capistrano on DreamHost

I keep meaning to play more with Ruby on Rails when I get a chance.

It's nice to know that Capistrano can be used to deploy RoR apps to DreamHost. That way I can develop at home in a secure environment with a comfortable development environment and then deploy to DreamHost.

Here's a nice Wiki page on how to use Capistrano with DreamHost.