You are currently browsing the category archive for the ‘My Code’ category.

So, I’ve done a couple of interesting code related thing recently. I’ve created a reaction tester which someone was asking for on the schoolforge mailing list. You can try it, or if you really want to download it. If anyone else finds it useful, uses it for anything, can think of any (not too difficult) improvements then I would love to know.

In other news, I tried to slim down my mediawiki installation (used mainly for ADFA wiki) by removing language files, but seemed to get an error:

Warning: preg_match() [function.preg-match]: Empty regular expression in /path/to/wiki/includes/Linker.php on line 1259

Turns out the error was unrealted, and I got rid of it simply by clearing the cache DOH (add &cached=no to the end of the url). I’m not sure what was causing that though. Its supprising though, after actually deleting the unwanted language files, I managed to free up 19M of disk space. Quite a bonus when my account only has 50M of space! The moral of the story is, check something is working before trying to improve it.


Note: If you just want to look at my bash script and related text files (without packages), you can download them here.

Following from my last post, I decided that the best way to try and solve this issue would be to create a free-multiverse repositroy. To do this, I hacked together a bash script that would compare sid-main with ubuntu-multiverse (using packages lists I downloaded manually and removed the headers from) and pull any of the packages that overlapped between the two. I also got it to read an extras file, for packages that are in multiverse but not sid main, but yet are still free.

So, I now have a demonstration free-multiverse (which I call multistanza). This is currently hosted on my own pc, so will dissapear at night. If you are interested, try this link. is the main script and the repo an be added as “deb binary-i386/”. I will look for some off site hosting if I decide to pursue this further. If anyone does use my repo, I suggest using it in conjunction with medibuntu (see below).

But, the question is. Is this the best way to pursue this? What I’ve done so far has been no loss to me, because I’ve learnt some more bash scripting; but it is only worth continuing if my new repositry will be of use to other people. Thus, it would be a good idea to know if this has been done already. As far as I know, it hasn’t quite been done the way I want it. However, there is medibuntu, which contains packages not allowed in ubuntu, and is separated nicely into free and non-free. In fact, since I have the repo added, some of the apps get pulled from medibuntu instead of my repo. Unfortunately, not all the packages in medibuntu are as new as the ubuntu ones (hence why my repo and medibuntu could be complimentary) and some are not there at all (vlc for example).

So, I think that the best and most consitent way of having a free “extras” repo, and to avoid duplication of effort, would be for medibuntu to offer all of the free packages in multiverse in their free repository. I think this would fit in with their goal, but I’m not sure if they’d agree. I will contact them about this issue, and see where to go from there.

This is the beauty of freedomware, you can take it into your own hands and make it how you want.

I was using the theme Midnight Fox, but due to my dark kde theme, the history and autocomplete box were unreadable. Nevermind though, after reading an easy tutorial on editing themes, I was able to fix these problems myself. I’m uploading it here just in case anyone else finds it useful.

Note: If your setup is not similar to mine, with a dark system wide theme, it will probably look even more broke than the original.