GPS track analysis

GPS data has become extremely available in the last time and analyzing it always yields interesting results.The purpose of this article is to show a simple example where GPS track data is compared with a set of waypoints in order to determine whether a specific tracks was followed. This scenario is custom to various competitions ranging from randonee, cycling (cross country, orientation), 4×4 and the examples can go on and on....

October 3, 2010 · len

Hibernate JbossCache integration

Introduction JbossCache is a wonderfully complex piece of software. Trying to use it with Hibernate might seem an easy task at first but in reality it can also prove wonderfully complicated. First question is: why would you consider using it in the first place? Compared to ehcache for instance there are a few theoretical advantages: clustering (scalability), configurability and jmx monitoring. Next question which is not quite obvious is which version to use?...

September 20, 2010 · len

JBoss session cookies

If you are using cookies for inter-context communication you will notice after migrating from JBoss 4 to 5 that they just don’t work. If you take the time to do some cookie debuging you will notice that in JBoss 5 the cookies are bound to the context as shown bellow: Name JSESSIONID Value ACF23793236E94A664E652AA77AC7578 Host localhost Path /myApp/ Secure No Expires At End Of Session This means there is no way this cookie can be used to comunicate with /myApp2/ for instance....

September 14, 2010 · len

Broken DELL

My Dell D820 broke yesterday a few months after the warranty expiration. There is a sadness associated with the moment your laptop is broke which cannot be explained. I had this feeling with this laptop 3 times already. I think the next question will be not: “which dell should I buy?” but rather “which laptop should I buy?” which is far more complicated. Anyway I realised in 11 years since I own Dell laptops most of the criteria for choosing one are the same:...

September 3, 2010 · len

The long awaited migration from Qmail to Postfix

I’ve been running qmail based mail servers for years. And you can imagine how many if I am planning this migration from at least 3 years. To be very honest qmail does a very very good job. This is the reason it took so much time to actually do it. In fact qmail has only one problem: it’s stuck in the past. If you want to install something new: say SPF of DKIM you need to patch, recompile....

August 20, 2010 · len

The value of “.” (a bug’s life)

Track summary no 1463: Client detected a bug. Bug replication took 2.5h. Bug correction took 2 min. Modification consisted of unification of several cases where position of b in XML is variable a.b => a..b. Project compilation 10 minutes. Actual difference in code is insignificant. Total time: over 3h.

July 21, 2010 · len

Status RSS plugin for pidgin

As a pidgin user I am used at not expecting many fancy things but one of the features I’ve wished for some time is a plugin which updates the status automatically to the last entry in a RSS feed. As an example I’d like to update the status to the last post on my blog. So, even if I don’t like perl too much here is a simple plugin which does just that....

July 15, 2010 · len

Delete self-pings

It seems that self-pings are bad for Google page ranking. Well, I have never spended too much time thinking about SEO but I find them a bit clutering and thus I’ve decided to remove them. There are some plugins which block new self-pings but none which deletes the existing ones. So here is a mysql command which does just that: Warning: don’t execute sql commands on your db if you don’t know anything about what sql is, it might ruin your base....

July 11, 2010 · len

Python xml namespace parsing with libxml2

The goal of this tinkering was simple: to parse a KML file for further interpretation and use using python and libxml2. First test <pre lang="python">#!/usr/bin/env python import libxml2, sys doc = libxml2.parseFile(sys.argv[1]) ctxt = doc.xpathNewContext() ctxt.xpathRegisterNs('kml', "http://www.opengis.net/kml/2.2") root = doc.getRootElement() res = ctxt.xpathEval("//kml:Placemark") for e in res: nodes = e.xpathEval('kml:name') if len(nodes) > 0: if nodes[0].content.strip().startswith('cp'): coord = e.xpathEval('kml:Point/kml:coordinates') if len(coord) > 0: print coord[0].content.split(',') doc.freeDoc() ctxt.xpathFreeContext() This sounded ok according to the scarce doc but resulted in the following error:...

July 9, 2010 · len

Tethered capture with ubuntu and D450

Shooting a photo and the imediately seeing it on a large monitor is a feature I’ve always wished. I don’t say live view on a display but instant copy and display would suffice. And actually, as I found out, it’s quite easy to achieve on Ubuntu Linux (10.04) with a Canon D450. Required software Make sure gphoto2 and geeqie (former gqview) is installed. An apt will do the trick: sudo apt-get install gphoto2 geeqie Scripts I’ve written 2 scripts....

July 8, 2010 · len