<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shizzle &#187; Mixed</title>
	<atom:link href="http://lenni.info/blog/category/mixed/feed/" rel="self" type="application/rss+xml" />
	<link>http://lenni.info/blog</link>
	<description>My little notebook</description>
	<lastBuildDate>Sun, 29 Jan 2012 20:47:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>My first iPhone app</title>
		<link>http://lenni.info/blog/2012/01/my-first-iphone-app/</link>
		<comments>http://lenni.info/blog/2012/01/my-first-iphone-app/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 16:15:48 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=604</guid>
		<description><![CDATA[In the recent months or so I have written my first iPhone app and Apple has approved it last night! It works only in Germany and will find the nearest cash point for Cash Group, which is an association of Deutsche Bank, Commerzbank, Postbank and a few others. As someone not living in Germany you [...]]]></description>
			<content:encoded><![CDATA[<p>In the recent months or so I have written my first iPhone app and Apple has approved it last night!</p>
<p>It works only in Germany and will find the nearest cash point for Cash Group, which is an association of Deutsche Bank, Commerzbank, Postbank and a few others. As someone not living in Germany you may ask Why? Well, if you use a cash point from another bank you will have to pay fees for withdrawing cash, sometimes as high as €6.</p>
<p>So, without further ado:</p>
<div class="wp-caption aligncenter" style="width: 330px"><img title="Screenshot" src="https://lh6.googleusercontent.com/-vagzuzd5WSE/TxhB36YqI6I/AAAAAAAAAFM/8grWWMWqvJE/w333-h500-k/cashgroupfinder.jpg" alt="" width="320" height="480" /><p class="wp-caption-text">Screenshot</p></div>
<h3>App Store links</h3>
<ul>
<li><a href="http://itunes.apple.com/us/app/cash-group-finder/id492498061?mt=8">English</a></li>
<li><a href="http://itunes.apple.com/de/app/cash-group-finder/id492498061?mt=8">German</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2012/01/my-first-iphone-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yeah! I&#8217;m a Vim contributor!</title>
		<link>http://lenni.info/blog/2012/01/yeah-im-a-vim-contributer/</link>
		<comments>http://lenni.info/blog/2012/01/yeah-im-a-vim-contributer/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 20:31:11 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=599</guid>
		<description><![CDATA[Well, it&#8217;s not really that much but I&#8217;m proud nonetheless. I modified the ssh and sshd config syntax files and Bram has applied the patch to the vim source tree on Google Code. Have a look!]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s not really that much but I&#8217;m proud nonetheless. I modified the ssh and sshd config syntax files and Bram has applied the patch to the vim source tree on Google Code. <a href="http://code.google.com/p/vim/source/browse/runtime/syntax/sshconfig.vim">Have a look</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2012/01/yeah-im-a-vim-contributer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Ruby 1.9.2 on Ubuntu 11.10 without using RVM</title>
		<link>http://lenni.info/blog/2011/12/installing-ruby-1-9-2-on-ubuntu-11-10-without-using-rvm/</link>
		<comments>http://lenni.info/blog/2011/12/installing-ruby-1-9-2-on-ubuntu-11-10-without-using-rvm/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 16:36:51 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=582</guid>
		<description><![CDATA[It seems installing Ruby 1.9 on Ubuntu without the use of RVM isn’t all that trivial. I had to poke around the system for quite a while before I got it running. Why not RVM? Well, I tried RVM but compiling Ruby took 3 hours on my EC2 micro instance and was eating all my [...]]]></description>
			<content:encoded><![CDATA[<p>It seems installing Ruby 1.9 on Ubuntu without the use of RVM isn’t all that trivial. I had to poke around the system for quite a while before I got it running.</p>
<h3>Why not RVM?</h3>
<p>Well, I tried RVM but compiling Ruby <strong>took 3 hours</strong> on my EC2 micro instance and was eating all my CPU so that my webserver was basically not available anymore. To me that isn&#8217;t acceptable. Besides, I think it is highly wasteful to compile packages from source when there are precompiled versions available. I admit that apt is too slow to keep up with the rapidly moving gems ecosystem but for the Ruby interpreter itself I strongly prefer the OS to handle the installation.</p>
<p>Besides I don&#8217;t really want to use different versions of Ruby at the same time. I just want something that isn&#8217;t Ubuntu&#8217;s default 1.8.7, which in Ruby years is ancient.</p>
<h3>The steps</h3>
<p>The good news is that as of writing this, Ruby 1.9.2 is available without any PPAs straight from the official Canonical package repos. The bad news is that information about how to get it is thin on the ground.</p>
<p>For starters the package for Ruby 1.9.2 is called ruby1.9.1 and Googling around, it wasn&#8217;t immediately obvious that any version of Ruby 1.9 is even possible on Ubuntu.</p>
<p>Anyway, here it goes:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ruby1.9.1 ruby1.9.1-dev \
  rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 \
  build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> update-alternatives <span style="color: #660033;">--install</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby ruby <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby1.9.1 <span style="color: #000000;">400</span> \
         <span style="color: #660033;">--slave</span>   <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>man<span style="color: #000000; font-weight: bold;">/</span>man1<span style="color: #000000; font-weight: bold;">/</span>ruby.1.gz ruby.1.gz \
                        <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>man<span style="color: #000000; font-weight: bold;">/</span>man1<span style="color: #000000; font-weight: bold;">/</span>ruby1.9.1.1.gz \
        <span style="color: #660033;">--slave</span>   <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ri ri <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ri1.9.1 \
        <span style="color: #660033;">--slave</span>   <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>irb irb <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>irb1.9.1 \
        <span style="color: #660033;">--slave</span>   <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>rdoc rdoc <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>rdoc1.9.1
&nbsp;
<span style="color: #666666; font-style: italic;"># choose your interpreter</span>
<span style="color: #666666; font-style: italic;"># changes symlinks for /usr/bin/ruby , /usr/bin/gem</span>
<span style="color: #666666; font-style: italic;"># /usr/bin/irb, /usr/bin/ri and man (1) ruby</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> update-alternatives <span style="color: #660033;">--config</span> ruby
<span style="color: #c20cb9; font-weight: bold;">sudo</span> update-alternatives <span style="color: #660033;">--config</span> gem
&nbsp;
<span style="color: #666666; font-style: italic;"># now try</span>
ruby <span style="color: #660033;">--version</span></pre></div></div>

<p>This installs Ruby 1.9.2 and sets that to be the default ruby on your system. Crucially, it also installs rubygems for that interpreter and sets that to be the default. (Thanks for the initial snippet to <a href="http://michalf.me/blog:make-ruby-1-9-default-on-ubuntu-9-10-karmic-koala">Michał Frąckowiak</a>. His version got me most of the way there.)</p>
<h3>Uninstalling Ruby 1.8</h3>
<p>If you, like me, ran a Rails app on 1.8 you probably have a bit of stuff hanging around the file system. Lets clean that up.</p>
<p>First uninstall all gems from the 1.8 installation with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem1.8 list <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span><span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #660033;">-f1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> gem1.8 uninstall <span style="color: #660033;">-aIx</span></pre></div></div>

<p>Secondly, remove the ruby packages with apt.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> remove libruby1.8 ruby1.8 ruby1.8-dev rubygems1.8</pre></div></div>

<p>After you have done that you may want to check if there is anything else hanging around with a quick:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">--get-selections</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> ruby</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2011/12/installing-ruby-1-9-2-on-ubuntu-11-10-without-using-rvm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find out if you are running Apache mpm-prefork or mpm-worker</title>
		<link>http://lenni.info/blog/2011/12/how-to-find-out-if-you-are-running-apache-mpm-prefork-or-mpm-worker/</link>
		<comments>http://lenni.info/blog/2011/12/how-to-find-out-if-you-are-running-apache-mpm-prefork-or-mpm-worker/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 09:17:24 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=574</guid>
		<description><![CDATA[I struggled with this today whilst trying to figure out Apache&#8217;s config options. On Ubuntu you can do the following: $ dpkg --get-selections &#124;grep apache apache2 install apache2-mpm-prefork install apache2-prefork-dev install apache2-utils install apache2.2-bin install apache2.2-common install libapache2-mod-php5 install libapache2-mod-wsgi install This tells me that I have mpm-prefork.]]></description>
			<content:encoded><![CDATA[<p>I struggled with this today whilst trying to figure out Apache&#8217;s config options.</p>
<p>On Ubuntu you can do the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">--get-selections</span> <span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> apache
apache2						<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2-mpm-prefork				<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2-prefork-dev				<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2-utils					<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2.2-bin					<span style="color: #c20cb9; font-weight: bold;">install</span>
apache2.2-common				<span style="color: #c20cb9; font-weight: bold;">install</span>
libapache2-mod-php5				<span style="color: #c20cb9; font-weight: bold;">install</span>
libapache2-mod-wsgi				<span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>This tells me that I have mpm-prefork.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2011/12/how-to-find-out-if-you-are-running-apache-mpm-prefork-or-mpm-worker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Editing LESS and CSS3 with Vim</title>
		<link>http://lenni.info/blog/2011/10/editing-less-and-css3-with-vim/</link>
		<comments>http://lenni.info/blog/2011/10/editing-less-and-css3-with-vim/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 21:27:32 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[less]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=555</guid>
		<description><![CDATA[A thought or two about CSS precompilers I had heared of Sass repeatedly for a while now but so far I had always mentally filed CSS precompilers under &#8220;Interesting concept, but probably not all that useful for me&#8221;. I thought that CSS is fine as it is and after all it&#8217;s just a bunch of [...]]]></description>
			<content:encoded><![CDATA[<h3>A thought or two about CSS precompilers</h3>
<p>I had heared of Sass repeatedly for a while now but so far I had always mentally filed CSS precompilers under &#8220;Interesting concept, but probably not all that useful for me&#8221;. I thought that CSS is fine as it is and after all it&#8217;s just a bunch of style definitions, right?</p>
<p>On the other hand I grew to actively dislike handling CSS files. I didn&#8217;t quite understand at the time that this had mostly to do with their great redundancy and repetition.  When you&#8217;ve been used to something&#8217;s mediocrity for so long you don&#8217;t really noticed those weaknesses anymore.</p>
<p>When a coworker suggested using a CSS precompiler to help our <a href="http://stackoverflow.com/questions/2253110/how-to-manage-css-explosion">CSS explosion</a>, I was pretty sceptical. But I like learning new things so we went ahead and introduced <a href="http://lesscss.org/">LESS</a> in our current project.</p>
<p>What a difference! I may end up sounding like a used-car salesman but it really is a difference like day and night. I&#8217;d love to tell you lots of reasons why these precompilers are great, but unfortunately Jason Z. from 37 signals has done a <a href="http://37signals.com/svn/posts/3003-css-taking-control-of-the-cascade">much better job</a>.</p>
<h3>Wasn&#8217;t this post suppossed to be about Vim?</h3>
<p>Lets talk business then. I&#8217;m using Vim to edit LESS and it looks like this:</p>
<div class="wp-caption aligncenter" style="width: 460px"><img class="   " src="https://github.com/lenniboy/vim-less/raw/master/screenshot.png" alt="Vim with vim-less, vim-css3-syntax, vim-css-colors" width="450" height="349" /><p class="wp-caption-text">Vim with vim-less, vim-css3-syntax, vim-css-colors</p></div>
<p>I can recommend a trio of plugins for LESS and general CSS3 editing:</p>
<h4><a href="https://github.com/groenewege/vim-less">vim-less</a></h4>
<p>This plugin&#8217;s syntax highlighting was fairly feature-rich to begin with but I have added a few extra features including indenting and autocompletion and the original author has merged them back to his branch. The plugin&#8217;s compatibility has led me to check out vim-css-colors.</p>
<h4><a href="https://github.com/skammer/vim-css-color">vim-css-colors</a></h4>
<p>This great plugin visualises a color expressed in hex, RGBa or HSLa and paints the background underneath it in the corresponding color. If you&#8217;re not sure what I mean, here&#8217;s screenshot:</p>
<p><img class="aligncenter" src="https://github.com/skammer/vim-css-color/raw/master/Screen%20shot%202010-07-04%20at%200.19.46.png" alt="" width="455" height="292" /></p>
<p>This may look like a toy to some, but LESS lets you have a file with just the colour palette of your app/website and seeing them all visualised is very nice. It also helps you to reuse the same variable name for each colour rather than re-introducing new ones.</p>
<h4><a href="https://github.com/hail2u/vim-css3-syntax">vim-css3-syntax</a></h4>
<p>This has a very complete syntax file for CSS3 and I have  added support for this plugin in vim-less. That works pretty well and those fancy new CSS3 properties are then also displayed with correct syntax highlighting applied.</p>
<h3>Improvements for the future</h3>
<p>The current autocomplete (hit Ctr-X, Ctrl-O if you&#8217;ve never used it) that ships with standard Vim is pretty complete for CSS2. However there is no autocomplete script for CSS3. Looking at the <a href="http://code.google.com/p/vim/source/browse/runtime/autoload/csscomplete.vim">CSS2 version</a>, it shouldn&#8217;t actually be too hard to parse the syntax highlight files and add the new properties to the existing script.</p>
<p>I&#8217;d also like to implement a syntax checker but looking the the source of lessc, LESS&#8217; command line compiler, there doesn&#8217;t seem to be a validating phase that I could use.</p>
<p>I also saw that some web-based CSS prettifyiers can order CSS properties alphabetically. Wouldn&#8217;t that be a neat feature for Vim?</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2011/10/editing-less-and-css3-with-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharing a single gitconfig between your work and home computers and taking care of user.email</title>
		<link>http://lenni.info/blog/2011/06/sharing-a-single-gitconfig-between-your-work-and-home-computers-and-taking-care-of-user-email/</link>
		<comments>http://lenni.info/blog/2011/06/sharing-a-single-gitconfig-between-your-work-and-home-computers-and-taking-care-of-user-email/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 14:03:12 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[sharing]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=510</guid>
		<description><![CDATA[I just started a new job where git is being used and since I had accumulated some stuff in mit .gitconfig, I wanted it to be on my work computer too. I use a git repository for all my dotfiles, which I then clone on the machine and symlink files like .gitconfig or .vimrc to [...]]]></description>
			<content:encoded><![CDATA[<p>I just started a new job where git is being used and since I had accumulated some stuff in mit <code>.gitconfig</code>, I wanted it to be on my work computer too. I use a git repository for all my dotfiles, which I then clone on the machine and symlink files like <code>.gitconfig</code> or <code>.vimrc</code> to the home directory. This means if I add something to those files at work and want to use the configuration at home too I just need to commit, push and pull the changes at home.</p>
<p>Well, this works pretty good until you realise that there are <em>some</em> config entries you want to be different in the two environments. Git&#8217;s <code>user.email</code> is obviously such a case.</p>
<h3>The solution</h3>
<p>Git does not allow you to to include other configuration files in your <code>.gitconfig</code> but you can use the environment variable <code>$EMAIL</code> in order to overwrite <code>user.email</code>.</p>
<p>What I have done is to add the following to my <code>.bashrc</code> (which is also in the dotfiles repo):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> .host-specific.sh <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">source</span> .host-specific.sh
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

<p>This loads a host-specific bash file (if it exists). In this file you&#8217;ll stick your email address like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EMAIL</span>=lenni<span style="color: #000000; font-weight: bold;">@</span>work.com</pre></div></div>

<p>(Obviously this file needs to be recreated on each host and can&#8217;t be shared across computers through the dotfile repository.)</p>
<p>Now you can safely share your <code>.gitconfig</code> between the two computers without having to worry about the email settings.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2011/06/sharing-a-single-gitconfig-between-your-work-and-home-computers-and-taking-care-of-user-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cobertura sample XML output</title>
		<link>http://lenni.info/blog/2011/06/cobertura-sample-xml-output/</link>
		<comments>http://lenni.info/blog/2011/06/cobertura-sample-xml-output/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 12:37:34 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[cobertura]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=504</guid>
		<description><![CDATA[Today I was desperately looking for some sample XML that Cobertura generates, as I was writing a converter from jscoverage&#8217;s JSON to Cobertura&#8217;s XML. Turns out it is harder than it sounds but in the end I found an example in the Cobertura Jenkins Plugin. So, this is just a mental note for myself in [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was desperately looking for some sample XML that Cobertura generates, as I was writing a <a href="https://github.com/NumberFour/jscoverage-cobertura-maven-plugin">converter from jscoverage&#8217;s JSON to Cobertura&#8217;s XML</a>.</p>
<p>Turns out it is harder than it sounds but in the end I found an <a title="Cobertura Sample XML output" href="https://raw.github.com/jenkinsci/cobertura-plugin/master/src/test/resources/hudson/plugins/cobertura/coverage-with-data.xml">example in the Cobertura Jenkins Plugin</a>.</p>
<p>So, this is just a mental note for myself in case I need it again. If you&#8217;re Googling for it like myself, hopefully you&#8217;ll stumble over this and say hi in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2011/06/cobertura-sample-xml-output/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My marathon experience</title>
		<link>http://lenni.info/blog/2011/06/my-marathon-experience/</link>
		<comments>http://lenni.info/blog/2011/06/my-marathon-experience/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 08:06:32 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[marathon]]></category>
		<category><![CDATA[running]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=475</guid>
		<description><![CDATA[About four weeks ago I ran my very first marathon. It was a great experience but what struck me is that the day itself is not really the hardest part of the entire preparation. As they say, the hardest part ins&#8217;t getting over the finish line but rather getting to the start. I can only [...]]]></description>
			<content:encoded><![CDATA[<p>About four weeks ago I ran my very first marathon. It was a great experience but what struck me is that the day itself is not really the hardest part of the entire preparation. As they say, the hardest part ins&#8217;t getting over the finish line but rather getting to the start. I can only confirm this.</p>
<h3>Preparation</h3>
<p>It was around Christmas &#8217;10 that I thought what my goals were for the coming year. I had run the Berlin and Potsdam half marathon in 2010 and figured I could push myself harder this year. I didn&#8217;t fancy the Berlin Marathon as it is in August, which would mean training all summer when I could be lying in the sun doing nothing. Besides, I dislike the heat and much prefer colder days for running. So I signed up for the Prague Marathon in early May 2011. I knew that I wasn&#8217;t remotely in marathon shape but signing up early forced me to be serious about it all. I can only recommend this tactic.</p>
<p>I had been using an app on my phone called <a title="Runkeeper" href="http://runkeeper.com/" target="_blank">Runkeeper</a> which GPS tracks you as you run and gives you instant feedback about distance run and average speed. They had a feature called training sessions gives you a fairly detailed plan about what distances and intensity you should be running. I signed up for the one aiming for a marathon in 4h30. The plan had a gradual increase in distance but was nevertheless pretty intense: 16 weeks training with four training sessions a week. This sounds like a big burden but I must say as the training progressed and my alcohol consumption, smoking and going out decreased I noticed not only increased fitness but my mood changed substantially, too. I become happy as I had never been in my live. It was hard to not constantly talk about how good I was feeling at the moment and how happy the training made me.</p>
<p>I had one annoying injury from one of the long runs on Sunday where I my left thigh started to ache for the rest of the week and would only heal by the following Sunday. I even had to pause the training for one week and that made me feel quite anxious about my progress. In the end the worry turned out to be baseless &#8211; every training has its setbacks and I haven&#8217;t talked to anyone who said that there wasn&#8217;t ever a problem during their preparation.</p>
<p>The peak of the training was two weeks before the actual event where I ran 28km. This doesn&#8217;t seem like a lot if your&#8217;re planning to run 42km but I had been doing 12km the day before and the stated strategy of the training plan was to &#8220;spread the load&#8221; over multiple days in order minimise the risk of injury. After this weekend the training decreased sharply and I only did about 10km max and finishing off with a gentle 15 minute stroll the day before the marathon.</p>
<h3>The day itself</h3>
<p>To say it upfront: the marathon was great and a thoroughly enjoyable experience. I had been running the training runs at a speed of 5:15 to 5:30 mins/km. At the marathon I reduced the time per kilometre to 6 minutes because I had no idea how my body would react to distances greater than 30 km and therefore I decided to take it easy.</p>
<p>I had slept poorly the night before and was nervous at the starting line but finally around about 9 o&#8217;clock the crowd went on their way. I decided not to use Runkeeper during the run because I knew that the GPS connection would drain the batteries and listening to music was more important to me anyway. This was a great decision. During the first 10km I managed to stick to my planned time almost to the second. At 10km I still felt great and fresh and at 11 I briefly saw my parents, who had come to Prague, and stopped for a quick photo.</p>
<p>From 10 to 20km it was still plain sailing and at the half-marathon mark I was ahead of schedule by about 1:30min. From 20 to 30km I was expecting some tiredness but I was surprised how well I was still feeling at 30km. I had been taking an energy gel every 5km (starting at 15km) and even my energy balance ,which I was very worried about before the race ,was okay: I wasn&#8217;t feeling the depleted or hungry and with a good mood I entered the last stage of the race.</p>
<h3>The last 7km</h3>
<p>At 32km I was ahead of schedule by about 3:30 mins. But by about 33km I started to feel some discomfort in my legs and thighs. Nothing major at that point but simply the stress of the race taking its toll. This kinda got worse by the time I reached 35km and from then on it could no longer ignore the pain. It hurt!</p>
<p>Well, you can imagine what happened now. I switched into survival mode an put all my will power into not stopping. I saw lots of people taking a short break at the side stretching their muscles but knew from experience that this would be a bad idea. Starting again after those breaks is very hard if not to say impossible. So I struggled on.</p>
<p>At kilometer 37 a lot of people were walking but I still hadn&#8217;t stopped my running (save for the drinking stops) but there was a small elevation, almost nothing, which I just couldn&#8217;t run up anymore so I walked it up. This really bruised my ego and made me loose some time but at that point I just didn&#8217;t care anymore. The same thing happened at kilometre 39 but in total I only lost about 3 minutes during the two short walking periods.</p>
<p>And then the final kilometre came. This was a great time as I was so relieved to have made it there. The spectators cheered and all the runners where scraping together the last bit of energy that was still in them. I crossed the finish line at 4 hours 13 minutes 55 seconds. That was 2 minutes slower than I had planned the day before but of course much better than the 4:30h that the training plan had aimed for.</p>
<h3>In reflection</h3>
<p>Looking back at the entire time I must say that the following things made my marathon as success.</p>
<ul>
<li>Using an Android app that tracked my progress was a huge motivation boost. I really like Runkeeper but there are plenty about.</li>
<li>Practicing using the energy gels during the long training runs before the race. My biggest worry was that I would run out of energy and feel depleted. This is often called <a href="http://www.marathonandbeyond.com/choices/latta.htm" target="_blank">The Wall</a>.</li>
<li>The weather: it was 17 degree on the day and there was always a slight breeze coming from the water</li>
</ul>
<p>If you have an ambitious personality and like to push yourself, I can only recommend that you run the marathon yourself. You&#8217;ll be proud forever and you will notice an unprecedented increase in your happiness and well being.</p>
<p>Do it!</p>
]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2011/06/my-marathon-experience/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Configuring the Maven Site Plugin to accept scp-URLs for site:deploy</title>
		<link>http://lenni.info/blog/2011/04/configuring-the-maven-site-plugin-to-accept-scp-urls-for-sitedeploy/</link>
		<comments>http://lenni.info/blog/2011/04/configuring-the-maven-site-plugin-to-accept-scp-urls-for-sitedeploy/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 10:03:09 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[site]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=461</guid>
		<description><![CDATA[I ran into a slightly puzzling problem while upgrading from Maven2 to Maven3 this week. In hindsight the solution wasn&#8217;t all that complicated but it threw me a little because Maven is usually quite good at pulling all its required dependencies. Basically, I was having trouble uploading files generated by Maven&#8217;s site plugin to a [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into a slightly puzzling problem while upgrading from Maven2 to Maven3 this week. In hindsight the solution wasn&#8217;t all that complicated but it threw me a little because Maven is usually quite good at pulling all its required dependencies.</p>
<p>Basically, I was having trouble uploading files generated by Maven&#8217;s site plugin to a host. The URL was specified as follows</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;site<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>scp://server:/some/long/path<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/site<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>In Maven2 this worked out of the box without extra configuration.</p>
<p>In Maven3 this threw the following error during <code>site-deploy</code>:</p>
<p><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:2.2:deploy (default-cli) on project $PROJECT_NAME: Unsupported protocol: 'scp': Cannot find wagon which supports the requested protocol: scp: java.util.NoSuchElementException</code></p>
<p>The trouble was that the Site Plugin apparently doesn&#8217;t automatically pull the Apache Wagon SSH implementation. You have to tell it manually to do that like this:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  ...
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-site-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.wagon<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>wagon-ssh<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.0-beta-7<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  ...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2011/04/configuring-the-maven-site-plugin-to-accept-scp-urls-for-sitedeploy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting started with a free Amazon EC2 instance and logging in through SSH using only the web interface</title>
		<link>http://lenni.info/blog/2011/03/getting-started-with-a-free-amazon-ec2-instance-logging-in-with-ssh/</link>
		<comments>http://lenni.info/blog/2011/03/getting-started-with-a-free-amazon-ec2-instance-logging-in-with-ssh/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 22:36:35 +0000</pubDate>
		<dc:creator>Leonard</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://lenni.info/blog/?p=442</guid>
		<description><![CDATA[Recently I&#8217;ve experienced strange Apache crashes on my VPS and the support ticket I opened wasn&#8217;t being answered, so I decided to check out Amazon&#8217;s offerings in this field. I turns out it is really simple to spin up a free (for a year) micro instance. I chose Ubuntu as the operating system and a [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve experienced strange Apache crashes on my VPS and the support ticket I opened wasn&#8217;t being answered, so I decided to check out Amazon&#8217;s offerings in this field. I turns out it is really simple to spin up a free (for a year) micro instance.</p>
<p>I chose Ubuntu as the operating system and a lot of tutorials tell you to configure and use the command line tool for starting an instance but I found it a lot easier to just go through the web interface. I will walk you through how to do that.</p>
<h3>Sign up</h3>
<p>Well, duh, you&#8217;ll need to set up an account at <a href="http://aws.amazon.com/ec2/">http://aws.amazon.com/ec2/</a></p>
<h3>Selecting an AMI</h3>
<p>Once you have the account go to the AWS management console and select the region you want your instance to be hosted. You&#8217;ll be redirected to the Console Dashboard where you&#8217;ll find a big fat &#8220;Launch Instance&#8221; button. That&#8217;s exactly what you want to do, so proceed to choosing an AMI.</p>
<p>An AMI is an Amazon Machine Image, basically a template for the various Linux distros. Collin Percival has also recently added AMIs for BSD, so if that floats your boat, go knock yourself out. Search for the most current (or LTS) version of Ubuntu you&#8217;re interested in and check that there is a yellow star next to it. There will be quite a few ones for your chosen release so just select one starting with the official Ubuntu user id of &#8217;099720109477&#8242;. I&#8217;m not sure why there are so many copies of the same release but I guess they continually repackage the image with all the updates applied, so you don&#8217;t have to do that.</p>
<p>After the image select &#8216;micro&#8217; as the size of the instance (one micro is a free for for one year for new customers) and accept the standard settings for everything until you get to the key pair section. There you should create a new named pair and download the pem file to, say, foo.pem. Remember that name for later.</p>
<h3>Allowing network access</h3>
<p>This one is a bit tricky and took me longest to understand even though it is right under your nose: by default your instance won&#8217;t be reachable from outside Amazon&#8217;s data centre. You&#8217;ll have to enable the services you want to allow.</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/lenniboy/5530587204/in/photostream/"><img class="aligncenter" title="Firewall configuration" src="http://farm6.static.flickr.com/5139/5530587204_350ed64500.jpg" alt="" width="500" height="347" /></a></p>
<p style="text-align: left;">So, create a new security group and give it a name you&#8217;ll remember. Then select the services you want to allow; most likely you want at least ssh, http and https but maybe you&#8217;re running a mailserver as well.</p>
<h3>Connecting to the instance with SSH</h3>
<p style="text-align: left;">Back in the Management Console you&#8217;ll see your newly created instance. Right-click on it and select connect from the context menu. This will give you the instructions on how to actually log into the instance. Basically you&#8217;ll need the key file and start SSH with something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-i</span> foo.pem root<span style="color: #000000; font-weight: bold;">@</span>ec2-<span style="color: #000000;">11</span>-<span style="color: #000000;">111</span>-<span style="color: #000000;">1</span>-<span style="color: #000000;">1</span>.eu-west-<span style="color: #000000;">1</span>.compute.amazonaws.com</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://lenni.info/blog/2011/03/getting-started-with-a-free-amazon-ec2-instance-logging-in-with-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

