Jan 2010

Fri, 08 Jan 2010

# How to back date a subversion checkin

While setting up a new subversion (svn) repository for my old blog entries, I wanted to keep the original dates (mtime of the file) in the checkin commit (for use with the pyblosxom svn plugin). After a quick online research I came up with the following script:

#!/bin/sh
# svn-ci-date.sh
# Jan Dittmer <jdi@l4x.org> 2008
# Use at your own risk

D=`ls -l "$1" | cut -f6-7 -d' ' | sed 's/ /T/'`
D="${D}:00.000000Z"
echo "Date: $D"
if ! svn add "$1"; then exit 1; fi
if ! svn ci -m "Date $D" "$1"; then exit 2; fi
R=`svn info "$1" | grep "^Revision: " | cut -f2 -d' '`
echo "Revision: $R"
if [ "$R" == "" ]; then exit 3; fi
if ! svn propset --revprop svn:date -r$R "$D"; then exit 4; fi

Please note that subversion does not do any sanity checking on the svn:date property. If svn log reports a 'Bogus Date' afterwards, make sure your dates have the format YYYY-MM-DDThh:mm:ss.uuuuuuZ.

posted at 12:14 | path: /unix | permanent link to this entry

# Controlling the fan speed of a Lenovo X300 under Linux

The Lenovo X300 has a really annoying fan running at high speeds already at low (40°C) CPU temperatures. The lm-sensors package comes with a fancontrol daemon which does user space fan regulation. Just put this in your /etc/fancontrol:

INTERVAL=10
FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp1_input
FCFANS= hwmon0/device/pwm1=hwmon0/device/fan1_input
MINTEMP=hwmon0/device/pwm1=60
MAXTEMP=hwmon0/device/pwm1=70
MINSTART=hwmon0/device/pwm1=32
MINSTOP=hwmon0/device/pwm1=32
MINPWM=hwmon0/device/pwm1=32
MAXPWM=hwmon0/device/pwm1=128

This will give you 1800 rpm for CPU temperatures > 50°C and 5500 rpm for temperatures above 70°C. As the fan is barely noticeable at 1800 rpm and 70°C is only reached by running two processes at 100% CPU load for more than 5 minutes (even at 30°C ambient temperature), this will give you a nearly totally silent laptop. A pwm value of 255 sounds like a jet starting (8000 rpm)...

posted at 12:14 | path: /unix | permanent link to this entry

# Some really small quadrocopters

It's always fascinating how far you can miniaturize nowadays. A selection of really small quadrocopters (UAV, VTOL, Mikrocopter):

posted at 12:14 | path: /qc | permanent link to this entry

# Linux Kernel Compile Tests

Since a while I'm doing cross compile tests for all supported linux archs. Check out the results here: http://l4x.org/k/. So far it seems that about half of the in-tree archs are at least sometimes successfully built.

posted at 12:14 | path: /projects | permanent link to this entry

# MP3 Compare

Today I found some old forgotten pages about MP3 Compare and as a nice exercise to get used to this system I added them. You can find them under the articles section. Up to now I'm quite impressed with Drupal.

posted at 12:14 | path: /projects | permanent link to this entry

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.