<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8942732566542469230</id><updated>2011-12-12T13:50:05.875-08:00</updated><category term='libstdc++5'/><category term='directory_administrator'/><category term='expected'/><category term='postgresql'/><category term='encoding'/><category term='production'/><category term='development'/><category term='pygtk'/><category term='maven'/><category term='shiro'/><category term='printing'/><category term='self'/><category term='gmane'/><category term='pdfnup'/><category term='applet'/><category term='opennebula onevm mac ip'/><category term='XE'/><category term='broadcom'/><category term='jar'/><category term='library'/><category term='array'/><category term='rewrite'/><category term='jar-with-dependencies'/><category term='dbix'/><category term='firefox'/><category term='hamster'/><category term='grails'/><category term='result_source'/><category term='audio'/><category term='padsp java pulseaudio realtime streaming oggenc sighttpd'/><category term='rack'/><category term='billion'/><category term='not'/><category term='nginx'/><category term='rails'/><category term='link'/><category term='username'/><category term='group'/><category term='booklet'/><category term='backup'/><category term='c perl'/><category term='broken'/><category term='no signature of method'/><category term='pulse'/><category term='execvp() failed'/><category term='system'/><category term='search_path'/><category term='rewritebase'/><category term='copyright eu cliff c**t'/><category term='wrapper'/><category term='mysql'/><category term='java'/><category term='ogg'/><category term='authentication'/><category term='pg'/><category term='wifi'/><category term='schema'/><category term='onload'/><category term='ffmpeg'/><category term='role'/><category term='vlc'/><category term='user'/><category term='pdf'/><category term='resultset'/><category term='koan'/><category term='mvc'/><category term='hp mini 1000'/><category term='many_to_many'/><category term='discover'/><category term='initrd'/><category term='drivers'/><category term='escape'/><category term='view'/><category term='html'/><category term='plotting'/><category term='fedora11'/><category term='character'/><category term='error'/><category term='widget'/><category term='karmic'/><category term='svn'/><category term='lat'/><category term='associationtypemismatch'/><category term='jackd'/><category term='gnuplot'/><category term='autoconf'/><category term='sighttpd'/><category term='url'/><category term='catalyst configuration model connect_info model'/><category term='reserved words'/><category term='python gtk'/><category term='introduction'/><category term='prepend'/><category term='9.10'/><category term='duplex'/><category term='signature'/><category term='perl'/><category term='FormFu'/><category term='status'/><category term='model_config'/><category term='skype'/><category term='fedora'/><category term='event'/><category term='manager'/><category term='addtopermissions'/><category term='Oracle'/><category term='http'/><category term='plplot'/><category term='wl'/><category term='workspace'/><category term='tomcat6'/><category term='rows'/><category term='gnome'/><category term='dbi'/><category term='prettyurl'/><category term='staple'/><category term='find_or_new update_or_insert undef null'/><category term='catalyst tt hash perl stash calendar tt2'/><category term='ldap'/><category term='namespaces'/><category term='DBIC'/><category term='plugin'/><category term='keyword'/><category term='python'/><category term='orientation'/><category term='catalyst'/><category term='404'/><category term='code'/><category term='authorization'/><category term='rhel6'/><category term='anchor'/><category term='apache'/><category term='dsn dbix'/><category term='append'/><category term='enum'/><category term='wrong'/><category term='basichttpauthenticationfilter'/><category term='basic'/><category term='opensuse'/><category term='thin'/><category term='static'/><category term='reset'/><category term='body'/><category term='psnup'/><category term='contained'/><category term='viewport'/><category term='audit'/><category term='wnck'/><category term='OCI_SYSDBA'/><category term='book'/><category term='virconnectgetversion'/><category term='samsung'/><category term='jxplorer'/><category term='config'/><category term='netbeans'/><category term='replace'/><category term='add_to_'/><category term='row overhead'/><category term='jquery'/><category term='sudo'/><category term='libpq'/><category term='pdfjam pdftk'/><category term='Tora'/><category term='joggler'/><category term='bcm4312'/><category term='kernel'/><category term='icon'/><category term='drupal'/><category term='ror'/><category term='qemu'/><category term='luma'/><category term='exit'/><category term='id'/><category term='microphone'/><category term='Ubuntu'/><category term='model'/><category term='cairo'/><category term='landscape'/><category term='authlogic'/><category term='password'/><category term='problem'/><title type='text'>Crisp Packet Data Centre</title><subtitle type='html'>This is my electronic log book where I document experience, problems and solutions I encounter while in front of a computer.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>61</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-5678196836282573684</id><published>2011-10-20T20:36:00.000-07:00</published><updated>2011-10-20T20:36:19.320-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='padsp java pulseaudio realtime streaming oggenc sighttpd'/><title type='text'>routing real-time audio to the internet</title><content type='html'>I've been working on a server-side audio tool. My app works well on the desktop - it is written in Java and the audio from SourceDataLine just works. So, I moved the app to a remove server.&lt;br /&gt;&lt;br /&gt;Pulseaudio was installed on the remote server, and I thought it should be pretty easy to route the output back over the internet to myself.&lt;br /&gt;&lt;br /&gt;In the end it was:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;parec -r | oggenc -r -o - - | ./sighttpd -f ./oggout.conf&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I called my java code with 'padsp', I'm not sure that is necessary but it probably is. This method avoids using Gstreamer (that should be a good solution if you want to scale: It can plug your audio into icecast/shoutcast.)&lt;br /&gt;&lt;br /&gt;SourceDataLine provided the audio stream in my Java app.&lt;br /&gt;&lt;br /&gt;NOTE: I spent a whole bunch of time playing with a file output pipe from pulse audio. The excellent support from pulse audio mailing list and irc channel steered me away from that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-5678196836282573684?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/5678196836282573684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=5678196836282573684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5678196836282573684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5678196836282573684'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2011/10/routing-real-time-audio-to-internet.html' title='routing real-time audio to the internet'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-383419221404692202</id><published>2011-09-10T22:15:00.000-07:00</published><updated>2011-09-10T22:15:53.170-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='copyright eu cliff c**t'/><title type='text'>understanding the decision copyright in EU</title><content type='html'>If you are struggling to understand the sense of the copyright extension granted by the EU, I invite you to exercise the following idea against the decision: &lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;The tradition of dead generations hang like a nightmare in the minds of the living.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this case, Cliff et al have conjured a spectre that law makers have felt confident cowering to. The instantaneous value of the copyright in question has become crippling to law makers, trapped in the headlights of &lt;i&gt;old&lt;/i&gt; intellectual capital. The alternative, to welcome a continuous introduction of content to the chaos of the public domain ecosystem, lost this round.&lt;br /&gt;&lt;br /&gt;It doesn't take a great deal of imagination to think that: as Marx provides a compelling critique of modern political economy, Marx may provide a compelling critique of modern political economy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;For the record, IMHO Cliff's music is utterly worthless. And (IMHO) people that enjoy his music are idiots. And that goes for every other artist that has become so alienated from their are that they need lawyers to provide critical appraisal of their (past) actions.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-383419221404692202?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/383419221404692202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=383419221404692202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/383419221404692202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/383419221404692202'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2011/09/understanding-decision-copyright-in-eu.html' title='understanding the decision copyright in EU'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-3027668983639150909</id><published>2011-07-18T08:47:00.000-07:00</published><updated>2011-07-26T16:14:56.538-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ogg'/><category scheme='http://www.blogger.com/atom/ns#' term='execvp() failed'/><category scheme='http://www.blogger.com/atom/ns#' term='sighttpd'/><title type='text'>sighttpd ogg only</title><content type='html'>&lt;a href="http://www.kfish.org/software/sighttpd/"&gt;sighttpd&lt;/a&gt; is an excellent light weight streaming tool. Version 1.2 is the current master from git: https://github.com/kfish/sighttpd&lt;br /&gt;&lt;br /&gt;One issue I had with this version is that it has a run-time dependency on &lt;a href="https://www.ohloh.net/p/shcodecs"&gt;shcodecs-record&lt;/a&gt;. The symptoms of noting having shcodecs-record available on the path is that sighttpd fails with:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;execvp() failed: No such file or directory&lt;/div&gt;&lt;br /&gt;I didn't need the stuff that shcodecs provides (MPEG-4 and H.264 encoding and decoding on SH-Mobile processor series.) To remove this dependency, a cheap hack was employed: comment out &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;./src/main.c:165&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;// &lt;span class="n"&gt;shrecord_run&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="p"&gt;Then, recompile. I have a post on &lt;a href="http://crisppacketdatacentre.blogspot.com/2011/07/static-build-of-sighttpd.html"&gt;making a static sighttpd&lt;/a&gt; if you're interested in that.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="p"&gt;UPDATE:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="p"&gt;The shrecord dependency has been removed in the recent git master, so get that and ignore this.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-3027668983639150909?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/3027668983639150909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=3027668983639150909' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3027668983639150909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3027668983639150909'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2011/07/sighttpd-ogg-only.html' title='sighttpd ogg only'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-1287225107361559093</id><published>2011-07-10T14:23:00.000-07:00</published><updated>2011-07-13T10:05:47.219-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='static'/><category scheme='http://www.blogger.com/atom/ns#' term='link'/><category scheme='http://www.blogger.com/atom/ns#' term='autoconf'/><category scheme='http://www.blogger.com/atom/ns#' term='sighttpd'/><title type='text'>static build of sighttpd</title><content type='html'>&lt;a href="http://www.kfish.org/software/sighttpd/"&gt;sighttpd&lt;/a&gt; is a handy lightweight tool for streaming media over the internet. It is a lightweight alternative to icecast/shoutcast.&lt;br /&gt;&lt;br /&gt;I need a static build of this tool, so I followed the instructions and added &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;LDFLAGS="-all-static"&lt;/span&gt; to the make command. The compete build chain was:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp; autoreconf -vif&lt;br /&gt;&amp;nbsp;&amp;nbsp; ./configure&lt;br /&gt;&amp;nbsp;&amp;nbsp; make LDFLAGS="-all-static"&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp; scp ./src/sighttpd richard@myserver:tools/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: inherit;"&gt;NOTE: you'll need to have &lt;a href="https://github.com/kfish/sighttpd/blob/bad6a726580a8e86883576063b7992006e6c0ebe/release_notes/sighttpd-1.2.0.txt"&gt;shcodecs-record&amp;nbsp;is&amp;nbsp;in&amp;nbsp;search&amp;nbsp;path&lt;/a&gt;.&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-1287225107361559093?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/1287225107361559093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=1287225107361559093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1287225107361559093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1287225107361559093'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2011/07/static-build-of-sighttpd.html' title='static build of sighttpd'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-8947004924402709858</id><published>2011-06-26T12:43:00.000-07:00</published><updated>2011-06-26T12:43:10.470-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opennebula onevm mac ip'/><title type='text'>one-liner to get useful info on OpenNebula VMs</title><content type='html'>I've been playing with OpenNebula. I've got a few dozen VMs which are being provided with context dynamically. It would be handy to list all the machines MAC and IP addresses, along with their names. For this purpose, I use the following one-liner:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;for ID in `sqlite3 /var/lib/one/one.db 'select oid from vm_pool where state = 3 order by name;'` ; do onevm show $ID | grep "NAME\|IP\|MAC" | grep -v VIRTUAL | grep -v ' : ' | sed 's/REQUIREMENTS=/&amp;nbsp; /'; done&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-8947004924402709858?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/8947004924402709858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=8947004924402709858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/8947004924402709858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/8947004924402709858'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2011/06/one-liner-to-get-useful-info-on.html' title='one-liner to get useful info on OpenNebula VMs'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-2165356977443052854</id><published>2011-05-03T08:46:00.000-07:00</published><updated>2011-05-03T08:46:15.724-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='qemu'/><category scheme='http://www.blogger.com/atom/ns#' term='virconnectgetversion'/><category scheme='http://www.blogger.com/atom/ns#' term='rhel6'/><category scheme='http://www.blogger.com/atom/ns#' term='koan'/><title type='text'>koan error on Scientific Linux 6</title><content type='html'>I'm doing some virtualisation stuff, using cobbler and koan. On a new install of Scientific Linux 6 (as a proxy for RHEL6) I got the error:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;...&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; if ret == -1: raise libvirtError ('virConnectGetVersion() failed', conn=self)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;it seems that the package: qemu-kvm was not installed. So, to fix:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;yum install qemu-kvm&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-2165356977443052854?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/2165356977443052854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=2165356977443052854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2165356977443052854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2165356977443052854'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2011/05/koan-error-on-scientific-linux-6.html' title='koan error on Scientific Linux 6'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-7783226460380791727</id><published>2011-03-10T23:00:00.000-08:00</published><updated>2011-03-11T05:54:22.813-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='password'/><category scheme='http://www.blogger.com/atom/ns#' term='reset'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='authlogic'/><title type='text'>resetting password for user in authlogic</title><content type='html'>I needed to quickly reset a user's password in an Rails application that used authlogic. I didn't have the nice '&lt;a href="http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/"&gt;request reminder&lt;/a&gt;' stuff set up, so I used the console instead:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;././script/console production&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;...&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;&amp;gt; forgetfulUser = User.find(:first, :conditions =&amp;gt; {:login =&amp;gt; 'richard'})&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;...&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;...&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;&amp;gt; forgetfulUser.password = 'newPassw0rd'&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;&amp;gt; forgetfulUser.password_confirmation = 'newPassw0rd'&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;&amp;gt; forgetfulUser.save&lt;/div&gt;&lt;br /&gt;and it was done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-7783226460380791727?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/7783226460380791727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=7783226460380791727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7783226460380791727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7783226460380791727'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2011/03/resetting-password-for-user-in.html' title='resetting password for user in authlogic'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-5998661673117219252</id><published>2011-02-17T16:44:00.000-08:00</published><updated>2011-02-18T11:13:03.105-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ffmpeg'/><category scheme='http://www.blogger.com/atom/ns#' term='encoding'/><category scheme='http://www.blogger.com/atom/ns#' term='samsung'/><title type='text'>encoding files to watch on Samsung TV</title><content type='html'>I have access to a nice Samsung TV that supports media on USB drives. &lt;br /&gt;&lt;br /&gt;It has a bunch of codecs including x264 and MP3. My Ubuntu has some codecs on it so I needed to encode my media files into a suitable format to play them.&lt;br /&gt;&lt;br /&gt;I received the error:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;And finally arrived at the following:&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;ffmpeg -i ./test.flv -acodec libmp3lame -vcodec libx264 -vpre medium test.avi&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;You can find helpful details on encoding on the blog:&lt;br /&gt;&lt;a href="http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/"&gt;http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/&lt;/a&gt;&lt;br /&gt;including a handy list of encoding quality vs speed presets.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Update&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It may be worth running &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ffmpeg -i test.&lt;/span&gt;&lt;someformat&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;someformat&gt;&lt;/someformat&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If either of the streams are mp3 or h264 then you can save time by passing '&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;copy&lt;/span&gt;' as the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-acodec&lt;/span&gt; or &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-vcodec&lt;/span&gt; respectivly.&lt;/someformat&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-5998661673117219252?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/5998661673117219252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=5998661673117219252' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5998661673117219252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5998661673117219252'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2011/02/encoding-files-to-watch-on-samsung-tv.html' title='encoding files to watch on Samsung TV'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-1651416269164692478</id><published>2011-01-11T13:30:00.000-08:00</published><updated>2011-01-11T13:30:14.845-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='drupal'/><category scheme='http://www.blogger.com/atom/ns#' term='rewrite'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='prettyurl'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='rewritebase'/><title type='text'>Drupal pretty URLs on Ubuntu</title><content type='html'>Ubuntu helpfully provides Drupal in its repositories. This installed fine for me but during install.php (to configure drupal) pretty urls wouldn't work.&lt;br /&gt;&lt;br /&gt;To fix this, I had to edit &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;/etc/drupal/6/htaccess&lt;/pre&gt;&lt;br /&gt;find the line at the bottom:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#  RewriteBase /drupal&lt;/pre&gt;&lt;br /&gt;remove the '#' and add a '6' onto the end to give:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;RewriteBase /drupal6&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-1651416269164692478?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/1651416269164692478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=1651416269164692478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1651416269164692478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1651416269164692478'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2011/01/drupal-pretty-urls-on-ubuntu.html' title='Drupal pretty URLs on Ubuntu'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-5366978791089378643</id><published>2010-12-29T08:48:00.000-08:00</published><updated>2010-12-29T08:48:40.990-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='viewport'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='workspace'/><category scheme='http://www.blogger.com/atom/ns#' term='wnck'/><title type='text'>getting workspace with gnome visal effects</title><content type='html'>I maintain linux-desktop-audit software. My Ubuntu machine recently allowed me to enable 'visual effects' to make nice looking transitions between workspaces.&lt;br /&gt;&lt;br /&gt;However, this broke linux-desktop-audit. So, instead of listening to 'active_workspace_changed' the code should be listening to 'viewports_changed'. Once this event fires, to get the current workspace number I use the following code:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;def viewport_change (self, screen):&lt;br /&gt;        self.current_workspace = screen.get_active_workspace()&lt;br /&gt;        v_x = self.current_workspace.get_viewport_x()&lt;br /&gt;        v_y = self.current_workspace.get_viewport_y()&lt;br /&gt;        v_w = screen.get_width()&lt;br /&gt;        v_h = screen.get_height()&lt;br /&gt;        v_r = self.current_workspace.get_width()&lt;br /&gt;        v_c = self.current_workspace.get_height()&lt;br /&gt;        total_cols = v_r/v_w&lt;br /&gt;        total_rows = v_c/v_h&lt;br /&gt;        desk_col = v_x/v_w&lt;br /&gt;        desk_row = v_y/v_h&lt;br /&gt;        ws_num = desk_col + (desk_row * total_cols)&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-5366978791089378643?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/5366978791089378643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=5366978791089378643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5366978791089378643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5366978791089378643'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/12/getting-workspace-with-gnome-visal.html' title='getting workspace with gnome visal effects'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-8410027479773407731</id><published>2010-11-23T02:23:00.000-08:00</published><updated>2010-11-23T02:23:29.360-08:00</updated><title type='text'>NUnit-console-runner, FileLoadException, access is denied</title><content type='html'>I was using NUnit, and careless stuffed it into svn from my Linux box.&lt;br /&gt;When I checked it out from svn onto my Windows environment I got this error when trying to run: ./nunit-console.exe:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'nunit-console-runner, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. Access is denied.&lt;br /&gt;File name: 'nunit-console-runner, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' ---&amp;gt; System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp; at NUnit.ConsoleRunner.Class1.Main(String[] args)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I had created a problem for myself because various dll's didn't have 'execute' flag enabled.&lt;br /&gt;&lt;br /&gt;To fix this in a brutal way, from the cmd.com, I used:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;cacls nunit.core.dll /p /e Everyone:F&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-8410027479773407731?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/8410027479773407731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=8410027479773407731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/8410027479773407731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/8410027479773407731'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/11/nunit-console-runner-fileloadexception.html' title='NUnit-console-runner, FileLoadException, access is denied'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-1474870624157041390</id><published>2010-08-06T03:47:00.001-07:00</published><updated>2010-08-06T03:47:28.323-07:00</updated><title type='text'>handy java property to dump http traffic.</title><content type='html'>I find myself needing this command and unable to remember it or find it on Google easily. So I'm going to make a note of it here to save my precious memory for other more important information:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true &lt;/div&gt;&lt;br /&gt;Right, now I can try and remember where I live...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-1474870624157041390?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/1474870624157041390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=1474870624157041390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1474870624157041390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1474870624157041390'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/08/handy-java-property-to-dump-http.html' title='handy java property to dump http traffic.'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-7582811508837604582</id><published>2010-08-03T02:39:00.000-07:00</published><updated>2011-02-16T06:39:21.732-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='character'/><category scheme='http://www.blogger.com/atom/ns#' term='escape'/><category scheme='http://www.blogger.com/atom/ns#' term='keyword'/><category scheme='http://www.blogger.com/atom/ns#' term='id'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>svn Id keyword in Perl</title><content type='html'>My Perl program wants to report it's SVN Id keyword. Setting this up is simple enough if you follow &lt;a href="http://johnbokma.com/mexit/2008/09/30/subversion-svn-keywords-property.html"&gt;one of the many excellent examples&lt;/a&gt; on the web. However I found that it was beyond me to get the value of my Id printed out by my code.&lt;br /&gt;The problem is that the completed SVN Id keyword contains @ and $ symbols.&lt;br /&gt;&lt;br /&gt;So my code resorts to greping it's self to get the value from the source code.&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# $Id$&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;my $id_str = `grep -m1 '\$Id:' $0`;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;print $id_str;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;It feels like a crime against programming, but it works - and provided that there is an $Id$ before the grep command, it should work reliabably. &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-7582811508837604582?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/7582811508837604582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=7582811508837604582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7582811508837604582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7582811508837604582'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/08/svn-id-keyword-in-perl.html' title='svn Id keyword in Perl'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-8594214895829866243</id><published>2010-07-29T11:55:00.000-07:00</published><updated>2010-07-29T11:55:45.541-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='enum'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='system'/><category scheme='http://www.blogger.com/atom/ns#' term='exit'/><category scheme='http://www.blogger.com/atom/ns#' term='status'/><title type='text'>Exit code idiom in Java</title><content type='html'>I have been looking into employing C 'enum' like exit codes in Java. For example, if the application you are writing will be called by a script so it is handy for the script to know when there is an exit that is OK, and when it is a FAIL.&lt;br /&gt;&lt;br /&gt;I looked to the web for inspiration, and couldn't find anything Java specific, so, I have arrived at the following:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;class MyClass {&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; private static enum EXIT {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK(0), BAD_COMMANDLINE(1), INPUT_ERROR(10);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT (int code) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.code = code;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int code;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int getCode() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return code;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; public static void main (String[] args) {&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (args.length() &amp;lt; 1) {&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.exit(EXIT.BAD_COMMANDLINE.getCode());&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.exit(EXIT.OK.getCode());&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-8594214895829866243?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/8594214895829866243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=8594214895829866243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/8594214895829866243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/8594214895829866243'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/07/exit-code-idiom-in-java.html' title='Exit code idiom in Java'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4161106340557201917</id><published>2010-07-09T06:28:00.001-07:00</published><updated>2010-07-09T06:30:22.758-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sudo'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><title type='text'>backing up mysql database without mysql root password</title><content type='html'>This is a quickie, I needed to back up a mysql database without knowing the MySQL root user password.&lt;br /&gt;&lt;br /&gt;I had sudo, so the solution was:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sudo /etc/init.d/mysql stop&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sudo mysqld_safe --skip-grant-tables &amp;amp;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mysqldump --all-databases | gzip &amp;gt; /tmp/alldb.gz&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;sudo /etc/init.d/mysql stop&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sudo /etc/init.d/mysql start&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;there, I told you it was a quickie.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4161106340557201917?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4161106340557201917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4161106340557201917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4161106340557201917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4161106340557201917'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/07/backing-up-mysql-database-without-mysql.html' title='backing up mysql database without mysql root password'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-6377782007525864713</id><published>2010-07-07T11:43:00.000-07:00</published><updated>2010-07-07T11:43:34.204-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='associationtypemismatch'/><category scheme='http://www.blogger.com/atom/ns#' term='array'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='expected'/><title type='text'>associationtypemismatch expected got array</title><content type='html'>I'm building an app a bit at a time. Sufficient time elapses between development effort that I forget some basic stuff.&lt;br /&gt;&lt;br /&gt;Something that I haven't forgotten is how often I come across this error when I've made some changes to my models and edit forms:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ActiveRecord::AssociationTypeMismatch (MyModelName(#-613518908) expected, got Array(#-608606448)):&lt;/div&gt;&lt;br /&gt;This typically means that I've forgotten:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;accepts_nested_attributes_for &lt;/div&gt;&lt;br /&gt;in my model.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-6377782007525864713?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/6377782007525864713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=6377782007525864713' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6377782007525864713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6377782007525864713'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/07/associationtypemismatch-expected-got.html' title='associationtypemismatch expected got array'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4422790900085150904</id><published>2010-06-21T13:23:00.000-07:00</published><updated>2010-06-21T13:41:44.182-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='anchor'/><category scheme='http://www.blogger.com/atom/ns#' term='url'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='prepend'/><category scheme='http://www.blogger.com/atom/ns#' term='replace'/><category scheme='http://www.blogger.com/atom/ns#' term='append'/><title type='text'>JQuery automatic linking</title><content type='html'>I have some values on my webpage, they are URLs and I have wrapped them in the form:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="url"&gt;&lt;span class="url"&gt;&amp;lt;span class="url"&amp;gt;google.com&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="url"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;span class="url"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="url"&gt;&lt;span class="url"&gt;&amp;lt;span class="url"&amp;gt;http://lwn.net&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="url"&gt;&lt;span class="url"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;span style="font-family: inherit;"&gt;What I would like is to reneder anything that is of class 'url' as a link. And I would also like to stick a http:// infront of links that are currently missing them.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;span style="font-family: inherit;"&gt;For this I use JQuery (I should get around to doing something sensible in the database as well but not just now).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;span style="font-family: inherit;"&gt;So the JQuery looks like:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&amp;nbsp; $(".url:not(:contains('http://'))").prepend("http://");&lt;br /&gt;&amp;nbsp; $(".url").each(function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(this) .replaceWith("&lt;a class="url" href="http://www.blogger.com/%22+%20$%28this%29.text%28%29%20+%20%22"&gt;" + $(this).text() + "&lt;/a&gt;");&lt;br /&gt;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;span style="font-family: inherit;"&gt;That's it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span class="url"&gt;&lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4422790900085150904?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4422790900085150904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4422790900085150904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4422790900085150904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4422790900085150904'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/06/jquery-automatic-linking.html' title='JQuery automatic linking'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-2608022851876675136</id><published>2010-04-13T01:21:00.001-07:00</published><updated>2010-04-13T02:49:52.310-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='joggler'/><category scheme='http://www.blogger.com/atom/ns#' term='initrd'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>building kernel for joggler</title><content type='html'>The excellent &lt;a href='http://jogglerhacks.blogspot.com/'&gt;Playing the Joggler&lt;/a&gt; blog contains all the information you need to build a 2.6.33.2 kernel for your joggler. I thought I would collect together what I did so interested others can complete to process too:&lt;br /&gt;&lt;br /&gt;I cloned the git 'baseline' branch of &lt;br /&gt;&lt;a href='http://gitorious.org/mer-meego/mer-meego-kernel'&gt;http://gitorious.org/mer-meego/mer-meego-kernel&lt;/a&gt;&lt;br /&gt;then applied the patches.&lt;br /&gt;[the 'joggler' branch of this repo now has the patches applied - so cloning that will avoid adding the patches].&lt;br /&gt;The patches can be found here:&lt;br /&gt;&lt;a href='http://adqmisc.googlecode.com/svn/trunk/joggler/'&gt;http://adqmisc.googlecode.com/svn/trunk/joggler/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I then took the .config file from &lt;br /&gt;&lt;a href='http://jogglerhacks.blogspot.com/2010/04/kernel-config-for-2633-for-joggler.html'&gt;http://jogglerhacks.blogspot.com/2010/04/kernel-config-for-2633-for-joggler.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I did:&lt;br /&gt;1. make&lt;br /&gt;2. make modules&lt;br /&gt;3. make modules_install INSTALL_MOD_DIR=./initfs (I think)&lt;br /&gt;4. make bzImage - (and renamed the image vmlinuz)&lt;br /&gt;&lt;br /&gt;I took the initrd from &lt;a href='http://asdfghjkl.me.uk /files/joggler /mid-efi-nokeyboard.tar.gz'&gt;efi-nokeyboard.tar.gz&lt;/a&gt; and put the modules (that I built with line 3 above) into a new initrd. Instructions for rebuilding a initrd can also be found on the excellent &lt;a href='http://adqmisc.googlecode.com/svn/trunk/joggler/'&gt;Playing the Joggler&lt;/a&gt; blog.&lt;br /&gt;&lt;br /&gt;There is a &lt;a href='http://www.jogglerwiki.info/'&gt;great wiki&lt;/a&gt; that contains information about running alternative OS's on the Joggler - and it has a &lt;a href='http://www.jogglerwiki.info/index.php?title=Kernel_Patches'&gt;page on building the kernel&lt;/a&gt; which is worth watching.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-2608022851876675136?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/2608022851876675136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=2608022851876675136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2608022851876675136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2608022851876675136'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/04/building-kernel-for-joggler.html' title='building kernel for joggler'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4157033942246025550</id><published>2010-03-27T01:32:00.000-07:00</published><updated>2010-03-27T01:32:48.665-07:00</updated><title type='text'>rails ferret in production</title><content type='html'>I've had a few problems as i've moved from dev to production. My task has been complicated by not always maintaining my migrations. However the problem I've had recently has been with ferret not working.&lt;br /&gt;&lt;br /&gt;When I've started '&lt;b&gt;./console/script procution&lt;/b&gt;' and try and rebuild indexes manually I get:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mymodel1.rebuild_index()&lt;br /&gt;=&gt; false&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It turns out that the problem was that ferret has an expectation that in production, there will be a ferret server running. This is asserted in the file:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;./config/ferret_server.yml&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I commented out the production server and it works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4157033942246025550?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4157033942246025550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4157033942246025550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4157033942246025550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4157033942246025550'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/03/rails-ferret-in-production.html' title='rails ferret in production'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-3491542724222917736</id><published>2010-03-26T11:23:00.000-07:00</published><updated>2010-03-26T11:30:48.095-07:00</updated><title type='text'>gnuplot point types</title><content type='html'>I was using gnuplot today and wanted a list of the different point types which are available so I could choose a suitable one.&lt;br /&gt;&lt;br /&gt;After visiting the internet, I couldn't find a list so I made my own:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;pre&gt;echo plot `perl -e 'for ($i = 0; $i &lt; 30; $i++) {print " \"&amp;lt;echo $i 1\" u 1:2 pt $i ps 2 notitle, ";}'` | sed 's/,$//' | gnuplot -persist&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_wIZkkUVsr68/S6z7Ws62J7I/AAAAAAAAAAU/ByR8FVc7nJI/s1600/x11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_wIZkkUVsr68/S6z7Ws62J7I/AAAAAAAAAAU/ByR8FVc7nJI/s320/x11.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;pre&gt;echo set term postscript enhanced\; set output \'./points.eps\'\; plot `perl -e 'for ($i = 0; $i &lt; 90; $i++) {print " \"&amp;lt;echo $i 1\" u 1:2 pt $i ps 1 notitle, ";}'` | sed 's/,$//' | gnuplot&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_wIZkkUVsr68/S6z7gdQkuYI/AAAAAAAAAAc/K9Xub-q6PqI/s1600/postscript_enhanced.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_wIZkkUVsr68/S6z7gdQkuYI/AAAAAAAAAAc/K9Xub-q6PqI/s320/postscript_enhanced.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-3491542724222917736?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/3491542724222917736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=3491542724222917736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3491542724222917736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3491542724222917736'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/03/gnuplot-point-types.html' title='gnuplot point types'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_wIZkkUVsr68/S6z7Ws62J7I/AAAAAAAAAAU/ByR8FVc7nJI/s72-c/x11.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-7892583461667942200</id><published>2010-03-25T12:36:00.000-07:00</published><updated>2010-03-25T12:36:35.136-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='production'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='rack'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='nginx'/><category scheme='http://www.blogger.com/atom/ns#' term='thin'/><title type='text'>rails won't run in production</title><content type='html'>I've been working on a Rails app (2.3.5).&lt;br /&gt;&lt;br /&gt;I'm hosting on modest hardware and chose Nginx and Thin to hopefully get the most performance out of my app.&lt;br /&gt;&lt;br /&gt;My problem was that my app wouldn't run in production. It worked fine in development, but not in production.&lt;br /&gt;&lt;br /&gt;There were a couple of problems:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I was using a legacy database, and like non-pluralised table names, development picked up 'ActiveRecord::Base.pluralize_table_names = false' in my config/environment.rb, but I didn't seem to propagate to production. I added in 'ActiveRecord::Base.pluralize_table_names = false' into ./config/environments/production.rb&lt;/li&gt;&lt;li&gt;Thin wouldn't start. Starting thin with -D allowed me to start it not daemonized, and then I could see the problem: 'Missing the Rails&amp;nbsp; gem. Please `gem install -v= rails`, update your RAILS_GEM_VERSION'. &lt;br /&gt;This is Thin reacting against &lt;a href="http://osdir.com/ml/RubyonRailsTalk/2010-01/msg00763.html"&gt;rack version 1.1.0 apparently&lt;/a&gt;.&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gem uninstall --version '&amp;gt; 1.0.1' rack&lt;/span&gt; fixed that.&lt;/li&gt;&lt;/ol&gt;One less thing on my todo list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-7892583461667942200?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/7892583461667942200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=7892583461667942200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7892583461667942200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7892583461667942200'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/03/rails-wont-run-in-production.html' title='rails won&apos;t run in production'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4211609599571502614</id><published>2010-02-08T02:11:00.000-08:00</published><updated>2010-02-09T12:59:20.181-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='9.10'/><category scheme='http://www.blogger.com/atom/ns#' term='XE'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='libstdc++5'/><category scheme='http://www.blogger.com/atom/ns#' term='Tora'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='OCI_SYSDBA'/><title type='text'>Building TOra with Oracle support on Ubuntu</title><content type='html'>I'm doing some Oracle development, so I wanted to use the &lt;a href="http://torasql.com/"&gt;TOra db browser&lt;/a&gt; for convenience.&lt;br /&gt;&lt;br /&gt;TOra is Free Software. There is a license conflict between TOra and the license that Oracle use on their client libraries. As a result TOra is not distributed with Oracle support: if you want to use TOra with Oracle, you must download the separate components, TOra source and Oracle client, and build TOra yourself.&lt;br /&gt;&lt;br /&gt;This process is documented on the web, notably at &lt;a href="http://www.pythian.com/news/3869/installing-tora-with-oracle-support-on-ubuntu-904-jaunty-jackalope/"&gt;pythian blog&lt;/a&gt;. However the instructions are for Ubuntu 9.04, and I'm using 9.10, so I thought there is an opportunity to document my experience as well.&lt;br /&gt;&lt;br /&gt;So, on Ubuntu 9.10, I have installed Oracle XE (a resource-limited 10G installation), into it's default directory: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/usr/lib/oracle/xe/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I'm also assuming that you, like me, have the three Oracle packages &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;oracle-instantclient-basic-10.2.0.4-1.i386.rpm oracle-instantclient-devel-10.2.0.4-1.i386.rpm&amp;nbsp;oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm&lt;/span&gt; installed in their default location: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/usr/lib/oracle/10.2.0.4/client/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;NOTE: I chose the '&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;10.x&lt;/span&gt;' client packages - I'm not sure if this makes a difference.&lt;br /&gt;&lt;br /&gt;It seems that the Ubuntu source for TOra have migrated to git, so when I tried to pull down the source using &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;apt-get source&lt;/span&gt; I didn't have any joy. So I cloned the TOra git repository and attempted to modify the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;debian/rules &lt;/span&gt;file to include the relevant Oracle libraries. This wasn't possible - there were no configure rules in there...&lt;br /&gt;&lt;br /&gt;So instead I configure using 'cmake'. &lt;br /&gt;First I need to configure: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ORACLE_HOME&lt;/span&gt; and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;LD_LIBRARY_PATH&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.4/client/lib&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;export ORACLE_HOME=/usr/lib/oracle/10.2.0.4/client/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I also need to install the old &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;libstdc++5&lt;/span&gt; which is available from the Debian repository: &lt;a href="http://packages.debian.org/lenny/i386/libstdc++5/download"&gt;http://packages.debian.org/lenny/i386/libstdc++5/download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Then a command line to configure build:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;fakeroot cmake -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.4/client/lib -DORACLE_LIBRARY_CLNTSH=/usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 -DORACLE_LIBRARY_OCCI=/usr/lib/oracle/10.2.0.4/client/lib/libocci.so.10.1 -DORACLE_INCLUDES=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public &lt;/div&gt;&lt;br /&gt;NOTE: I'm calling in the INCLUDES from the XE install. &lt;br /&gt;...and another to build:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;make&lt;/div&gt;&lt;br /&gt;And you should know what to do from here...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4211609599571502614?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4211609599571502614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4211609599571502614' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4211609599571502614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4211609599571502614'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/02/building-tora-with-oracle-support-on.html' title='Building TOra with Oracle support on Ubuntu'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4364424494173562998</id><published>2010-01-23T12:27:00.000-08:00</published><updated>2010-01-28T01:07:12.478-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='result_source'/><category scheme='http://www.blogger.com/atom/ns#' term='model_config'/><category scheme='http://www.blogger.com/atom/ns#' term='FormFu'/><category scheme='http://www.blogger.com/atom/ns#' term='DBIC'/><category scheme='http://www.blogger.com/atom/ns#' term='many_to_many'/><category scheme='http://www.blogger.com/atom/ns#' term='resultset'/><title type='text'>FormFu, DBIC, model_config and resultset.</title><content type='html'>I have found myself back in Catalyst development work. This wouldn't be such a bad think if I hadn't just spent a whole day trying to fix up a form to edit a 'many_to_many' relationship which is stored in my Schema.&lt;br /&gt;&lt;br /&gt;I've been following &lt;a href="http://lists.scsys.co.uk/pipermail/html-formfu/2009-September/002498.html"&gt;this post&lt;/a&gt; which says it should be about as simple as it sounds. i.e. not as simple as Rails, but definitely doable with finite effort. So, FormFu syntax not withstanding, I following these instructions but ended up with some peculiar error talking about 'result_source'. I tried playing with 'nested_name', 'model_config' etc... I began to think about building my Select in the controller.&lt;br /&gt;&lt;br /&gt;Finally, I discovered my error: I had not configured Controller::HTML::FormFu which is shown nicely in this post:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lists.scsys.co.uk/pipermail/html-formfu/2009-March/001932.html"&gt;http://lists.scsys.co.uk/pipermail/html-formfu/2009-March/001932.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That is a day of my life gone, but at least I will be able to rise from sleep tomorrow knowing that I can move onto doing some new development.&lt;br /&gt;&lt;br /&gt;UPDATE: One additional comment to the post above from 2009-March. I found that I needed to use the many_to_many relationship as the nested_name, &lt;i&gt;not&lt;/i&gt; &lt;i&gt;the has_many&lt;/i&gt; as stated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4364424494173562998?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4364424494173562998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4364424494173562998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4364424494173562998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4364424494173562998'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/01/formfu-dbic-modelconfig-and-resultset.html' title='FormFu, DBIC, model_config and resultset.'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-1481849636247006301</id><published>2010-01-08T07:35:00.000-08:00</published><updated>2010-07-29T23:53:22.739-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hp mini 1000'/><category scheme='http://www.blogger.com/atom/ns#' term='skype'/><category scheme='http://www.blogger.com/atom/ns#' term='duplex'/><category scheme='http://www.blogger.com/atom/ns#' term='microphone'/><category scheme='http://www.blogger.com/atom/ns#' term='audio'/><category scheme='http://www.blogger.com/atom/ns#' term='pulse'/><title type='text'>Skype on a Ubuntu HP Mini 1000</title><content type='html'>I have been playing with Ubuntu 9.10 on a HP Mini for a while - on and off.&lt;br /&gt;&lt;br /&gt;I have a request to get Skype working. I struggled with this for a bit, but I couldn't get it to work with the duplex sound card: when I pluged a microphone in, the speakers stopped working for example.&lt;br /&gt;&lt;br /&gt;Something changed - it could have been an kernel update - anyway, I can now use Skype with minimal effort - including the web-cam.&lt;br /&gt;&lt;br /&gt;The vital thing I had to do was disable the checkbox (options-&amp;gt;audio settings or something):&lt;br /&gt;&lt;br /&gt;'&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Allow Skype to automatically adjust my mixer levels&lt;/span&gt;'&lt;br /&gt;&lt;br /&gt;Then, I could twiddle the 'pulse audio' options (right click on the volume icon) to increase the microphone input level. It seemed that one problem was Skype wouldn't let me increase the microphone input level while I was letting it 'automatically adjust my mixer levels'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-1481849636247006301?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/1481849636247006301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=1481849636247006301' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1481849636247006301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1481849636247006301'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2010/01/skype-on-ubuntu-hp-mini-1000.html' title='Skype on a Ubuntu HP Mini 1000'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-6734145940195364447</id><published>2009-12-16T04:16:00.000-08:00</published><updated>2009-12-16T04:16:49.224-08:00</updated><title type='text'>Fedora, sqlplus: error while loading shared libraries</title><content type='html'>My sqlplus stopped working one day with the error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this is a classic shared object where the shared object cannot be found.&lt;br /&gt;&lt;br /&gt;I don't know how it happened, but my sqlplus install had become detached. The solution is simple as root: search for the .so file in your file system. You can do this using your expert knowledge, or find:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;find /usr -name 'libsqlplus.so'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-family: inherit;"&gt;Once you have this location, stick the folder which contains this library (i.e. &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/usr/lib/oracle/11.2/client/lib/&lt;/span&gt;) in a file for linker to find:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/etc/ld.so.conf.d/oracle.conf&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The linker is call 'ld' and on Fedora 11 uses /etc/ld... for it's configuration files. The final step is to re-configure the dynamic linker run time bindings which is done with:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ldconfig&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-6734145940195364447?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/6734145940195364447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=6734145940195364447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6734145940195364447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6734145940195364447'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/12/fedora-sqlplus-error-while-loading.html' title='Fedora, sqlplus: error while loading shared libraries'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-5053356107948580574</id><published>2009-12-16T02:16:00.000-08:00</published><updated>2010-04-13T04:14:28.013-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jar-with-dependencies'/><category scheme='http://www.blogger.com/atom/ns#' term='jar'/><category scheme='http://www.blogger.com/atom/ns#' term='self'/><category scheme='http://www.blogger.com/atom/ns#' term='contained'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>Building a self contained Jar with Maven on Netbeans</title><content type='html'>Sometimes I need to build a Jar for distribution. A typically ideal type of Jar is one which can be executed from the command line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;java -jar ./myApp.jar&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have in the past used &lt;a href="http://one-jar.sourceforge.net/"&gt;One-Jar&lt;/a&gt; which works nicely for this purpose, but now I'm using Maven as standard, this should be able to do this for me. And do it without IDE dependent plugins.&lt;br /&gt;&lt;br /&gt;Today I'm going to build a jar with Eclipse. The project which I'm building is dependent on another local Maven project, and they both are dependent on locally and repository managed Jars.&lt;br /&gt;&lt;br /&gt;Once all the dependencies are in the Maven Classpath Container, it is a matter of editing the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;pom.xml&lt;/span&gt; file which dictates the build process.&lt;br /&gt;&lt;br /&gt;to this I added a plugin - in the &lt;plugins&gt; section of the &lt;build&gt; node:&lt;/build&gt;&lt;/plugins&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;  &amp;lt;artifactid&amp;gt;maven-assembly-plugin&amp;lt;/artifactid&amp;gt;&lt;br /&gt;  &amp;lt;configuration&amp;gt;&lt;br /&gt;    &amp;lt;descriptorRefs&amp;gt;&lt;br /&gt;      &amp;lt;descriptorRef&amp;gt;jar-with-dependencies&amp;lt;/descriptorRef&amp;gt;&lt;br /&gt;    &amp;lt;/descriptorRefs&amp;gt;&lt;br /&gt;    &amp;lt;archive&amp;gt;&lt;br /&gt;      &amp;lt;manifest&amp;gt;&lt;br /&gt;        &amp;lt;mainClass&amp;gt;net.crisppacket.myApp&amp;lt;/mainClass&amp;gt;&lt;br /&gt;      &amp;lt;/manifest&amp;gt;&lt;br /&gt;    &amp;lt;/archive&amp;gt;&lt;br /&gt;  &amp;lt;/configuration&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;so now, issuing (from the command line):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mvn assembly:assembly&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will create a Jar for you. I got this far with the assistance of the excellent &lt;a href="http://acs.lbl.gov/%7Eksb/Scratch/Maven_notes.html"&gt;KSB's Maven Notes&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now, in Netbeans, you can add a Custom Goal. Right click on the project you want to build, select 'Custom-&amp;gt;Goals...' and then in the Goal field type:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;assembly:assembly&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/span&gt;OK. Now you can select this Goal (using the same mouse navigation) and it will build you a Jar. Hopefully.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-5053356107948580574?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/5053356107948580574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=5053356107948580574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5053356107948580574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5053356107948580574'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/12/building-self-contained-jar-with-maven.html' title='Building a self contained Jar with Maven on Netbeans'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-2620674496398625770</id><published>2009-12-10T12:09:00.000-08:00</published><updated>2010-01-10T08:28:01.727-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reserved words'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='mvc'/><title type='text'>reserved words in MVC</title><content type='html'>There is no other words to express my disappointment with object relational mapping framworks than: woeful&lt;br /&gt;&lt;br /&gt;I have played with three MVC frameworks (Catalyst/perl, rails/ruby, grails/groovy) and by one metric, Rails is pittyful. That metric is narrow but significant (in my opinion) and is described below.&lt;br /&gt;&lt;br /&gt;The object-relational mapping frameworks in question are:&lt;br /&gt;&lt;br /&gt;Catalyst/DBIC&lt;br /&gt;Rails/ActiveRecord&lt;br /&gt;Grails/Hibernate&lt;br /&gt;&lt;br /&gt;My issue is that all these frameworks have implicit 'reserved words'. These typically throw an obscure error if you use in your Models because they collide with either framework or DB reserved words.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let me draw up a table:&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Framework&lt;br /&gt;&lt;/th&gt;&lt;th&gt;# reserved words&lt;br /&gt;&lt;/th&gt;&lt;th&gt;notes&lt;br /&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DBIC&lt;br /&gt;&lt;/td&gt;&lt;td&gt;0 + db dependent&lt;br /&gt;&lt;/td&gt;&lt;td&gt;DB reserved words are not permitted.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hibernate&lt;br /&gt;&lt;/td&gt;&lt;td&gt;0 + db dependent&lt;br /&gt;&lt;/td&gt;&lt;td&gt;DB reserved words are not permitted.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ActiveRecord&lt;br /&gt;&lt;/td&gt;&lt;td&gt;7 + db dependent&lt;br /&gt;&lt;/td&gt;&lt;td&gt;based on &lt;a href="http://juicebar.wordpress.com/2007/05/30/reserved-words-in-rails/"&gt;Reserved words in Rails&lt;/a&gt; blog post from 2007&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;So, there is an important uncertainty here: DB reserved words.&lt;br /&gt;&lt;br /&gt;Irrespective of db reserved words, the frameworks differed on DB reserved words - so your models aren't portable across DBs. Am I alone in feeling this is a real lost opportunity for relational mapping frameworks?&lt;br /&gt;&lt;br /&gt;I have still not seen a reason why these 'reserved words' restrictions exist&lt;br /&gt;All (?) decent DBs will (I think) allow you arbetary table names with by quoting db names...&lt;br /&gt;From an architecture perspective, having reserved words for something which is supposed by be abstract is just perverse.&lt;br /&gt;&lt;br /&gt;I await the end of 'reserved words'.&lt;br /&gt;&lt;br /&gt;UPDATE: This post is poorly researched. I discovered an additional resource in a &lt;a href="http://www.yup.com/articles/2007/01/31/no-reservations-about-keywords-in-ruby-on-rails"&gt;blog post by Daniel Butler&lt;/a&gt;. However, my experience still points to Catalyst being an good choice of MVC framework when dealing with large legacy databases.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-2620674496398625770?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/2620674496398625770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=2620674496398625770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2620674496398625770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2620674496398625770'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/12/reserved-words-in-mvc.html' title='reserved words in MVC'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-2175315918030178502</id><published>2009-12-06T10:31:00.000-08:00</published><updated>2009-12-06T11:57:44.614-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ror'/><category scheme='http://www.blogger.com/atom/ns#' term='search_path'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='pg'/><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><title type='text'>postgresql search_path with ruby on rails</title><content type='html'>I studied (amongh other things) electrical engineering at Univsrity. One of the lectures said that you only need one forumal to master the subject: V=IR. However, the lecture warned, you have to know that forumla inside out.&lt;br /&gt;&lt;br /&gt;Indeed, you could argue that V=IR is a simplification of Maxwells law, so V=IR not only covers you for EE, but a large chunk of physics (astro, plasma for example) as well.&lt;br /&gt;&lt;br /&gt;Some times, I think MVC frameworks are similar.&lt;br /&gt;&lt;br /&gt;Anyways... .I'm finding myself using Rails today. I've used it before with some success but didn't like the way it wanted to dominate the DB. My current thinking is that this approach is alright unless you want to integrate a legacy DB.&lt;br /&gt;&lt;br /&gt;I'm integrating a legacy DB. It's in PostgreSQL and it uses &lt;a href="http://www.postgresql.org/docs/current/static/ddl-schemas.html"&gt;schema namespaces&lt;/a&gt;. Namespaces are really worth the effort. They look great if you use &lt;a href="http://www.pgadmin.org/"&gt;PgAdminIII&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I struggled for a hour or so with my namespaces and then I discovered that I could &lt;a href="http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html"&gt;include a search_path in ./config/database.yml&lt;/a&gt;. Now everything is working well again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-2175315918030178502?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/2175315918030178502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=2175315918030178502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2175315918030178502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2175315918030178502'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/12/postgresql-searchpath-with-ruby-on.html' title='postgresql search_path with ruby on rails'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-6782250828519007105</id><published>2009-12-05T09:41:00.000-08:00</published><updated>2009-12-06T08:38:10.669-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='schema'/><category scheme='http://www.blogger.com/atom/ns#' term='namespaces'/><category scheme='http://www.blogger.com/atom/ns#' term='discover'/><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><title type='text'>discovering namespaces in postgresql</title><content type='html'>I've been working on a project with a friend. We're using PostgreSQL for our db...&lt;br /&gt;&lt;br /&gt;I thoughtfully prepared the DB locally. I then did a complete dump of it and gave it to my chum...&lt;br /&gt;&lt;br /&gt;However, I hadn't anticipated a few things:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;I didn't tell my friend the username I had used when creating the database.&lt;/b&gt; The PostgreSQL dump had helpfully included a bunch of 'ALTER TABLE, OWNER TO' commands. If you haven't anticipated this - and the user doesn't exist - you will end up with a bunch of problems when ingesting the dump.&lt;br /&gt;&lt;b&gt;Proposed solutions&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create a user with the name recorded in the dump file before ingestion&lt;/li&gt;&lt;li&gt;when doing a pg_dump, add the --no-owner flag.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&amp;nbsp;&lt;b&gt;I didn't tell my friend that I have used &lt;a href="http://www.postgresql.org/docs/8.1/interactive/ddl-schemas.html"&gt;schema&lt;/a&gt; in the db&lt;/b&gt;. Once they had got over the first problem, they were greeted with an apprently empty database! If you don't set your search_path to add the relevant schema names, \dt will tell you 'no relations found'&lt;br /&gt;Proposed solutions:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Tell my friend the names of the schema that i've used - maybe even in the form of a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;SET search_path=newschema,"$user",public;&lt;/span&gt; command.&lt;/li&gt;&lt;li&gt;Let my friend grep the dump file for 'search_path'.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Let my friend figure out the relevant names of the schema by having them do a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;SELECT * FROM pg_namespaces;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;I think I could improve on the namespace discovery query, possibably by just suggesting that my friend does a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;SELECT * FROM pg_tables;&lt;/span&gt; which seems to reveal more useful information.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE: &lt;/b&gt;after some more playing around, I've discovered that I'll will save myself alot of time by editing the dump file to remove all the 'alter to' commands. One it is ingested, the resulting db requires alot of effort to manipulate all the permissions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-6782250828519007105?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/6782250828519007105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=6782250828519007105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6782250828519007105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6782250828519007105'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/12/discovering-namespaces-in-postgresql.html' title='discovering namespaces in postgresql'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-1567621908589192764</id><published>2009-11-25T12:58:00.000-08:00</published><updated>2009-12-16T02:24:54.072-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>maven, fedora.</title><content type='html'>I've been tipped that Maven is worth the learning curve.&lt;br /&gt;&lt;br /&gt;I had a go, on Fedora 11. I can't wait for Fedora 12.&lt;br /&gt;&lt;br /&gt;My first tip, is download and install locally: maven 2.2.1.&lt;br /&gt;Install this into /usr/local/maven...&lt;br /&gt;&lt;br /&gt;Use that in your Eclipse/NetBeans.&lt;br /&gt;&lt;br /&gt;I'm on holiday for a few days... but I will post on how to get Eclipse and NetBeans building a distributable (all dependencies included) jar from the IDE when I return.&lt;br /&gt;&lt;br /&gt;In conclusion: Maven is worth the learning curve.&lt;br /&gt;&lt;br /&gt;UPDATE: After reflecting on actual use of Maven, I can add the following:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Because it manages the build process, the IDE does not manage the build process. This means that you reduce your dependence on a given IDE. The project I'm working on is now developed by NetBeans and Eclipse folks. At the same time.&lt;/li&gt;&lt;li&gt;Because it manages the build process, you are not dependent on IDE specific tools to build your distribution Jar. I like &lt;a href="http://one-jar.sourceforge.net/"&gt;One-Jar&lt;/a&gt; but it is an extra dependency.&lt;/li&gt;&lt;li&gt;By allowing you to collect all dependent code in your own repository, Maven enables a new level of technical management to be applied across a project, group, division etc.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-1567621908589192764?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/1567621908589192764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=1567621908589192764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1567621908589192764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1567621908589192764'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/11/maven-fedora.html' title='maven, fedora.'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-900397532910156897</id><published>2009-11-19T10:33:00.000-08:00</published><updated>2009-11-19T10:33:14.031-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='audio'/><category scheme='http://www.blogger.com/atom/ns#' term='vlc'/><category scheme='http://www.blogger.com/atom/ns#' term='jackd'/><title type='text'>vlc, jackd no audio</title><content type='html'>I've been playing with Jack.&lt;br /&gt;&lt;br /&gt;I'm feeling like I should always have it running since it works pretty well on the machine i'm using (xubuntu 9.10) and I'm going to want to use some audio production applications in future. &lt;br /&gt;&lt;br /&gt;But, today I wanted to play a movie in VLC.&lt;br /&gt;&lt;br /&gt;The sound didn't work and &lt;a href="http://drobilla.net/software/patchage/"&gt;patchage&lt;/a&gt; didn't show 'vlc'. A brief search and I discovered that there is a jack plugin for vlc.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;apt-get install vlc-plugin-jack&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;fixes that... Then within VLC, you need to switch to jack output:&lt;br /&gt;&lt;br /&gt;tools-&amp;gt;preferences-&amp;gt;audio output label 'jack audio output'&lt;br /&gt;&lt;br /&gt;then, I had to switch to 'show settings' all.&lt;br /&gt;Open the audio-&amp;gt;output modules-&amp;gt;jack tree&lt;br /&gt;and check the 'automatically connect to writable clients'&lt;br /&gt;&lt;br /&gt;This made it work. I expect I'm going to experience some problems when I have more than one 'writable client', but I'll burn that bridge when I get to it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-900397532910156897?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/900397532910156897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=900397532910156897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/900397532910156897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/900397532910156897'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/11/vlc-jackd-no-audio.html' title='vlc, jackd no audio'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-1857990918721786898</id><published>2009-11-04T02:00:00.000-08:00</published><updated>2009-11-04T02:07:12.024-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='shiro'/><category scheme='http://www.blogger.com/atom/ns#' term='basic'/><category scheme='http://www.blogger.com/atom/ns#' term='grails'/><category scheme='http://www.blogger.com/atom/ns#' term='authentication'/><category scheme='http://www.blogger.com/atom/ns#' term='basichttpauthenticationfilter'/><title type='text'>basic http auth with Shiro in Grails</title><content type='html'>A quick note: &lt;br /&gt;&lt;br /&gt;I found a blog &lt;a href="http://www.grassr.com/wordpress/?p=18"&gt;nice simple recipe for basic http auth&lt;/a&gt; using Shiro in Grails. However, since this was published, JSecurity has been renamed Apache Shiro and so some minor changes need to be made at the end of the blog.&lt;br /&gt;&lt;br /&gt;I posted them as a comment to that page but will repeat them here for good measure:&lt;br /&gt;&lt;br /&gt;the last additions to &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Config.groovy&lt;/span&gt; when using Shiro should be:&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;security.shiro.filter.config = """&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[filters]&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;authcBasic = org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;authcBasic.applicationName = Demo&lt;/span&gt; app name&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[urls]&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/rest/** = authcBasic&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;"""&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-1857990918721786898?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/1857990918721786898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=1857990918721786898' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1857990918721786898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1857990918721786898'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/11/basic-http-auth-with-shiro-in-grails.html' title='basic http auth with Shiro in Grails'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-656015149601762410</id><published>2009-11-02T04:11:00.000-08:00</published><updated>2009-11-02T04:22:21.084-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='no signature of method'/><category scheme='http://www.blogger.com/atom/ns#' term='shiro'/><category scheme='http://www.blogger.com/atom/ns#' term='grails'/><category scheme='http://www.blogger.com/atom/ns#' term='addtopermissions'/><title type='text'>Grails, Shiro, addToPermissions() error</title><content type='html'>I've been playing with &lt;a href="http://grails.org/"&gt;Grails&lt;/a&gt; with an eye to using it on a new project.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cwiki.apache.org/SHIRO/"&gt;Apache Shiro&lt;/a&gt; looks like a suitable security framework for me so I thought I'd use it right from the off. There is even a &lt;a href="http://grails.org/plugin/shiro"&gt;plugin for Grails&lt;/a&gt; to simplify installation.&lt;br /&gt;&lt;br /&gt;I discovered that you still have to create your own shiro.jar from the shiro source - but that was relatively straight forward....&lt;br /&gt;&lt;br /&gt;[... once I had downloaded a new version of Maven (Fedora 11 packaged version wasn't recent enough)....]&lt;br /&gt;&lt;br /&gt;So, once I had installed shiro.jar, and the plugin, I decided to run:&lt;br /&gt;'grails create-db-realm' and&lt;br /&gt;'grails create-authcontroller'&lt;br /&gt;and added bootstrap code according to the &lt;a href="http://grails.org/plugin/shiro"&gt;plugin advice&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;ASIDE: for the purposes of just playing around. A better choice for 'playing around' is to do:&lt;br /&gt;'grails quick-start'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you followed the same route as me, you may have experienced:&lt;br /&gt;&lt;br /&gt;Caused by: groovy.lang.MissingMethodException: No signature of method: static groovy.lang.MissingMethodException.addToPermissions() is applicable for argument types: (java.lang.String) values: [*:*]&lt;br /&gt;&lt;br /&gt;The fix I arrived at is to add the line:&lt;br /&gt;static hasMany = [ roles: ShiroRole, permissions: String ]&lt;br /&gt;to ShiroUser.groovy so it becomes:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;class ShiroUser {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    String username&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    String passwordHash&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    static hasMany = [ roles: ShiroRole, permissions: String ]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    static constraints = {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        username(nullable: false, blank: false)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This got me past this error, however since I feel that I still don't properly 'get it', I expect more issues (and possibably blog posts) in the future!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-656015149601762410?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/656015149601762410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=656015149601762410' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/656015149601762410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/656015149601762410'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/11/grails-shiro-addtopermissions-error.html' title='Grails, Shiro, addToPermissions() error'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4981970897122460406</id><published>2009-10-15T15:10:00.000-07:00</published><updated>2009-11-02T06:54:47.098-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wl'/><category scheme='http://www.blogger.com/atom/ns#' term='hp mini 1000'/><category scheme='http://www.blogger.com/atom/ns#' term='bcm4312'/><category scheme='http://www.blogger.com/atom/ns#' term='problem'/><category scheme='http://www.blogger.com/atom/ns#' term='karmic'/><category scheme='http://www.blogger.com/atom/ns#' term='broadcom'/><category scheme='http://www.blogger.com/atom/ns#' term='wifi'/><category scheme='http://www.blogger.com/atom/ns#' term='drivers'/><title type='text'>karmic ubuntu on hp mini 1000</title><content type='html'>I've spent the last couple of days trying to get Karmic (beta) on a HP Mini 1000 (1030NR).&lt;br /&gt;&lt;br /&gt;This is simple enough with the help of unetbootin. My problems started when I tried to get wireless working with the proprietary drivers. I have never enjoyed satisfaction with proprietary drivers and this occation was the same.&lt;br /&gt;&lt;br /&gt;In the 'Live mode' the installed (jockey) happily identified the hardware and swiftly installed ssb broadcom drivers. Once installed jockey didn't seem to be `all there'. I couln't install the drivers.&lt;br /&gt;&lt;br /&gt;What finally worked was to go to synaptic package manager and search for 'broadcom' and force a reinstall of the relevant drivers:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;bcmwl-kernel-source&lt;/span&gt; and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;bcmwl-modaliases&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After this, it all worked perfectly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4981970897122460406?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4981970897122460406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4981970897122460406' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4981970897122460406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4981970897122460406'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/10/karmic-ubuntu-on-hp-mini-1000.html' title='karmic ubuntu on hp mini 1000'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-1983833768104626062</id><published>2009-10-12T04:04:00.000-07:00</published><updated>2009-10-13T07:42:10.545-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fedora11'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='404'/><category scheme='http://www.blogger.com/atom/ns#' term='manager'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat6'/><title type='text'>Tomcat6 on Fedora 11</title><content type='html'>I'm contemplating using Tomcat for my next project. I'm going to be developing on my Fedora 11 desktop.&lt;br /&gt;&lt;br /&gt;I am new to this whole app server business and have spent this morning getting everything working. It shouldn't have taken that long, but it did.&lt;br /&gt;&lt;br /&gt;My aim was to have some thing running on localhost which I could connect to and click about in. Compressed down in to a couple of steps I needed to do:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps&lt;/li&gt;&lt;li&gt;edit /etc/tomcat6/tomcat-users.xml&lt;br /&gt;add the line: &lt;pre&gt;&lt;code&gt;&amp;lt;user name="manager" password="tomcat_manager_secret" roles="manager"/&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;user name="manager" password="tomcat_secret_password" roles="manager"&gt;&lt;/user&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;service tomcat6 restart&lt;/li&gt;&lt;/ol&gt;tomcat6 is a basic package. to get something which you can click about with when you point your browser at localhost:8080, you need tomcat6-webapps. To get the manager component, you need tomcat6-admin-webapps.&lt;br /&gt;&lt;br /&gt;This sounds obvious enough now that I've done it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-1983833768104626062?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/1983833768104626062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=1983833768104626062' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1983833768104626062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/1983833768104626062'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/10/tomcat6-on-fedora-11.html' title='Tomcat6 on Fedora 11'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4704183807861513939</id><published>2009-09-10T02:19:00.000-07:00</published><updated>2009-09-10T02:26:23.431-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='plplot'/><category scheme='http://www.blogger.com/atom/ns#' term='cairo'/><category scheme='http://www.blogger.com/atom/ns#' term='plotting'/><title type='text'>plotting for cairo</title><content type='html'>I've been using cairo quite a bit recently. Inevitably, i've found myself wanting to do some graphs. Instead of doing an exhaustive search on the internet, I quickly decided that there was nothing suitable out there and I should do my plots manually for my application.&lt;br /&gt;&lt;br /&gt;Some weeks (months?) on, I've noticed that this is not a sensible approach. I've spent a little more time on the internet looking for solutions, and had some helpful suggestions on email lists.&lt;br /&gt;&lt;br /&gt;The primary candidate is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://plplot.sourceforge.net/"&gt;PLplot&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;PLplot that provides an 'extcairo' driver. This driver will allow you to construct a cairo context in your app, pass it to PLplot, call PLplotting commands, and provide you with a nice graph plotted on your context.&lt;br /&gt;&lt;br /&gt;An example is provided:  &lt;a href="http://plplot.sourcearchive.com/documentation/5.9.2/ext-cairo-test_8c-source.html"&gt;http://plplot.sourcearchive.com/documentation/5.9.2/ext-cairo-test_8c-source.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Up until now, I've been a heavy user of gnuplot. I'm currently interested in extending gnuplot to support this type of work-flow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4704183807861513939?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4704183807861513939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4704183807861513939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4704183807861513939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4704183807861513939'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/09/plotting-for-cairo.html' title='plotting for cairo'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-6893682315354152168</id><published>2009-08-21T02:27:00.000-07:00</published><updated>2009-09-10T02:19:15.600-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='wrong'/><category scheme='http://www.blogger.com/atom/ns#' term='orientation'/><category scheme='http://www.blogger.com/atom/ns#' term='landscape'/><category scheme='http://www.blogger.com/atom/ns#' term='icon'/><category scheme='http://www.blogger.com/atom/ns#' term='printing'/><title type='text'>firefox 3.5 landscape printing orientation icon</title><content type='html'>I have recently upgraded to Firefox 3.5. I am experiencing pretty poor performance from it, but this is no different to 3.0 I was running previously.&lt;br /&gt;&lt;br /&gt;I suspect that it is either: the extensions i'm using (adblock, noscript, cookiemonster?) or my machine setup: openSuse 11.1.&lt;br /&gt;&lt;br /&gt;Today i'm posting on something which I have noticed: I think the 'landscape' icon in firefox printing dialogues is broken. This icon appears in 'page setup' and 'print preview' and I believe it should show the picture of a person rotated through 90deg anti-clockwise to be correct. Here is an annotated screenshot capturing the offending icon.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_wIZkkUVsr68/So5qNrVJMnI/AAAAAAAAAAM/4R1mNCTsjcc/s1600-h/Screenshot-Page+Setup.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 191px;" src="http://4.bp.blogspot.com/_wIZkkUVsr68/So5qNrVJMnI/AAAAAAAAAAM/4R1mNCTsjcc/s320/Screenshot-Page+Setup.png" alt="" id="BLOGGER_PHOTO_ID_5372348188701831794" border="0" /&gt;&lt;/a&gt;The same criticism could be leveled at the 'reverse landscape' icon.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;UPDATE: &lt;/span&gt;it would appear that these icons are provided by GTK, not firefox.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-6893682315354152168?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/6893682315354152168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=6893682315354152168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6893682315354152168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6893682315354152168'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/08/firefox-35-landscape-printing.html' title='firefox 3.5 landscape printing orientation icon'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_wIZkkUVsr68/So5qNrVJMnI/AAAAAAAAAAM/4R1mNCTsjcc/s72-c/Screenshot-Page+Setup.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-3813832316953432355</id><published>2009-07-09T04:08:00.000-07:00</published><updated>2009-07-09T04:13:49.654-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pygtk'/><category scheme='http://www.blogger.com/atom/ns#' term='widget'/><category scheme='http://www.blogger.com/atom/ns#' term='python gtk'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>creating a custom widget with pyGTK</title><content type='html'>I'm working on a desktop app for Gnome.&lt;br /&gt;&lt;br /&gt;I thought I'd write my own widget to display the results, and since I had made rapid progress with python, I figured I'd stick with it.&lt;br /&gt;&lt;br /&gt;After a hour or so looking around the web, I found an excellent tutorial on extending GTK.Widget with Python:&lt;br /&gt;&lt;a href="http://www.learningpython.com/2006/07/25/writing-a-custom-widget-using-pygtk/"&gt;http://www.learningpython.com/2006/07/25/writing-a-custom-widget-using-pygtk/&lt;/a&gt;&lt;br /&gt;and subsequently found a link to some demo code on the gnome website:&lt;br /&gt;&lt;a href="http://git.gnome.org/cgit/pygtk/tree/examples/gtk/widget.py"&gt;http://git.gnome.org/cgit/pygtk/tree/examples/gtk/widget.py&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, now I'm armed with these resources, I can get hacking!&lt;br /&gt;Next post: the results!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-3813832316953432355?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/3813832316953432355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=3813832316953432355' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3813832316953432355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3813832316953432355'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/07/creating-custom-widget-with-pygtk.html' title='creating a custom widget with pyGTK'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-7165516729415982939</id><published>2009-06-18T04:10:00.000-07:00</published><updated>2009-06-18T06:27:17.983-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opensuse'/><category scheme='http://www.blogger.com/atom/ns#' term='applet'/><category scheme='http://www.blogger.com/atom/ns#' term='hamster'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><category scheme='http://www.blogger.com/atom/ns#' term='audit'/><title type='text'>Hamster time tracker on opensuse</title><content type='html'>I've got interested in trying to identify what I spend my time in front of my computer doing. I knocked up a python script to watch 'wnck' and 'dbus' for desktop events (dbus for screensaver) which is available on my website.&lt;br /&gt;&lt;br /&gt;While I was thinking of alerting the gnome community to the embryonic work, I discovered the 'Hamster' applet, which apparently is aimed at fulfiling the same need as my scratchy program.&lt;br /&gt;&lt;br /&gt;So, I visited the &lt;a href='http://projecthamster.wordpress.com/'&gt;hamster site&lt;/a&gt; and cloned the git repository onto my machine. Then I went about configuring it.&lt;br /&gt;&lt;br /&gt;For OpenSuse, this turned out to require a bunch of dependencies to be fulfilled, so I thought I'd record them here so others may benifit.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;zypper install autoconf automake libtool glib2-devel libgconf2-dev intltool gconf2-devel python-devel&lt;br /&gt;zypper install gtk2-devel python-gtk-devel python-gobject2-devel python-gnome-devel&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I might have missed some out while going through my .history, but that should get you close.&lt;br /&gt;&lt;br /&gt;I'm not sure how much this is an additional OpenSuse specific feature, but I needed to set $PKG_CONFIG_PATH which I set to: /usr/lib64/pkgconfig/ (i'm on 64bit).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-7165516729415982939?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/7165516729415982939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=7165516729415982939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7165516729415982939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7165516729415982939'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/06/hamster-time-tracker-on-opensuse.html' title='Hamster time tracker on opensuse'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4136469815243208497</id><published>2009-06-05T07:00:00.000-07:00</published><updated>2009-06-05T07:19:45.921-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='billion'/><category scheme='http://www.blogger.com/atom/ns#' term='row overhead'/><category scheme='http://www.blogger.com/atom/ns#' term='rows'/><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><title type='text'>PostgreSQL row overhead</title><content type='html'>As mentioned previously, I'm in currently planning a +1 billion row ingestion. I've begun to examine the on-disk storage requirements. Memory will be treated in a future post.&lt;br /&gt;&lt;br /&gt;One of the properties of the dataset which I'm ingesting is that it is time stamped. Infact, there is not too much else other than timestamps. With one obvious representation, total cost of the data in a row is ~ 8+4+4+4+4 = 22 bytes.&lt;br /&gt;&lt;br /&gt;However, what I didn't appreciate was that the overhead which PostgreSQL imposes on a row is ~34bytes! This figure has improved slightly in 8.3, but not significantly enough.&lt;br /&gt;&lt;br /&gt;So a couple of options occur to me: use a data base with a smaller row overhead (MySQL?) or redesign the tables.&lt;br /&gt;&lt;br /&gt;I've plumped for the latter. Basically I'm working the tables into a form where they are much squarer. Reducing the row count and increasing the amount of data per row. I'm using arrays to increase the amount of data.&lt;br /&gt;&lt;br /&gt;This redesign has a cost, and without exact requirements from our users it's too early to tell if this decision will return to haunt me...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4136469815243208497?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4136469815243208497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4136469815243208497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4136469815243208497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4136469815243208497'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/06/postgresql-row-overhead.html' title='PostgreSQL row overhead'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-170172019649044169</id><published>2009-06-02T05:06:00.000-07:00</published><updated>2009-06-05T07:23:02.979-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dbi'/><category scheme='http://www.blogger.com/atom/ns#' term='libpq'/><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><category scheme='http://www.blogger.com/atom/ns#' term='c perl'/><title type='text'>perl DBI vs c libpq PostgreSQL ingestion</title><content type='html'>I'm planning to ingest ~1B rows into a PostgreSQL data base.&lt;br /&gt;&lt;br /&gt;There are some interesting storage requirements here, but in the first instance I've been working on getting ingestion throughput up.&lt;br /&gt;&lt;br /&gt;For my trial ingestion of 5M rows, i've found libPQ to be &lt;span style="font-style: italic;"&gt;roughly&lt;/span&gt; twice as fast as Perl DBI.&lt;br /&gt;&lt;br /&gt;Some notes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;indexing is omitted during ingestion.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;libpq included data type hints, my Perl code, using DBI, didn't&lt;/li&gt;&lt;br /&gt;&lt;li&gt;each row ingested included a timestamp, and a few (&amp;lt;5) numeric values&lt;/li&gt;&lt;br /&gt;&lt;li&gt;running multiple ingestion process improved throughput, although less than linearly (for &amp;lt;4 cpus). I.e. 2 CPUs ~ doubled throughput, but it tailed off after that.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-170172019649044169?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/170172019649044169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=170172019649044169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/170172019649044169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/170172019649044169'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/06/perl-dbi-vs-c-libpq-postgresql.html' title='perl DBI vs c libpq PostgreSQL ingestion'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-6730318721285409360</id><published>2009-05-06T14:13:00.000-07:00</published><updated>2009-09-10T02:30:24.783-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='booklet'/><category scheme='http://www.blogger.com/atom/ns#' term='signature'/><category scheme='http://www.blogger.com/atom/ns#' term='pdfjam pdftk'/><category scheme='http://www.blogger.com/atom/ns#' term='staple'/><category scheme='http://www.blogger.com/atom/ns#' term='psnup'/><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><category scheme='http://www.blogger.com/atom/ns#' term='pdfnup'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>making books from a pdf</title><content type='html'>I needed to produce a book - or booklet more like from a PDF file I created. I wanted to print it on a duplex printer and fold the pages together (a signature). This is a common way of&lt;a href="http://www.livejournal.com/users/tobycraig/29223.html"&gt; producing books&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I used &lt;a href="http://www.accesspdf.com/pdftk/"&gt;pdftk&lt;/a&gt; (apt-get install pdftk) and &lt;a href="http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic/firth/software/pdfjam/"&gt;pdfnup&lt;/a&gt; (apt-get install pdfjam).&lt;br /&gt;&lt;br /&gt;The first thing to do was split my file into individual pages using:&lt;br /&gt;&lt;pre&gt; pdftk ./book.pdf burst&lt;/pre&gt;&lt;br /&gt;which produced a file for each page named 'pg_dddd.pdf' where d = digit.&lt;br /&gt;Assuming my book has a page number which is a multiple of 4 (56 in the case below), I used the following script to concatenate these pages together in the correct order:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOTE: This code will over write the file 'booksig.pdf' with a file of reorganised pages.&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl -w&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;&lt;br /&gt;my $totalPages = 56;&lt;br /&gt;&lt;br /&gt;my $processedPages = 0;&lt;br /&gt;&lt;br /&gt;my $pageOrderStr = "";&lt;br /&gt;while ($processedPages &lt; $totalPages/2) {     $pageOrderStr .= sprintf ("pg_%04d.pdf pg_%04d.pdf pg_%04d.pdf pg_%04d.pdf ",      $totalPages - $processedPages,     $processedPages + 1,      $processedPages + 2,      $totalPages - $processedPages - 1);     $processedPages += 2; }  my $catCMD = "pdftk $pageOrderStr cat output booksig.pdf"; print `$catCMD`; &lt;/pre&gt;&lt;br /&gt;this resulted in a pdf call 'booksig.pdf'.&lt;br /&gt;The final step was to use pdfnup to write these pages back to back:&lt;br /&gt;&lt;pre&gt;pdfnup --nup 2x1 booksig.pdf&lt;/pre&gt;&lt;br /&gt;Which produced a file 'booksig-2x1.pdf' which I sent to my duplex printer and then bound together.&lt;br /&gt;&lt;br /&gt;To it printed correctly, I chose 'Flip on Short Edge' two-sided printing. Which is non-standard. Apparently.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;UPDATE&lt;/span&gt;: Julian spotted an error which is now fixed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-6730318721285409360?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/6730318721285409360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=6730318721285409360' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6730318721285409360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6730318721285409360'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/05/making-books-from-pdf.html' title='making books from a pdf'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-6621500773455648897</id><published>2009-05-05T13:46:00.000-07:00</published><updated>2009-05-05T13:56:01.443-07:00</updated><title type='text'>Java floats and doubles</title><content type='html'>I'm attempting to write some high performance Java. There is some &lt;a href="http://www.velocityreviews.com/forums/showpost.php?s=bfb15b8831e2c417082835805cb3f3cc&amp;amp;p=573870&amp;amp;postcount=6"&gt;limited evidence&lt;/a&gt; that you might expect a small performance improvement using floats over doubles.&lt;br /&gt;&lt;br /&gt;There is a &lt;a href="http://discuss.joelonsoftware.com/default.asp?joel.3.647011.33"&gt;good case why memory usage&lt;/a&gt; will be reduced.&lt;br /&gt;&lt;br /&gt;However, why is it such a pain to use floats? I am constantly finding methods, in the Graphics2D classes, which only support one or the other (generally better support for Doubles).&lt;br /&gt;&lt;br /&gt;I think &lt;a href="http://www.davidgrant.ca/java_float_vs_double_and_micro_optimization"&gt;this post&lt;/a&gt; sums up reasons not to use floats, and makes a good point: why have floats at all?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-6621500773455648897?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/6621500773455648897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=6621500773455648897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6621500773455648897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6621500773455648897'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/05/java-floats-and-doubles.html' title='Java floats and doubles'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-6261303445974249865</id><published>2009-04-19T13:49:00.000-07:00</published><updated>2009-04-19T14:01:39.416-07:00</updated><title type='text'>chains vs args</title><content type='html'>I've been using chains for endpoints for a bit. They are quite useful if I want one simple filter criteria.&lt;br /&gt;&lt;br /&gt;Recently, I have a requirement for two or more criteria. This could be, for example: filetype=10 and project=8. I'm imagining that I could construct the required end point with chains, but how could I do this without implementing two controllers: one for ./filetype/10/project/8 and the other for /project/8/filetype/10.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this case, I think it would be nice for the order of criteria to be arbitrary. I'm not sure how to achieve this, so instead I've used: $c-&gt;req-&gt;query_parameters and get the GET hash and then used that to construct my filter criteria.&lt;br /&gt;&lt;br /&gt;I've seen a post, dating from 2006 I think, on this topic. I feel like there should be a pattern, or best policy which should improve on my crude solution. I look forward to it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-6261303445974249865?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/6261303445974249865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=6261303445974249865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6261303445974249865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6261303445974249865'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/04/chains-vs-args.html' title='chains vs args'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-278942526819787977</id><published>2009-02-22T08:11:00.000-08:00</published><updated>2009-02-22T08:15:22.048-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='authorization'/><category scheme='http://www.blogger.com/atom/ns#' term='user'/><category scheme='http://www.blogger.com/atom/ns#' term='gmane'/><category scheme='http://www.blogger.com/atom/ns#' term='authentication'/><title type='text'>Gmane save the day again</title><content type='html'>I had a problem where I wanted to perform authorization without authentication. After alot of scratching of my head, Gmane came to the rescue:&lt;br /&gt;http://article.gmane.org/gmane.comp.web.catalyst.general/17180&lt;br /&gt;&lt;br /&gt;I really like Gmane, there is a handy search plugin for it as well:&lt;br /&gt;http://article.gmane.org/gmane.discuss/8737&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-278942526819787977?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/278942526819787977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=278942526819787977' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/278942526819787977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/278942526819787977'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/02/gmane-save-day-again.html' title='Gmane save the day again'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-46968278773004217</id><published>2009-02-20T05:59:00.000-08:00</published><updated>2009-02-20T06:07:59.304-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dbix'/><category scheme='http://www.blogger.com/atom/ns#' term='add_to_'/><category scheme='http://www.blogger.com/atom/ns#' term='error'/><category scheme='http://www.blogger.com/atom/ns#' term='not'/><title type='text'>many_to_many torture</title><content type='html'>I have just spent the best part of the last week wrestling with many_to_many configuration with DBIx in Catalyst.&lt;br /&gt;&lt;br /&gt;My problem manifested it self as an error when calling $newApp-&gt;add_to_directory($directories);&lt;br /&gt;&lt;br /&gt;DBIx seeming was unable to do the sensible thing and put the primary key from my apps table into the join table.&lt;br /&gt;&lt;br /&gt;I also got errors like:&lt;br /&gt;&lt;span style="font-family: courier new;" class="error"&gt;ManyToMany::__ANON__(): No such column&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, after a week, I have discovered that if I update_or_insert my $newApp (which I made with $c-&gt;model('Proj::App')-&gt;new({}); first, then add_to_$rel works.&lt;br /&gt;&lt;br /&gt;This wasn't obvious to me in the documentation, but hopefully you have stumgled across this post as you search for help with the same problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-46968278773004217?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/46968278773004217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=46968278773004217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/46968278773004217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/46968278773004217'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2009/02/manytomany-torture.html' title='many_to_many torture'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-253833842795579616</id><published>2008-11-05T02:19:00.000-08:00</published><updated>2008-11-05T02:28:04.189-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wrapper'/><category scheme='http://www.blogger.com/atom/ns#' term='event'/><category scheme='http://www.blogger.com/atom/ns#' term='onload'/><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='body'/><category scheme='http://www.blogger.com/atom/ns#' term='view'/><title type='text'>Adding body events to a single catalyst page</title><content type='html'>I wanted to include some javascript on a single page which was identical to the rest of the site, except it had 'onLoad()' and 'onResize()' events in the page body.&lt;br /&gt;&lt;br /&gt;To do this, I created a new ./lib/MyApp/View/NewView.pm, which was identical to ./lib/MyApp/View/HTML.pm except it pointed to a different wrapper: 'site/jsPageWrapper'.&lt;br /&gt;&lt;br /&gt;My 'site/jsPage' was identical to 'site/wrapper' except it called the WRAPPER 'site/jsPageHTML'&lt;br /&gt;&lt;br /&gt;In turn, 'site/jsPageHTML' was identical to 'site/html' but with the relevant event handlers on the body tags.&lt;br /&gt;&lt;br /&gt;In my controller, I needed to forward to my new view: $c-&gt;forward('MyApp::View::NewView').&lt;br /&gt;&lt;br /&gt;and that was that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-253833842795579616?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/253833842795579616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=253833842795579616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/253833842795579616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/253833842795579616'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/11/adding-body-events-to-single-catalyst.html' title='Adding body events to a single catalyst page'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-7538584840444300445</id><published>2008-10-05T05:56:00.000-07:00</published><updated>2008-10-05T05:57:46.694-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst configuration model connect_info model'/><title type='text'></title><content type='html'>Thanks to mst and edenc on irc, I managed to reuse a configuration for connect_info among a number of models. And then I wrote it up for the wiki:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://dev.catalystframework.org/wiki/gettingstarted/howtos/ModelConfigSharing.highlight"&gt;http://dev.catalystframework.org/wiki/gettingstarted/howtos&lt;/a&gt;&lt;br /&gt;&lt;a href="http://dev.catalystframework.org/wiki/gettingstarted/howtos/ModelConfigSharing.highlight"&gt;/ModelConfigSharing.highlight&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-7538584840444300445?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/7538584840444300445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=7538584840444300445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7538584840444300445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7538584840444300445'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/10/thanks-to-mst-and-edenc-on-irc-i.html' title=''/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-7059360836489125209</id><published>2008-10-02T04:50:00.001-07:00</published><updated>2008-10-02T04:53:09.357-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst tt hash perl stash calendar tt2'/><title type='text'>Template toolkit rendering a hash</title><content type='html'>I wanted to render a which I generated within my app; it is a calendar basically:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$calendar{$year}{$month}{$day}&lt;/span&gt; = daynumber; which I add stash as:&lt;br /&gt;$c-&gt;stash-&gt;{calendar} = $calendar;&lt;br /&gt;&lt;br /&gt;the code I used to get this working is as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;[% FOREACH year IN calendar.keys -%]&lt;br /&gt;    [% FOREACH month IN calendar.$year -%]&lt;br /&gt;    [% SET m = month.key %]&lt;br /&gt;        [% FOREACH day IN calendar.$year.$m -%]&lt;br /&gt;        [% SET d = day.key %]&lt;br /&gt;            values =&lt;br /&gt;                [% year %],&lt;br /&gt;                [% month.key %],&lt;br /&gt;                [% day.key %],&lt;br /&gt;            day number = [% calendar.$year.$m.$d %]&lt;br /&gt;                &lt;br /&gt;&lt;br /&gt;        [% END %]&lt;br /&gt;    [% END %]&lt;br /&gt;[% END %]&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-7059360836489125209?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/7059360836489125209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=7059360836489125209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7059360836489125209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7059360836489125209'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/10/template-toolkit-rendering-hash.html' title='Template toolkit rendering a hash'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4373633187826616562</id><published>2008-09-03T08:16:00.000-07:00</published><updated>2008-09-03T08:21:32.268-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='schema'/><category scheme='http://www.blogger.com/atom/ns#' term='namespaces'/><category scheme='http://www.blogger.com/atom/ns#' term='model'/><category scheme='http://www.blogger.com/atom/ns#' term='pg'/><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><title type='text'>another day another incantation</title><content type='html'>I want to use namespaces within my PostgreSQL database (schema in PostgreSQL world). However, they are not currently supported within the Catalyst scripts which will automatically build catalyst::schema automatically.&lt;br /&gt;&lt;br /&gt;So the solution is to call Schema::Loader 'manually' with this incantation:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;perl -MDBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:./lib -e 'make_schema_at("AddressBook::Addresses", { debug =&gt; 1, db_schema =&gt; "addressStuff" }, [ "dbi:Pg:host=localhost;dbname=testdb", "testuser", "123" ])'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;so there you have it: thanks to the irc crew for sorting this out... and they pointed out that cross schema querying will require some jiggery pokery when I get to that...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4373633187826616562?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4373633187826616562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4373633187826616562' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4373633187826616562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4373633187826616562'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/09/another-day-another-incantation.html' title='another day another incantation'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4486764452570597706</id><published>2008-08-22T03:48:00.001-07:00</published><updated>2008-08-22T03:56:48.827-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='authorization'/><category scheme='http://www.blogger.com/atom/ns#' term='group'/><category scheme='http://www.blogger.com/atom/ns#' term='ldap'/><category scheme='http://www.blogger.com/atom/ns#' term='role'/><title type='text'>LDAP, catalyst, roles and groups</title><content type='html'>After a day or so of effort, I've got LDAP authorization working for groups/roles. I'm posting my config files here, since they worked for me and someone else may stumble across them and find them useful:&lt;br /&gt;&lt;br /&gt;my ldif file is as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;dn: o=example.org&lt;br /&gt;objectclass: top&lt;br /&gt;objectclass: organization&lt;br /&gt;o: example.org&lt;br /&gt;&lt;br /&gt;dn: cn=admin,o=example.org&lt;br /&gt;objectClass: simpleSecurityObject&lt;br /&gt;objectclass: organizationalRole&lt;br /&gt;cn: admin&lt;br /&gt;description: LDAP Administrator&lt;br /&gt;userPassword: 123&lt;br /&gt;&lt;br /&gt;dn: ou=groups,o=example.org&lt;br /&gt;objectClass: organizationalUnit&lt;br /&gt;ou: groups&lt;br /&gt;description: generic groups branch&lt;br /&gt;&lt;br /&gt;dn: ou=people,o=example.org&lt;br /&gt;ou: people&lt;br /&gt;description: All people in organisation&lt;br /&gt;objectclass: organizationalunit&lt;br /&gt;&lt;br /&gt;dn: cn=researchers,ou=groups,o=example.org&lt;br /&gt;objectClass: groupofnames&lt;br /&gt;cn: researchers&lt;br /&gt;member: uid=richard,ou=people,o=example.org&lt;br /&gt;&lt;br /&gt;dn: uid=lionel,ou=people,o=example.org&lt;br /&gt;objectClass: top&lt;br /&gt;objectClass: organizationalPerson&lt;br /&gt;objectClass: inetOrgPerson&lt;br /&gt;cn: Lionel Porcheron&lt;br /&gt;sn: Porcheron&lt;br /&gt;userPassword: password&lt;br /&gt;mail: l@a.b&lt;br /&gt;title: Just a person&lt;br /&gt;initials: LP&lt;br /&gt;ou: people&lt;br /&gt;&lt;br /&gt;dn: uid=richard,ou=people,o=example.org&lt;br /&gt;objectClass: top&lt;br /&gt;objectClass: organizationalPerson&lt;br /&gt;objectClass: inetOrgPerson&lt;br /&gt;cn: Richard Richard&lt;br /&gt;sn: Richard&lt;br /&gt;userPassword: password&lt;br /&gt;mail: r@a.b&lt;br /&gt;title: Researcher and person&lt;br /&gt;initials: R&lt;br /&gt;ou: people&lt;br /&gt;ou: researchers&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This LDIF file creates a group: researchers and a couple of people: richard and lionel. Richard is added to the group of researchers.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# Config for Store::LDAP&lt;br /&gt;authentication:&lt;br /&gt;    default_realm: ldap&lt;br /&gt;    realms:&lt;br /&gt;        ldap:&lt;br /&gt;            credential:&lt;br /&gt;                class: Password&lt;br /&gt;                password_field: password&lt;br /&gt;                password_type:  self_check&lt;br /&gt;            store:&lt;br /&gt;                class: LDAP&lt;br /&gt;                ldap_server: localhost&lt;br /&gt;                ldap_server_options:&lt;br /&gt;                    timeout: 10&lt;br /&gt;                binddn: anonymous&lt;br /&gt;                bindpw: dontcare&lt;br /&gt;                start_tls: 0&lt;br /&gt;                start_tls_options:&lt;br /&gt;                    verify: none&lt;br /&gt;                user_basedn: o=example.org&lt;br /&gt;                user_filter: (&amp;(objectClass=organizationalPerson)(uid=%s))&lt;br /&gt;                user_scope: sub&lt;br /&gt;                user_field: uid&lt;br /&gt;                use_roles: 1&lt;br /&gt;                role_basedn: ou=groups,o=example.org&lt;br /&gt;                role_filter: (member=%s)&lt;br /&gt;                role_scope: one&lt;br /&gt;                role_field: cn&lt;br /&gt;                role_value: dn&lt;br /&gt;                role_search_options:&lt;br /&gt;                    deref: always&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is my config file for catalyst.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sub list : Local {&lt;br /&gt;    my ($self, $c) = @_;&lt;br /&gt;    $c-&gt;assert_user_roles( qw/researchers/ ); # only researchers and view a list.&lt;br /&gt;    my $people : Stashed = $c-&gt;model('AddressDB::People');&lt;br /&gt;    $c-&gt;stash-&gt;{template} = 'person/list.tt2';&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and this is a chunk of text from my controller.&lt;br /&gt;&lt;br /&gt;Hope this is helpful - and saves you some time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4486764452570597706?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4486764452570597706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4486764452570597706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4486764452570597706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4486764452570597706'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/08/ldap-catalyst-roles-and-groups.html' title='LDAP, catalyst, roles and groups'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-3029129642565549834</id><published>2008-08-22T03:36:00.001-07:00</published><updated>2008-08-22T03:48:08.368-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ldap'/><title type='text'>ldap thoughts</title><content type='html'>I have spent the last day or so trying to get my head around LDAP/Catalyst role authorization. For this project, authentication, authorization and auditing are important considerations.&lt;br /&gt;&lt;br /&gt;LDAP seems like a suitable choice for the first two, there is someone else who is worrying about provenance and auditing - all I have to do is make sure the hooks are in place.&lt;br /&gt;&lt;br /&gt;My struggle with LDAP and Catalyst was metaphorically like building of the channel tunnel: working from two foreign lands and meeting in the middle. The benefit of this process is that I have a much better understanding of LDAP, and ultimatly, the system works.&lt;br /&gt;&lt;br /&gt;LDAP is powerful and it is not obvious that this is the right tool for this deployment.&lt;br /&gt;&lt;br /&gt;PROS:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It is mature, stable and well documented.&lt;/li&gt;&lt;li&gt;It is scalable and can be integrated into existing infrastructure.&lt;/li&gt;&lt;li&gt;Many tools support it.&lt;/li&gt;&lt;/ul&gt;CONS:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It is complicated to administer.&lt;/li&gt;&lt;/ul&gt;LDAP will allow this project to relate to exsting web applications which have been deployed already. There is a considerable problem with 'account' creep. Each new application requires the same users to create a new account: username/password - and this is a pain. LDAP provides a foundation apon which this can be centralised and ultimatly - single-sign-on can be implemented.&lt;br /&gt;&lt;br /&gt;The mature, stable and widly deployed nature of LDAP means that the administration can be centralised.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-3029129642565549834?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/3029129642565549834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=3029129642565549834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3029129642565549834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3029129642565549834'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/08/ldap-thoughts.html' title='ldap thoughts'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-4481763296282171147</id><published>2008-08-15T07:55:00.000-07:00</published><updated>2008-08-15T08:16:00.709-07:00</updated><title type='text'>centralised configuration</title><content type='html'>I should be obvious, but today's lesson for me is to centralise configuration at all cost.&lt;br /&gt;&lt;br /&gt;And Catalyst should make this easy; and it does.&lt;br /&gt;&lt;br /&gt;Next week I should have some machines in the data centre to start building the system on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-4481763296282171147?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/4481763296282171147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=4481763296282171147' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4481763296282171147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/4481763296282171147'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/08/centralised-configuration.html' title='centralised configuration'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-5220811413009760804</id><published>2008-08-14T07:10:00.000-07:00</published><updated>2008-08-14T07:15:26.788-07:00</updated><title type='text'>LDAP + catalyst.</title><content type='html'>LDAP in Catalyst is as easy as it should be... however, just because I'm using Catalyst, dosen't mean I'm doing it right.&lt;br /&gt;&lt;br /&gt;On average thought, I think Catalyst will keep things modular so that someone will be able to pick up the work once I've left.&lt;br /&gt;&lt;br /&gt;This brings me onto the point of this work: prepare for departure.&lt;br /&gt;&lt;br /&gt;Nothing much else to report.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-5220811413009760804?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/5220811413009760804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=5220811413009760804' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5220811413009760804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/5220811413009760804'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/08/ldap-catalyst.html' title='LDAP + catalyst.'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-2056945555554342823</id><published>2008-08-13T04:05:00.000-07:00</published><updated>2008-08-13T04:21:08.611-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='luma'/><category scheme='http://www.blogger.com/atom/ns#' term='directory_administrator'/><category scheme='http://www.blogger.com/atom/ns#' term='ldap'/><category scheme='http://www.blogger.com/atom/ns#' term='lat'/><category scheme='http://www.blogger.com/atom/ns#' term='jxplorer'/><title type='text'>LDAP, there must be an upside</title><content type='html'>LDAP is a fairly natural choice for a organisation who will be distributed over a number of sites and have users with differing roles.&lt;br /&gt;&lt;br /&gt;So I thought I'd have a play with it to get a feel for how it would work for us.&lt;br /&gt;&lt;br /&gt;That play took a while (two days) but I'm beginning to get a feel for it. While I normally like the command line for alot of sys-admin stuff, I really wanted a graphical browser to surf around entries and make changes.&lt;br /&gt;&lt;br /&gt;It took half a day to track down and configure &lt;a href="http://www.jxplorer.org/"&gt;jxplorer&lt;/a&gt;, but this did what I wanted and my search ended there. Other candidates which I tried out included:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://diradmin.open-it.org"&gt;directory_administrator&lt;/a&gt; old school X11 interface, does not currently work with OpenLDAP 2.2 or newer - which was a problem for me.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.lbtechservices/projects/lat/"&gt;lat&lt;/a&gt; which was a prone to crashing at my hand: I think due to my incompetence.&lt;/li&gt;&lt;li&gt;&lt;a href="http://luma.sourceforge.net/"&gt;luma &lt;/a&gt;which I couldn't get configured - probably for the same reason I had problems with lat.&lt;/li&gt;&lt;/ul&gt;after all this tinkering with LDAP, i'm starting to see the benifits though: using tools which support it. The first of these will likely be an ftp server.&lt;br /&gt;&lt;br /&gt;The upside: One directory of users with roles, all the services use this directory. Centralised and manageable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-2056945555554342823?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/2056945555554342823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=2056945555554342823' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2056945555554342823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2056945555554342823'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/08/ldap-there-must-be-upside.html' title='LDAP, there must be an upside'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-8049466458111990924</id><published>2008-08-07T07:15:00.000-07:00</published><updated>2008-08-07T07:19:57.168-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='dsn dbix'/><category scheme='http://www.blogger.com/atom/ns#' term='password'/><category scheme='http://www.blogger.com/atom/ns#' term='username'/><category scheme='http://www.blogger.com/atom/ns#' term='config'/><title type='text'>enhancement to the code</title><content type='html'>Well, I wondered if this should be part of the catalyst book errerta, but in the end I decided that the code in the book worked, so it wasn't in error.&lt;br /&gt;&lt;br /&gt;I have been working through the book using Pg instead of SQLite. The big difference with Pg is that a user/pass are needed. I've navigated a few hurdles on the way, and this afternoon I found another one.&lt;br /&gt;&lt;br /&gt;When including a script within your catalyst app, it is The Book has an excellent example which properly integrates your script with the existing config files.&lt;br /&gt;&lt;br /&gt;If you construct a DSN in the following way, you can also use the user/pass conbination from your config file!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;my @dsn = @{$config-&gt;{'Model::AddressDB'}-&gt;{connect_info}};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;my $HOME = dir($Bin, '..');&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$dsn[0] =~ s/__HOME__/$HOME/;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;my $schema = AddressBook::Schema::AddressDB-&gt;connect(@dsn)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    or die "Failed to connect to database at $dsn[0]";&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-8049466458111990924?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/8049466458111990924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=8049466458111990924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/8049466458111990924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/8049466458111990924'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/08/enhancement-to-code.html' title='enhancement to the code'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-6623180530011724970</id><published>2008-08-07T03:32:00.000-07:00</published><updated>2008-08-07T03:36:54.369-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='broken'/><category scheme='http://www.blogger.com/atom/ns#' term='config'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>config files</title><content type='html'>I'm using a config file as I work through the tutorial. This is an obvious thing to do and I completely agree with it. However, when I introduce this structure, I don't really want it to 'over-ride' existing values - I want to delete all the values which are now to be stored only in the config file.&lt;br /&gt;&lt;br /&gt;I had to play around a bit. My model previously contained database connection information. When I introduce the config file, the values were taken from the file. However, when I deleted all of the relevant section from the Model, it broke the app. I needed to leave in a minimal stub:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;__PACKAGE__-&gt;config(&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    schema_class =&gt; 'AddressBook::Schema::AddressDB');&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-6623180530011724970?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/6623180530011724970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=6623180530011724970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6623180530011724970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/6623180530011724970'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/08/config-files.html' title='config files'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-3999455173604148459</id><published>2008-08-01T08:19:00.000-07:00</published><updated>2008-08-07T03:37:57.172-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='find_or_new update_or_insert undef null'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>day two, hurdle navigated</title><content type='html'>Well this is my second day working through the JROCK Catalyst book.&lt;br /&gt;&lt;br /&gt;It has been a little frustrating - but this has reinforced some of the paradigms behind MVC and Catalyst so it can be thought of as useful.&lt;br /&gt;&lt;br /&gt;Todays TIP: &lt;span style="font-family:courier new;"&gt;find_or_new&lt;/span&gt; does not return and empty model if it fails. The new it returns has the primary key which it failed to find. This could be '&lt;span style="font-family:courier new;"&gt;undef&lt;/span&gt;' or '&lt;span style="font-family:courier new;"&gt;null&lt;/span&gt;', and this object is not suitable for a subsequent: &lt;span style="font-family:courier new;"&gt;update_or_insert&lt;/span&gt;. Instead, do a find, if that fails, create a new object.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-3999455173604148459?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/3999455173604148459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=3999455173604148459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3999455173604148459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/3999455173604148459'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/08/day-two-hurdle-navigated.html' title='day two, hurdle navigated'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-7512995021226928211</id><published>2008-07-31T08:28:00.001-07:00</published><updated>2008-08-07T03:38:17.782-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='catalyst'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Catalyst, day one</title><content type='html'>I've previously played with Ruby on Rails. My experience was ok with that. However, I considered 'no composite keys' a limitation.&lt;br /&gt;&lt;br /&gt;So I've been watching the mailing lists of both CakePHP and Catalyst. I couldn't convince myself that CakePHP would allow for composite keys. In order to evaluate Catalyst, I have bought the book by Jonathan Rockaway and am working thought that.&lt;br /&gt;&lt;br /&gt;This is the end of the first day at that and I thought note a couple my initial impressions.&lt;br /&gt;&lt;br /&gt;On the book: It is worth visiting the &lt;a href="http://dev.catalyst.perl.org/wiki/thebookerrata"&gt;errata&lt;/a&gt;. I went thought this and pencilled it into the book before I started reading.&lt;br /&gt;&lt;br /&gt;On Catalyst: It seems a little complicated for my tastes. I'm expect that 'complicated' will become 'powerful' as I gain experience in it. We will see.&lt;br /&gt;&lt;br /&gt;TIP for today: when creating a model in catalyst, and using a database with a user and password, you'll need to use something like:&lt;span style="font-family:courier new;"&gt; ...create=static dbi:Pg:dbname=testdatabase testuser testpassword &lt;/span&gt; if you want to include a username and password.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-7512995021226928211?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/7512995021226928211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=7512995021226928211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7512995021226928211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/7512995021226928211'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/07/catalyst-day-one.html' title='Catalyst, day one'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-436865040544233219</id><published>2008-07-31T08:23:00.001-07:00</published><updated>2008-07-31T08:27:48.489-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='introduction'/><title type='text'>brief introduction</title><content type='html'>The purpose of this blog is to record my experiences while setting up a data centre for some folks.&lt;br /&gt;&lt;br /&gt;This is mainly focusing on technology and tools which are used in the work.&lt;br /&gt;&lt;br /&gt;Expect frameworks (catalyst), database, linux, perl, security. &lt;br /&gt;&lt;br /&gt;if I manage a post every day I spend working on the technology behind the datacentre I'll be pleased.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-436865040544233219?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/436865040544233219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=436865040544233219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/436865040544233219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/436865040544233219'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/07/brief-introduction.html' title='brief introduction'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942732566542469230.post-2971401688919272296</id><published>2008-07-31T08:16:00.000-07:00</published><updated>2008-07-31T08:19:45.273-07:00</updated><title type='text'>first post!</title><content type='html'>Get the difficult first post out the way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8942732566542469230-2971401688919272296?l=crisppacketdatacentre.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crisppacketdatacentre.blogspot.com/feeds/2971401688919272296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8942732566542469230&amp;postID=2971401688919272296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2971401688919272296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942732566542469230/posts/default/2971401688919272296'/><link rel='alternate' type='text/html' href='http://crisppacketdatacentre.blogspot.com/2008/07/first-post.html' title='first post!'/><author><name>Richard</name><uri>http://www.blogger.com/profile/15081257661824167523</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
