Updates from April, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • John 10:26 pm on April 23, 2009 Permalink | Reply  

    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.

     
  • John 1:33 pm on April 22, 2009 Permalink | Reply  

    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.

     
  • John 3:48 pm on April 14, 2009 Permalink | Reply
    Tags: ,   

    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

    svnlog-gen.sh

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

    svnlog.xslt

    Example Output

     
    • Markus 5:44 am on October 6, 2009 Permalink | Reply

      This is exactly what I needed! Thank you very much!!!

      • Matthew Leingang 5:04 am on February 19, 2010 Permalink | Reply

        What Markus said.

        You should be able to avoid the temp file with a pipe, viz:

        svn log –xml $1 | xsltproc svnlog.xslt > $2

  • John 3:09 pm on April 9, 2009 Permalink | Reply
    Tags: ,   

    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

    \lstdefinelanguage{cs}
      {morekeywords={abstract,event,new,struct,as,explicit,null,switch
    		base,extern,object,this,bool,false,operator,throw,
    		break,finally,out,true,byte,fixed,override,try,
    		case,float,params,typeof,catch,for,private,uint,
    		char,foreach,protected,ulong,checked,goto,public,unchecked,
    		class,if,readonly,unsafe,const,implicit,ref,ushort,
    		continue,in,return,using,decimal,int,sbyte,virtual,
    		default,interface,sealed,volatile,delegate,internal,short,void,
    		do,is,sizeof,while,double,lock,stackalloc,
    		else,long,static,enum,namespace,string, },
    	  sensitive=false,
    	  morecomment=[l]{//},
    	  morecomment=[s]{/*}{*/},
    	  morestring=[b]",
    }
    

    Usage

    \lstinputlisting[language=cs]{test-class.cs}
    
     
  • John 3:01 am on April 9, 2009 Permalink | Reply
    Tags:   

    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.

     
  • John 6:43 pm on April 1, 2009 Permalink | Reply
    Tags: , , ,   

    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: http://blog.yeticode.co.uk/
    Description: Gets Last Commit Message
    Author: John Tindell
    Version: 1
    Author URI: http://blog.yeticode.co.uk/
    */
    function lastCommit_widget() {
    
    	$server = 'localhost';
    	$link = mssql_connect($server, 'username', '************');
    	echo '
    
  • '; echo "

    Last Commit

    "; if($link) { 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.

     
    • Glenn Bennett 3:26 pm on April 9, 2009 Permalink | Reply

      John,

      I would be easy to make the widget a bit more theme friendly by using my new tool over at widgetifyr.com.

      If you get a chance to try it please let me know what you think.

      Glenn

  • John 4:55 pm on April 1, 2009 Permalink | Reply
    Tags: ,   

    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/yummain.py", line 229, in user_main
        errcode = main(args)
      File "/usr/share/yum-cli/yummain.py", line 84, in main
        base.getOptionsConfig(args)
      File "/usr/share/yum-cli/cli.py", line 184, in getOptionsConfig
        enabled_plugins=self.optparser._splitArg(opts.enableplugins))
      File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 192, in _getConfig
        self._conf = config.readMainConfig(startupconf)
      File "/usr/lib/python2.5/site-packages/yum/config.py", line 774, in readMainConfig
        yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
      File "/usr/lib/python2.5/site-packages/yum/config.py", 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.*
    
     
    • A. Dan 5:09 am on June 12, 2009 Permalink | Reply

      I have seen the same problem when I installed fedora 11 LiveCD (great) on an 8 gig USB drive off the CD, but has no effect on other system functionality, the OS would have crashed long ago with blue and black c=screens of death, yet this OS is running strong? as this note leaving of its firefox 3.5b4 (great also). thank you for the advice and this do solve along with the reboot. It is very stable OS, and I would take my hat off to salute.

      sudo rm /var/lib/rpm/__db.* would do it and a reboot then after would also be prudent! many thanks to all?

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel