Archive for May, 2009

Led-matrix programmer

Sunday, May 31st, 2009

Suppose you have a led-matrix and you want to control it via RS232.
Suppose that the microcontroller between the matrix and the pc is able to receive informations regarding how to light up the leds of the current column.
Imagine that you need a driver that take as input a file containing “well-formatted” text, and write to the serial port the informations for the microcontroller.
Imagine that you need a gui which let you create formatted files to send to the driver above.
Stop imagine, it is real!

Try the gui here.
Follow the public repository under the name: led-matrix.

Svn Notify

Sunday, May 24th, 2009

Have you ever needed to configure subversion in order to send mails containing details about the latest commit?
Well on the net you can find a lot of scripts useful for this purpose, but i decided to write my own one in order to make it as simple as possible!
External packages needed: nc (netcat).

#!/usr/bin/env bash

SERVER=smtp.tiscali.it
DOMAIN=tiscali.it

if [ $# -lt 3 ]; then
	printf "Usage: $0 path revision address1 address2 ..\n"
	exit 1
fi

REPO="$1"
PROJECT="`basename $REPO`"
FROM="notify-$PROJECT@mldb.net"
REVISION=$2
OLD=$(( $REVISION - 1 ))
shift
shift

MESSAGE="`mktemp`"

printf "HELO $DOMAIN\n" >> $MESSAGE
printf "MAIL FROM: <$FROM>\n" >> $MESSAGE
for i; do
	printf "RCPT TO: <$i>\n" >> $MESSAGE
done
printf "DATA\n" >> $MESSAGE
printf "From: MLDB Commit Notify <$FROM>\n" >> $MESSAGE
printf "To: " >> $MESSAGE
for i; do
	printf "<$i>," >> $MESSAGE
done
printf "\n" >> $MESSAGE
printf "Subject: $PROJECT: revision $REVISION\n" >> $MESSAGE
printf "\n" >> $MESSAGE

svn log file://"$REPO" -r $REVISION >> $MESSAGE
svn diff file://"$REPO" -r $OLD:$REVISION >> $MESSAGE

printf ".\n" >> $MESSAGE
printf "QUIT\n" >> $MESSAGE

nc $SERVER 25 < $MESSAGE

rm $MESSAGE

M2o reloaded? we need an upgrade!

Wednesday, May 13th, 2009

M2o Reloaded is a service offered by M2o for the streaming of old radio sets. I’ve always looked for a way to download my favorite ones, so i decided to create a custom gui, useful for both the streaming and the downloading actions.
You can try it here.
My host provider does not support php file sourcing so here is another link for the page.

3dscene

Saturday, May 9th, 2009

Inspired by the script of the rotating cube, i decided to go on with the work. The result? Well, i added face filling, and some 3d effects such as face-culling and color shading depending on the distance/orientation of the light. At the moment it’s written using python + gtk, but my intention is to port it on a programming language such as c.

You can access the sources from the repository; the name of the project is 3dscene, and remember: the trunk section contains the files for the c-port, instead if you want to play with the python version of the code, then you have to browse the tags/1.0 directory from the repo.

New look!

Monday, May 4th, 2009

Enjoy the fresh new theme! I made it starting from the default (kubrick) theme.
It includes also a “theme switch” feature that let you customize the main color.
I need to clean a bit the theme, but it is almost ready for the public.

I created a new project inside the repository for tracking the theme chages. The name of the project is wp-theme.