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.
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.
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.
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
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}
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.
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 ''; } 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.
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
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, inyummain.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.*
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?
Markus 5:44 am on October 6, 2009 Permalink |
This is exactly what I needed! Thank you very much!!!
Matthew Leingang 5:04 am on February 19, 2010 Permalink |
What Markus said.
You should be able to avoid the temp file with a pipe, viz:
svn log –xml $1 | xsltproc svnlog.xslt > $2