Erlang: Install R16B or R16A on Ubuntu or Debian via apt-get

I ran into a problem where erlang R15 had some segfaults i could not determine. In the #erlang Channel on Freenode i was told to try the newest R16B release of erlang. Instead of building R16B myself with configure and make, i searched for a deb repository and found one at

Check out this site, there is a howto for debian and rpm based distributions:

Android: Use better MTP Filesystem ‘go-mtpfs’

I was quite angry about my Android 4 phone and the bad behaviour when mounting it with my Ubuntu 12.10 notebook. Thought for a long time i had to live with it, even it has worked better a few updates before.

Solution for my and maybe you was this instruction:

You will install a different MTP gvfs driver that seem to work far better then the original. Lets have a try.

Proxmox: ‘exit code 60′ – corrupt quota file

Every now and then i get some mails from my hosters monitoring that something at my server is not running. As always i have a look and this time stumbled across this problem.

The VM could not be started, which resulted in this log output.

Searching for ‘exit code 60′ brought me on the right tracks. The solution was to use this commands:

The problem seems to be a “corrupted” quota file, because the VM has not been shut down correctly and the quota file still assumed the VM was running.

SSHFS: Relative and absolute target path

I recently had to mount a system with sshfs and ended up with a error.
Aim was to mount the folder ‘backups’ in the home directory of the user ‘bob’.

The error seems confusing at first, but does say exactly what is wrong.
Solution would be using this target path:

As you can see, the first slash of ‘backups’ is gone. This is correct, because after the ‘:’, a absolute path can be given to sshfs for mounting. In my case, i wanted to work relative to the user home directory, so i simply hat do ommit the first slash.
Hope this helps someone.

Linux: Monitoring Cronjob for apt-get and SMART

I am using this cronjob for monitoring updates and SMART values.

File: “/etc/cron.d/monitoring”

Dont forget to reload cron!

You will need this package: “smartmontools” for “smartctl”.

The output will be send via mail at root. You can configure that in “/etc/aliases” and then running “newaliases”.

Bash: Solve ‘Argument list too long’ with xargs

I recently got the error “Argument list too long” when trying to remove many files in a folder:

Simple solution:
If all the files do not contain whitespace or special chars, this will work:

Otherwise you you need a solution with special handling of filenames.

Symfony2: kernel.request priority

I recently had to implement a few handlers and listeners in a symfony2 project that lead to the following problems:

Exception Handler was not called
Solution was to give my ExceptionHandler a priority > 0 like this:

A listener got a request that has no route (_route) set
According to the Profiler, my listener was called BEFORE the RouterListener. The RouterListener is called for an “early” and a “normal” routing.
Solution was to give my listener a negative priority, so it will be called AFTER the RouterListener that sets the _route parameter.

If you want/need to dive deeper into the dependency injection, check out this page that documents the default listeners and their priorities:

Pidgin: ‘Fix’ for Bug #12238 with error “corrupt … blist.xml”

I use Pidgin for some IRC channels but there is a problem with some channels with special chars in their channel topic text. There seem to be some special chars that are used for colors and similar, but pidgin does not handle them correctly in the xml files like blist.xml (buddylist).

More about that bug in this tickets:

My fix for the bug: Creating a start script for pidgin, that converts the badly escaped stuff in the xml files:

PHP: Check if XML is valid with SimpleXmlElement

Just a short function that checks if a XML file’s structure is valid:

I had to use libxml_use_internal_errors, because otherwise PHP would output a Warning like this: “PHP Warning: SimpleXMLElement::__construct() …”