Archive for the ‘Uncategorized’ Category

I needed an oscilloscope that is able to record minutes of signal and export that data to a computer. An oscilloscope is, in fact, nothing more than a analogue-to-digital convertor that samples the input signal fast enough. Exactly what a sound card’s recorder does!

The line-in of my MacBook Pro (6,2) has an input impedance of 28kΩ, and is AC-coupled. So it’s not possible to measure DC voltages. The DC-decoupling capacitor has a 30ms half-time (τ=43.3ms), which makes it capable of measuring down to 3.6 Hz (@-3dB).

Test measurements have shown that 350mV results in 0.115 full-scale deflection, yielding an approximate full-scale voltage of 3V (i.e. ~2.1Vrms).

The setup

The signal that I wanted to measure was 12Vdc, with pulses down to 0V. Putting a 330kΩ resistor in series with the input resulted in a voltage division of ~12.7, bringing the 12V safely below 1V and limiting the maximum current draw to 33µA.

Apparently, by default, Windows Server 2008R2 doesn’t accept Ctrl-Alt-Del keystrokes from the UltraVNC service. This website provided the solution:

  1. “Start menu” -> “Run…” – > gpedit.msc
  2. Navigate to “Computer Configuration” -> “Administrative Templates” -> “Windows Components” -> “Windows Logon Options”
  3. Double-click on the “Disable or enable software Secure Attention Sequence” parameter.
  4. Check “Enable”, then select “Services” in the combobox.
  5. Apply the modification

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.