Junk code

Like every programmer, I sometimes code useful little cute codes which are too small to deserve being a project by themselves, but still could help others. Taking example on Andrew Tridgell, here are the most interesting ones. Everything is available under GPLv2, some are also available at github.

Lossless modification of lossy formats

Scripts to losslessly rotate JPEG picture by 90° or 270° clockwise (have a look at exifautotran to do it automatically).

Script to change the date of a JPEG file to the time it was shot (based on the EXIF info).

Script to losslessly rotate MJPEG movies (you need almara installed).

Script to convert a JPEG into a PDF, it requires pdftk..

Computer interface

Daemon to blink the email led when a new email arrives (you need to configure .checkmailrc). It's clever enough to turn on the led only once per new email and to turn it off automatically once all emails are read. (A bash version based on fetchmail is also available, you need to configure .fetchmailrc.)

Daemon that blink the wifi led according to the connection quality. It keeps the led completely on if the connection is fine.

Script to display info about the system health (mixed with ghosd and xbindkey, it's convenient).

Script to turn off and on the mouse when the screen is closed or opened again (need to be ran as root at lid event).

Script to switch between possible display configurations each time it is called (it's best to assign it to a key). Basically it switches between preferred mode and rotated mode, and duplicate mode if a second screen is attached. It is very flexible, so it should be easy to add more modes.

Daemon to automatically rotate the screen when the laptop is rotated (à la iPhone). Of course you need an acceleration sensor on your laptop, with driver such as hdaps, applesmc, or lis3lv02d (the script was made for this one).

Files

Script that rename recursively a directory from latin1 encoding to utf8 encoding (it uses convmv).

Script to send pictures to a camera (using gphoto).

Script to save a realaudio stream of the day before of C'est Lenoir.

How To

Not properly a "how to", here is a file with plenty of command line examples which help to make my daily life on Unix easier. (Or maybe allow Unix to make my daily life easier?)