Apache 2.2 and Digest Authentication

Posted November 22, 2009 by mafr
Categories: linux

Tags: , ,

A few weeks ago I wanted to enable digest authentication on an Apache 2.2 web server. I got basic authentication working within minutes, but I didn’t want to send plain text passwords over the web, so how difficult could it be?

Read the rest of this post »

A Template for Python Unix Utilities

Posted October 24, 2009 by mafr
Categories: python

Tags: , ,

One of the most often read postings on this blog is the one about my getopts-enabled shell script template. So I figured, a similar template in Python would also be useful. Like the shell script, it’s quite trivial, but it might still save some time.

Read the rest of this post »

Quick Tip #3: Creating Histograms in Python

Posted September 10, 2009 by mafr
Categories: python

Tags: ,

Since Python 2.5, creating histograms has become easier. Instead of dict, we can now use defaultdict which is similar in behavior to awk’s associative arrays. Instead of raising a KeyError for undefined keys, defaultdict adds a user-defined item and returns it.

Read the rest of this post »

An IMAP Configuration for Mutt

Posted September 8, 2009 by mafr
Categories: linux

Tags: , ,

Usually, I download all my email via fetchmail, sort it into folders using procmail and read the mails with mutt. This works reasonably well and I’ve been using this mail setup without major changes for about 10 years. Since I recently bought a netbook, I also wanted to read mails with it, but without touching my existing mail setup. The netbook should only read mails directly on the server without downloading anything to local disk.

Read the rest of this post »

Ubuntu: Changes in Python 2.6

Posted August 26, 2009 by mafr
Categories: linux

Tags: ,

Once in a while, I install Python packages from source using distutils. The distutils-powered setup.py script found in many packages installs software in /usr/local/ – quite useful because it doesn’t interfere with packages managed by your distribution. Since Ubuntu Jaunty and Python 2.6, this doesn’t work anymore.

Read the rest of this post »

Quick Tip #2: Set Operations Using Shell Tools

Posted August 19, 2009 by mafr
Categories: shell

Tags: , , ,

Everybody knows that Unix shell utilities are powerful. Even though they’re text-based, you can build a lot of useful things outside of the text domain. Today I’ll show you how to implement set operations. All we need are sorted files as input, with each file representing a set.

Read the rest of this post »

Google Code: Migrating to Mercurial

Posted July 31, 2009 by mafr
Categories: tools

Tags: ,

Although one could have guessed otherwise, I’ve always been a happy Subversion user. Which former CVS user hasn’t? But now I’m ready to take the next step. For some of my personal stuff I’ve been using Mercurial for more than a year, so I thought it was time to take the plunge and switch my JSysTest project to Mercurial.

Read the rest of this post »

Subversion 1.5 Merging Massacres

Posted July 25, 2009 by mafr
Categories: tools

Tags: , ,

Recently, I had the opportunity to work with Subversion 1.5 on a medium sized project. Since there were more than 20 developers working on the project with some of them in a different country, there was no other way than to use feature branches extensively. We thought Subversion’s merge tracking would reduce typical merging errors by simplifying the process. But, well, we were wrong.

Read the rest of this post »