Archive for the ‘Uncategorized’ Category

I’ve been working on a web-interface for my Velbus home automation system for a while now.

Someone once told me: “If you aren’t ashamed of your first release, you waited too long”, so here it is: https://github.com/niobos/velbusd

I was under the illusion that a Time Machine backup would do as they claim:

You can set up Time Machine to automatically back up all your important files, including your documents, music, photos, applications, and any other items you keep on your hard disk.

I consider my iTunes authorizations important, but apparently Apple does not. Seems that these are specifically excluded from backups… Removing the “SC Info” line from the /System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist file solved this.

I know I should have de-authorized my machine before reinstalling, and I know you can “de-authorize all” to fix this as well; but it’s pretty disturbing to see iTunes remove all your applications from your iPhone…

When programming with multiple files/modules, dependency tracking is always a big issue. GNU Make calculates the correct order to compile in, but is only that smart. It does know that if a .cpp file changes, the corresponding .o file needs to be updated. But a change in an included header can go unnoticed.

While debugging a strange problem today, it was exactly that last scenario: A change in a header file did not cause a recompile, which left me debugging an old version of the binary. So I wanted to include the dependencies of .cpp files on the included headers in my Makefile. But since I’m too lazy to do it myself, I wrote a script.

Continue reading ‘Automated #include tracking with make’ »

One very nice feature the iPhone lacks is the ability to request a delivery report on text messages. I usually abuse these by sending a text message to family/friends while they’re on a plane. As soon as they land and switch on their phone, I get a delivery report. Which essentially tells me “for free” that the person has landed. (With Belgian carriers, receiving text messages is always free, even abroad, because you can’t refuse them).

Continue reading ‘SMS Delivery report on iPhone’ »

I’m a fan of keyboard shortcuts. Not to memorize them, but to use them. It’s just so much quicker to hit CMD+W to close the current browser tab than it is to carefully navigate your mouse to that 12*12 pixels button. However, this didn’t work flawlessly. Sometimes I get the ubiquitous “do you want to save?” question and I have to use the mouse to click “Don’t save”; Tab doesn’t seem to work.

Until I found out how to change that setting, that is. It’s hidden in the System Preferences under Keyboard – Keyboard Shortcuts. You can change Full Keyboard Access to “All Controls”, which is the behavior I’m used to from Linux and Windows.

I noted that my calendar doesn’t contain Easter, nor any other official holiday. So I decided to create an iCal-file that contains all official holidays in Belgium. And while I’m at it, I added the school holidays as well.

Continue reading ‘Belgian offical holidays and school vacations’ »

I still have a perfectly working Windows Mobile PDA-phone. I use a program called PIM Backup to make backups of the databases such as calls, SMSes (text messages), contacts, calendar, …. The program can generate either a binary backup, or a more readable backup. I use the latter one, so I could unpack the backup on my desktop computer and use it as an archive. The generated backup files have a .pib extension. The file itself is a ZIP-file containing the different parts of the backup (calls, contacts, …) as separate files.

Continue reading ‘PIM Backup format reverse engineered’ »

Sometimes it’s really useful to prepend a timestamp to every output line of a command. This can be done fairly easily:

$command | \
perl -pe '@now=localtime();printf "%04d-%02d-%02dT%02d:%02d:%02d ",$now[5]+1900,$now[4]+1,$now[3],$now[2],$now[1],$now[0];'

The perl command reads in every line, prints the current time in the default format (or in whatever format you specify), followed by the read line.

I sometimes pipe a command to less to study it’s output. If it’s interesting enough, I re-run the command and redirect the output to file. This approach has some limitations: the command is run twice, possibly with different output.

Obviously, I should use tee to send the output to both less and the file, but I regularly forget this. That where this hint comes in: you can save the current less-buffer to file!

In short, to save the buffer that is being displayed by a session of `less’, use its pipe-to-shell-command capability by scrolling to the top of the file and press `|’ followed by `$’ as well as entering `tee DESTINATION_FILE’ when prompted for the shell command.

Fifefox has a very convenient auto-complete function when filling in forms and logins. Very convenient, until you somehow manage to mistype one of the fields (obviously, you never ever mistype, but some people do…). This mistake haunted me for long enough to get me motivated to solve it.

Apparently, the solution is very straightforward: just highlight the “wrong” value in the drop-down and hit Shift+delete to get rid of it.