Archive for the 'All software sucks' Category

Week numbers in iCal

I can’t understand why Apple has not included week numbers in iCal. Not even as an option. Well, luckily I found a php script that generates a calendar that you can import into iCal and that way get week numbers as “whole day” events. Ugly? A bit, but it might be worth it.

I made some own modifications to the script. My version accepts 0-2 parameters denoting starting year and ending year (if specified). If neither parameter is specified, the generated calendar defaults to the current year. If only starting year is specified, the script generates the week numbers for only that year.

The script can be viewed and downloaded here. Save the file to your computer and rename it to generate_ical_week_numbers.php. Note that you need php to be able to run the script.

Usage:

$> php generate_ical_week_numbers.php \
   [startyear] [endyear] > week_numbers.ics

Then import the file week_numbers.ics file into iCal as a new calendar. That’s it.

The original script was found here.

autossh + screen = fully automatic relogin

When working inside screen over ssh in the Mac OS X Terminal application, it for some reason always hangs after the computer has slept. There’s seems to be no way to resurrect it, other than closing the Terminal and opening a new one, letting the old ssh connection die in loneliness.

However, this problem is avoided by either not using screen (magically, a “normal” ssh connection doesn’t hang the Terminal), or by using autossh to automatically restart a lost connection. I decided to try out the latter option.

Continue reading ‘autossh + screen = fully automatic relogin’

Migrating part of repository in SVN

Phew, I finally did it. Migrating part of an svn-repository to a new repository while changing the destination paths isn’t as trivial as the svn manual implies. The workflow according to the book should look like this:

  1. Dump the repository while filtering with svndumpfilter
  2. Edit the dumpfile to change paths
  3. Load the dumpfile into the new repository

While this is basically what I did, it wasn’t as straight forward as it sounds…

Continue reading ‘Migrating part of repository in SVN’