Øresund Agile 2010 takes place on May 17-20 in Malmö

March 10th, 2010

Øresund Agile is short for…

the meeting point for Agile Software Development in Scandinavia

I expect great talks and workshops. For example, Johanna Rothman will be speaking!

By the way, Lean Magazine #5 is available for download!

Now on IPv6

February 14th, 2010

I configured a bunch of IPv6 addresses on my GleSYS VPS and got it working after setting the proper route.

After that I added AAAA records for the .se domains I buy through Loopia, including this one. Some of my domains are on easyDNS and they do not appear to support AAAA records until the new member interface launches. According to 1,5 years old information it should add AAAA support.

For testing I added an IPv6-only record for this server: ipv6.divideandconquer.se

Remote control of XBMC, but not too much

January 23rd, 2010

Yesterday and today I have scripted a small web interface for remote control of XBMC using its HTTP API. (BTW, That API could really use a redesign!)

It’s actually just a page showing a screen shot and the name of the file that is currently playing, together with some commands to remote control XBMC.

Available commands are pause/resume, stop, play another file, and shutdown.

I also implemented support for showing notifications on the XBMC screen, which gave me an idea:

The Google Calendar can e-mail reminders for appointments. If XBMC is running, the reminder could be shown as a notification on the XBMC monitor.

I was just about to start implementing this calendar-reminder-in-XBMC when I reminded myself that there are many other small and big projects that would be more valuable for me. But instead of throwing this idea right down the trashcan I decided to blog about it first. Done!

Now I’ll spend some valuable time with my son!

Mark as junk in Evolution, train SpamAssassin on server

December 28th, 2009

Evolution has a feature for marking e-mail as junk. This will set an IMAP keyword “Junk” on those messages. On my mail server I run Dovecot as IMAP server and Spamassassin through Amavis to filter spam. How could I get Spamassassin to learn that all e-mails marked as junk in Evolution are spam? With a shell script, of course. I currently run it as root but maybe it is possible to give the amavis user permissions to read my Maildir…

#!/bin/sh

if [ `whoami` != 'root' ]; then
  exec sudo $0 $@
fi

find ~david/Maildir -name dovecot-keywords | (
while read keywords; do

  DIR=`dirname $keywords`
  #echo $DIR >&2
  # XXX only supports 10 keywords
  CHAR=`awk '$2 == "Junk" { print $1; quit;  }' $keywords |
    tr '0-9' 'a-j'`

  if [ "$CHAR" ]; then
    find $DIR/cur $DIR/new -regex "[^,]*,[^,]*$CHAR.*" |
      xargs sa-learn --dbpath /var/lib/amavis/.spamassassin/ --spam
  fi

done
)
/etc/init.d/spamassassin reload

Helpful pages: Maildir format used by Dovecot, Spamassassin with amavis: Tips and tricks.

Policy notification from Google

December 15th, 2009

My Swedish site Folkmun allows anyone to add words and their definitions. It’s a simple Swedish version of Urban Dictionary. Some people add very explicit words and I had totally forgotten that such words may clash with Google AdSense policies. Today I received a friendly warning:

While reviewing your account, we noticed that you are currently displaying Google ads in a manner that is not compliant with our policies. For instance, we found violations of AdSense policies on pages such as
http://www.folkmun.se/definition/Apaj%C3%A4vel. Please note that this URL is an example and that the same violations may exist on other pages of your website.

Needless to say, I have made a couple of modifications to the site, including hiding ads when displaying explicit words or definitions. If this wasn’t good enough, I’ll know in a couple of days…

New site: Blekinge.IT

December 8th, 2009

As much as I try to get rid of domains I don’t use, I can’t avoid registering new domains. I recently registered two domains (singular and plural) for a project with codename Green November.

Another domain I recently registered is Blekinge.IT. At some point in the future I want it to be a site about IT and telecommunications in the Swedish province Blekinge, but for now I only use it to aggregate local news sources.

This was also a test in registering .it domains. I had to print, sign and send a fax (!) to fulfill the registration, but otherwise it was really easy.

PulseAudio support in Wine makes Spotify work better!

December 7th, 2009

For various reasons (see bottom of WinePulse – PulseAudio for Wine) the main branch of Wine does not support PulseAudio. This makes Spotify under Wine misbehave a bit, but fortunately there is a solution! A person called Neil Wilson has been kind enough to provide PPA packages of Wine with the WinePulse patch. I’m installning this PPA on all my Ubuntu machines where me of my wife use Spotify.

fmod() in PHP is the worst !”#¤%&/()= function ever!

November 10th, 2009

I hate floating point artithmetic and I really hate fmod() in PHP. It’s useless.

fmodReturns the floating point remainder (modulo) of the division of the arguments

If you calculate 36 modulo 7.2?  What do you get? Zero, yes. 7.2*5=36. No remainder!

What if you use fmod in PHP?

$ php -r 'echo fmod(36,7.2);'
7.2

WTF? Excuse me? Is that the result from IEEE 754 hell, a parallel universe, or what?

Now I’m betting on the function below. I hope it won’t let me down.

function modulo($n,$b) {
return $n-$b*floor($n/$b);
}


Ubuntu upgrade behind firewall

November 6th, 2009

I’m currently upgrading my Ubuntu-in-VirtualBox at work from Jaunty to Karmic, but at first it didn’t work at all. Update Manager got stuck when I clicked the “Upgrade” button.

Due to the Big Corporate Firewall all Internet access must go through the the Enterprisey Proxy so I immediately suspected a firewall/proxy issue. However, Update Manager, apt, etc have worked fine for a long time, so it must be something upgrade-specific.

Some debugging and googling led me to the url_downloadable ignores proxy settings bug report. Maybe I should have enabled jaunty-proposed but to get going I simply applied the attached patch and was able to get started with the upgrade.

Are you still using the old Java plugin for Firefox?

November 4th, 2009

In about:plugins, what’s the filename of the Java plugin?

Is it libjavaplugin_oji.so? If so, you should update to the new Java plugin. Run:

sudo update-alternatives --config xulrunner-1.9-javaplugin.so

Now select libnpjp2.so instead and restart Firefox.

Source: Out of date java 6 plugin installed.