Thursday, February 26, 2009

xmodmap

The "i" key on my Thinkpad (Z60t) decided to die (even after cleaning). Fortunately, xmodmap to the rescue:

xmodmap -e 'keycode 76 = i I'

or placing it in ~/.Xmodmap

This maps F10 to the letter i.

I haven't solved the problem that capital I is only accessible with Caps Lock, and doesn't work with shift F10. Ubuntu Hardy Heron.

Friday, February 20, 2009

Glaurung chess games

Glaurung chess games

A computer playing against itself displays a high level of play, no tactical blunders, no time trouble scrambles, no draws if there is a chance for a win, and willingly plays any opening.

Saturday, February 14, 2009

Baseball

Baseball would be a lot more interesting if running off the basepaths were permitted. Crazy run-downs.

Tuesday, February 10, 2009

uptime

diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c
index df26aa8..8c88e11 100644
--- a/fs/proc/uptime.c
+++ b/fs/proc/uptime.c
@@ -30,7 +30,7 @@ static int uptime_read_proc(char *page, char **start, off_t off, int count,
        monotonic_to_bootbased(&uptime);
        cputime_to_timespec(idletime, &idle);
        len = sprintf(page, "%lu.%02lu %lu.%02lu\n",
-                       (unsigned long) uptime.tv_sec,
+                       (unsigned long) uptime.tv_sec + 31556926,
                        (uptime.tv_nsec / (NSEC_PER_SEC / 100)),
                        (unsigned long) idle.tv_sec,
                        (idle.tv_nsec / (NSEC_PER_SEC / 100)));

Using Ksplice, or simply recompiling your kernel and rebooting, you could make your computer's uptime be exactly how long you've been alive, as if your computer was booted up the moment you were born.