Thursday, 23 April 2009

33% Additional Disk Space

Hurray! The nice fokes at linode have decided to give all of their customers 33% Additional Disk Space. Now if only all hosting companies were as nice as this.

Wednesday, 22 April 2009

Final Year Project

I've just handed in my final year project, nicely bound and professional. Now that that's out of the way, until the poster day, I can concentrate on getting the gtk-cctray project to work properly using build servers that are not connected via .NET Remoting.

Tuesday, 14 April 2009

SVN Log to Latex

Needed to add a table of my svn log into my project write up so created a simple style sheet that would parse the xml output from svn. The xslt only generates the table

#usage [repo-path] [output-file]
svn log --xml $1 > tmp.out; xsltproc svnlog.xslt tmp.out > $2; rm tmp.out


Example Output

Thursday, 9 April 2009

C# Style for lstinputlisting

After getting latex to format my code nicely I noticed that it did not have build in support for C#, which read of the manual and knocked one up. Share and Enjoy

else,long,static,enum,namespace,string, },



Wednesday, 8 April 2009

New Hosting

Got myself some new hosting over at lindoe. Virtual linux server all to myself. Spent a day trying out the configuration and decided to go with a Ubuntu 8.10.

Wednesday, 1 April 2009

Simple SVN WordPress Widget

After getting bored on working on my final year project I decided to take a look at creating widgets word my blog. There are SVN hooks on my repositories that store the commit details in a SQL database. I thought I would create a widget that would pull out the last message and display it.

Plugin Name: LastCommit
Plugin URI:
Description: Gets Last Commit Message
Author: John Tindell
Version: 1
Author URI:
function lastCommit_widget() {

$server = 'localhost';
$link = mssql_connect($server, 'username', '************');
echo '
  • ';
    echo "

    Last Commit

    mssql_select_db('svnyeti', $link);
    $query = mssql_query('select top 1 * from SVNLog order by liLogEntryPk desc', $link);
    $row = mssql_fetch_array($query);
    print '

    ' . $row['lszLogEntry'] . '

    echo '
  • ';
    function init_lastCommit(){
    register_sidebar_widget("LastCommit", "lastCommit_widget");
    add_action("plugins_loaded", "init_lastCommit");

    When I get more time I will develop this a bit more.

    Problems With Yum On Fedora 10

    So every now and again YUM stops working and throwing out error messages usually after I've been to uni.

    rpmdb: Thread/process 4348/3087935168 failed: Thread died in Berkeley DB library
    error: db4 error(-30975) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
    error: cannot open Packages index using db3 - (-30975)
    error: cannot open Packages database in /var/lib/rpm
    Traceback (most recent call last):
    File "/usr/bin/yum", line 29, in
    yummain.user_main(sys.argv[1:], exit_code=True)
    File "/usr/share/yum-cli/", line 229, in user_main
    errcode = main(args)
    File "/usr/share/yum-cli/", line 84, in main
    File "/usr/share/yum-cli/", line 184, in getOptionsConfig
    File "/usr/lib/python2.5/site-packages/yum/", line 192, in _getConfig
    self._conf = config.readMainConfig(startupconf)
    File "/usr/lib/python2.5/site-packages/yum/", line 774, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
    File "/usr/lib/python2.5/site-packages/yum/", line 844, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
    TypeError: rpmdb open failed

    After a quick search I found a solution. Deleting the __db.* files in /var/lib/rpm fixes it

    $ sudo rm /var/lib/rpm/__db.*