MagicPrefs

MagicPrefs.

“MagicPrefs is a free application for OS X which aims to improve the functionality and configuration options of the Apple Magic Mouse, Magic Trackpad and the MacBook glass trackpad.

It features the ability to bind a variable number of finger clicks, taps, swipes, pinch and other gestures to functions like Middle Click, Hold Down Both Mouse Buttons, Spaces, Expose, Dashboard, Recent Applications, Tweet, Read Tweets, Google Reader etc.”

A must-have.

Notes on tracing code execution in Django and Python « SaltyCrane Blog

Eliot from the SaltyCrane blog wrote a nice Django management command that allows to easily trace a Django runserver simply by executing ./manage.py trace runserver. Works great!

Django trace tool, django-trace is [..] a Django management command that uses sys.settrace with other Django management commands. https://github.com/saltycrane/django-trace.

via Notes on tracing code execution in Django and Python « SaltyCrane Blog.

HP 48G: How to fix the “Warning: Invalid Card Data” problem

Recently, my good old HP 48G calculator (one of the best calculators ever built and my longtime personal favourite till today) started displaying the following message whenever I switched it on:

Warning: Invalid Card Data

Which seems a bit odd at first, considering the 48G model has no card slot (only the 48GX model has one). Luckily, there’s a simple solution: Execute the PINIT command by typing “PINIT” (without the double quotes) and pressing the ENTER key.

There’s a great, detailed explanation of this problem and the according fix in the “invalid card data at my hp48g” thread over at the independent HP calculator museum. If this warning message appears on a HP 48GX and the problem persists after applying this fix, take a look at step 3 described in the  article titled “Message, Invalid Card Data, is Displayed when the Calculator is Turned On” on HP’s support forum.

Wouldn’t it be a pity if a company with such a great history and so many great hardware products ceased to be a hardware company?

Skype 5.3.0.116 – a memory hog with memory leaks

Just take a look at the following screenshot I just took, showing two Skype 5.3.0.116 instances running on a current Windows 7 box with 4 GB of RAM:

That’s 330 MB of private memory for each instance at this very moment! Note that these numbers are steadily growing (at about 2 KB/s) for both processes – for no apparent reason. A hint, that there’s likely a memory leak somewhere in Skype.

Let’s hope Microsoft will rewrite Skype from scratch (The current code-base probably isn’t worth refactoring). I’m confident they don’t lack the human and financial resources to do it. It can only get better.

Zimbra Collaboration Server: Troubles after updating to ZCS 7.1.1 – here’s the solution.

Generally, Zimbra‘s update scripts for ZCS run smoothly. However, after updating ZCS from 7.0.1 to 7.1.1 on Ubuntu 10.04.2 LTS a couple of days ago, I noticed that most of the server’s services crashed within 1-2 hours after starting the (virtual) server.

To make a long debugging story short, here’s a summary of the problem:

The update script doesn’t properly remove old entries in /etc/rsyslog.conf when creating a new dedicated rsyslog configuration file for zimbra (/etc/rsyslog.d/60-zimbra.conf). This makes rsyslog log its own logging due to double rule entries – making /var/log/zimbra-stats.log grow at 2 MB/s. Like this, zimbra effectively DOSes itself as the server runs out of free disk space in no time (my above-average 12 GB of free space were filled within about 1 hour 40 minutes).

And here’s the solution:

1. Stop rsyslog to stop it from filling up your disk with nonsense: ‘/etc/init.d/rsyslog stop’ or ‘service rsyslog stop’
2. If necessary (i.e. if the updated server has been running for several minutes already), reclaim your free disk space by deleting/emptying big log files in /var/log, e.g. zimbra-stats.log, zimbra.log, mail.info, mail.log, mail.err, mail.warn etc.
3. Edit /etc/rsyslog.conf and remove the entries (likely at the end of the file) that look similar to these:
local0.* @mail.yourserver.com
local1.* @mail.yourserver.com
auth.* @mail.yourserver.com
local0.* -/var/log/zimbra.log
local1.* -/var/log/zimbra-stats.log
auth.* -/var/log/zimbra.log
mail.* @mail.yourserver.com
mail.* -/var/log/zimbra.log

(these are now in /etc/rsyslog.d/60-zimbra.conf)
4. Restart rsyslog: ‘service rsyslog restart’
5. Restart ZCS if it doesn’t run properly anymore: /etc/init.d/zimbra restart (you may even have to reboot the whole box if that doesn’t work)

Less is more: colordiff and more or less

In the Unix/Linux/Mac OS X world, less is more. Literally, in that ‘less‘ fully emulates ‘more‘, and figuratively, as it provides useful additional functionality like backwards scrolling. So, you really want to use ‘less’ instead of ‘more’ for paging another command’s output, e.g.

cat a_long_document.txt|less

When used to page the output of colordiff however, ‘less’ displays a mess instead of properly displaying colored output like ‘more’.
The trick is to use ‘less’ with either the -r or -R option (which both repaint the screen), i.e.

colordiff -u file_old.py file_new.py|less -r

or

colordiff -u file_old.py file_new.py|less -R

(try which one works better with your system and terminal)