Stavros' Stuff

Angry rants of programming and other things.

Properly name TV episode files

I just encoded my Futurama DVDs to put on my iPod, but it’s a real hassle adding tags to every single file separely, so I created a script to do it for me. I had actually written this before, but I forgot it at home, so I had no option but to rewrite it.

The script (written in Python) will search the filenames for “sXXeXX” and look up the episode name on IMDB, and then will rename the file as “Sh

Continue reading…

Printing "Hello world!" using curve fitting techniques (or: The "Hello world!" function)

Well, I have a computer architecture exam in six hours and can’t be bothered, so I figured I would realize a lifelong dream of mine, and make a program that prints “Hello world!” using curve fitting techniques. Enlisting the help of a good friend with numerous mathematical papers under his belt (ostensibly because he could not afford a tighter belt), MATLAB and a longing for procrastination, we em

Continue reading…

Apple woes

As you may know, I bought a Macbook some two months ago, and the trackpad was broken. The pointer accelerates way too much when I move it, and that makes pointing at stuff really hard. Combine that with the keyboard-unfriendliness of OS X, and you have one big Mac hater in front of you. I sent it for service to the official Greek Apple distributor, Rainbow, but I was a bit worried that they wo

Continue reading…

Finding the Levenshtein distance in Python

I discovered today that Moneygement won’t accept unicode characters when someone adds transactions by email because of the editdist module I used to check it. Since I don’t really need a fast function to do it (it’s all eight-letter words on average), I decided to write my own Python version of the function and am sharing it here if anyone needs it (because I haven’t found a Python implementation anywhere). It’s released under a BSD license with attribution, meaning that I’d like it if my name was mentioned where it is used :)

Continue reading…

Mac: Second impression

I recently got a Macbook after my last laptop broke, and I wanted to write about my impressions (well, after using it for a few days and past the initial “omg nothing works like in other OSes” shock). First, the good:

  1. The GUI is really pretty and feels consistent and robust. Windows (whenever I mention Windows I mean XP, I don’t like Vista at all) is quite a bit uglier, but is also ra

Continue reading…

Google Apps' mail marked as spam by Gmail?

Recently I found out that mail I sent from this domain (poromenos.org) was being flagged as spam by Gmail. That is odd, because I have (correctly, I believe) defined the SPF records for this domain and it should be recognised as legitimate. I researched a bit, and came to a conclusion that other users have come to as well:

Gmail flags as spam Google Apps emails coming from Google’s SMTP server. I

Continue reading…

Mounting samba shares with Greek filenames in linux

If you want to mount samba shares with Greek filenames under Linux (Ubuntu, in particular), here’s the magic command:

</p>

sudo mount -t smbfs //server/share dir -o username=guest,password=,iocharset=utf8,unicode

</p>

It took me a while to find, so here it is for posterity and for others who might need it. Ubuntu displays filenames correctly through the network without any config

Continue reading…

What is OpenID?

Lately I’ve been looking for a good way to explain OpenID to people, since they need to know what it is to sign on Moneygement, which uses it. I haven’t been able to find a good guide, so I decided to write one, and here it is.

The official OpenID site says that “OpenID is an open, decentralized, free framework for user-centric digital identity.”

Continue reading…

Moneygement

Good news, everyone! Moneygement is finally good enough to provide some basic functionality, and thus I have opened it up for everyone to use.

For those of you who don’t know it, Moneygement is a free online finances management tool. It keeps track of what you spend/earn and shows you statistics on it. It also keeps track of your budget and helps you limit your spend

Continue reading…

RAID 0 vs 10k RPM

I just got a new PC which, after many MANY woes, just started to run OK. In case you are interested, I got an Asus P5B-VM DO miniATX motherboard whose onboard soundcard was crackling, and installed my Audigy on the one precious spare PCI slot, and it was popping. I finally relented and got a Gigabyte P35C-DS3R which is just awesome (not as many features as the Asus, but it works great).

I wanted

Continue reading…