Scripting with Postfix/mail
16/11/2010Sometimes you’re automating tasks that requires you to be informed of changes at the moment they’re occurring (or at least, not too long after). Turns out if you’re planning only to send mail, it takes abouts 3 minutes to setup postfix and send your first automate mail message!
First, you have to install postfix and mailutils, two packages that are fortunately already (likely) installed and readily available from the default repository. In a shell, type:
Sound Screen
19/10/2010Even if you pay some extra to get low dB fans and set your BIOS to have varying fan speeds it still can be quite far from quiet. 20 dB isn’t that loud, but it’s not silence, and— let us be blunt —adaptive fan speeds seems pretty much to alternate between off and full blast. If your computer is near a wall, the noise reverberates through the room, and the low-frequencies leak in the room on the other side of the wall.
So to muff the sound, I build a “sound shield” made out of custom upholstered panels.
Random Points in a Triangle (Generating Random Sequences II)
05/10/2010In the first post of this series, I discussed a method to generate a random (guaranteed) permutation. On another occasion, I presented a method to recycle expensive random bits. Today, I will discuss something I had to do recently: generate random points inside a triangle.
Dog Days
07/09/2010Last week (at the time of writing), we were hit by a bad heat wave and, while none of my computers crashed or caught fire, it was clear that they were operating well outside their usual comfort zone. The first thing to do is of course to use well designed cases that provide adequate cooling (not like the compaq 6400NX). The second is to use all the advanced power management features available—whether it’s SpeedStep, Cool’n’Quiet, or PowerNow!. You enable it from your computer’s BIOS and usually the operating system takes over when you boot.
Changing dynamically the CPU’s (and other devices?) speed (and therefore power consumption) to respond on demand to the user or system tasks is quite a good policy for desktops and servers (that’s why it defaults to “ondemand” on Ubuntu) but it may not be what you want for your laptop or netbook. For a netbook, setting the power policies to “powersave” will keep the CPUs into low gear and extend significantly battery life. The thing is, Ubuntu doesn’t let you set the default policy easily.
Or a Whale, II
17/08/2010Or a Whale.
10/08/2010HAMLET:
Do you see yonder cloud that’s almost in shape of a camel?
POLONIUS:
By the mass, and ’tis like a camel, indeed.
HAMLET:
Methinks it is like a weasel.
POLONIUS:
It is backed like a weasel.
HAMLET:
Or like a whale.
POLONIUS:
Very like a whale.
Hamlet, Act III
William Shakespeare
Getting Clip-Art
20/07/2010Interoperability of software is still a major issue. Not only closed systems do not play well with others, open systems sometimes—often—have the same problems with exchanging information. One that only plays well with others when forced to is, of course, our good friend Microsoft. Sometimes they pretend to play well, and other software developers must reverse-engineer the file formats to read and write data in a compatible format.
One minor annoyance is Microsoft Office’s clip-art bundle file format that is not supported (at the time of writing, anyway) by Open Office. This means that you can download clip-art for your presentation only to discover that they are perfectly useless. Or, you can take 10 minutes and look at what the bundles actually contains!
Getting Documents Back From JPEG Scans
06/07/2010We’re all looking for documentation, books, and papers. Sometimes we’re lucky, we find the pristine PDF, rendered fresh from a text processor or maybe LaTeX. Sometimes we’re not so lucky, the only thing we can find is a collection of JPEG images with high compression ratios.
Scans of text are not always easy to clean up, even when they’re well done to begin with, they may be compressed with JPEG using a (too) high compression ratio, leading to conspicuous artifacts. These artifacts must be cleaned-up before printing or binding together in a PDF.
Posted by Steven Pigeon 







