Monthly Archives: May 2013

Using XBMC with an external player

First of all, XBMC looks really awesome:

I’m using XBMC mainly to watch my favorite internet streams, such as TED and vimcasts.

I’m not using it yet for my movie collection, because I have some issues with its built-in player:

  • Adjusting the volume is not easy enough: in VLC I can just use the mouse scroll
  • Adjusting the aspect ratio is not easy enough

Finally I figured out how to use an external player. I created a configuration file in ~/.xbmc/userdata/playercorefactory.xml like this:

This way it will use VLC for local video files only, and continue to use the built-in player for others.

For more information on hacking the configuration, see the docs.

Using custom fonts on Android

The default fonts you can choose from when developing for Android are not very interesting. Normally they are OK for my simple purposes, but for once I wanted something a little bit prettier for my new app, Happy Moments.

I found this tutorial very useful for using custom fonts on Android:

And I found some pretty nice fonts on this site suitable for the concept of my app:

Here’s the gist:

Step 1: Find a nice font and put it in your assets/ folder

Step 2: Set the custom font in code (which is the only way to do it), like this:

TextView message = (TextView) findViewById(; 
Typeface font = Typeface.createFromAsset(getAssets(), "Chantelli_Antiqua.ttf");

And voila, the result in the app itself:

Fixing system date out of sync in Debian

I started using my old-ish Debian server again and realized the system date is off by 20 minutes…

The solution is to install ntpdate, which automatically synchronizes the clock at certain system events, for example when the network interface comes up.

To force synchronizing now, you can run ntpdate manually, but you must specify the NTP servers to use as reference on the command line, otherwise it will give you an error like this:

14 May 06:53:06 ntpdate[6505]: no servers can be used, exiting

An easier way is to run ntpdate-debian without arguments, which will use the NTP servers configured in /etc/default/ntpdate, which is a Debian-specific setup.

Viewing old revisions in the web browser interface of Subversion

If Apache is configured to browse a Subversion repository, its files and directories are shown as of the latest version by default, for example:

If you want to browse the content of older revisions, there is a non-trivial way by inserting /!svn/bc/REVNO between the base URL of the repository and the path component of the target directory inside the repository, for example you can browse the contents as of revision 1234123 like this:!svn/bc/1234123/subversion/trunk/