Sunday, 21 December 2008


I have some time off from work and decided it is time to
finally learn and use the colemak keyboard layout.
This is one of my new year resolutions, and I cannot
explain how exited I am about this. I'm actually typing
this post using it, but its still slow going.

I had some trouble getting it to work in ktouch, but I figured it out:

I also had some trouble convincing kubuntu to handle the capslock key
as a backspace key. The final solution for me was to make a little script,
and get it to run when kde starts up.

#setup capslock -> backspace (nice for colemak)
xmodmap -e "remove Lock = Caps_Lock"
xset r 66
run it automatically:
system settings -> advanced -> autostart

I practised for 30-45 minutes per day and I learn more keys every day.
Some of the nice things about Colemak for me are:
  1. You learn the common keys first, so you can actually start typing quite soon. (You can type a lot by just using the home row.)
  2. You are forced to touchtype, because looking at the keyboard doesn't help (assuming you didn't swap your keys, which I recommend.)
  3. Most of your short cut keys are in the same position.
I found these finger stretches quite handy:

Thursday, 11 December 2008

Symbolic link not allowed

I got the following nasty exception in my /var/log/apache2/error_log,
and it took me too long to figure out how to fix it:

Symbolic link not allowed or link target not accessible: /opt/gforge5/plugins/scmbzr

Where in my case /opt/gforge5/plugins/scmbzr is a symlink to somewhere else.
I checked and rechecked all my permissions, but nothing worked.

So eventually it turns out that for every directory in the path where you have symlinks, you need something like:

Options FollowSymLinks

(because I have a symlink in plugins called scmbzr)

Thanks a LOT to Ivan Van Laningham who mentioned this on some mailinglist:

Monday, 8 December 2008

A query which generates a sequence in Oracle

Sometimes for some reason, you may need a query in Oracle
which can generate a sequence of numbers or dates.
I found the following to be an elegant way of doing it:

--count from 1 to 10
SELECT rownum
FROM dual

--even numbers from from 2 to 20
SELECT rownum*2
FROM dual

--get the previous 100 days
SELECT trunc(sysdate) - rownum day
FROM dual

Thursday, 4 December 2008

Whoohoo, I'm a hero today!

In order to answer somebody's question today,
I figured out how to use bzr replay
this made me his hero for a day,
and this in turn has made *my* day!
Markus Korn confirmed that the question is solved:
Thanks a lot Marius, this initial commit did the trick,
you are my hero of the day ;)

Wednesday, 3 December 2008

oracle XE sessions and processes

I found that my locally installed Oracle XE runs out of available connections far too soon for a php app I'm running. This results in some weird gui behaviour: some frames just don't load. Fortunately I found a way to sort of makes it a little better:

sqlplus system@XE
show parameters sessions;
alter system set sessions=250
show parameters processes;
alter system set processes=200
sudo /etc/init.d/oracle-xe restart