<?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>Arie's Blog &#187; Software</title>
	<atom:link href="http://ariekanarie.nl/category/software/feed" rel="self" type="application/rss+xml" />
	<link>http://ariekanarie.nl</link>
	<description></description>
	<lastBuildDate>Mon, 14 Jun 2010 09:48:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Disabling mouse acceleration on OS/X</title>
		<link>http://ariekanarie.nl/archives/224/disabling-mouse-acceleration-on-osx</link>
		<comments>http://ariekanarie.nl/archives/224/disabling-mouse-acceleration-on-osx#comments</comments>
		<pubDate>Mon, 14 Jun 2010 09:48:05 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[acceleration]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[macintosh]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[steam]]></category>
		<category><![CDATA[team fortress 2]]></category>
		<category><![CDATA[tf2]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=224</guid>
		<description><![CDATA[With the recent release of Portal and Team Fortress 2 for the Mac I&#8217;m guessing there are quite a few gamers that have noticed the horrible acceleration that&#8217;s default on OS/X. I&#8217;ve finally managed to find a little tool that can give you 1:1 mouse/pointer movement, just like you can on Windows (with the help [...]]]></description>
			<content:encoded><![CDATA[<p>With the recent release of Portal and Team Fortress 2 for the Mac I&#8217;m guessing there are quite a few gamers that have noticed the horrible acceleration that&#8217;s default on OS/X.</p>
<p>I&#8217;ve finally managed to find a little tool that can give you 1:1 mouse/pointer movement, just like you can on Windows (with the help of some regtweaks and system file patchers).</p>
<p>Download this Preference Pane and run it: <a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2010/06/MouseAccelerationPref11c.zip">MouseAccelerationPref11c</a></p>
<p>Use these settings:</p>
<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2010/06/Screen-shot-2010-06-14-at-11.46.27-AM.png" rel="lightbox"><img class="aligncenter size-medium wp-image-226" title="1:1 mouse acceleration" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2010/06/Screen-shot-2010-06-14-at-11.46.27-AM-300x188.png" alt="" width="300" height="188" /></a></p>
<p>I know it says &#8216;Inverted&#8217; on -6.0x, but it&#8217;s actually 1:1 non-inverted <img src='http://ariekanarie.nl/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/224/disabling-mouse-acceleration-on-osx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote kernel upgrade with Debian/Ubuntu and Grub2</title>
		<link>http://ariekanarie.nl/archives/211/remote-kernel-upgrade-with-debianubuntu-and-grub2</link>
		<comments>http://ariekanarie.nl/archives/211/remote-kernel-upgrade-with-debianubuntu-and-grub2#comments</comments>
		<pubDate>Tue, 02 Mar 2010 08:56:05 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[grub2]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=211</guid>
		<description><![CDATA[Remotely upgrading a kernel without some sort of remote KVM solution is not for the faint hearted. Realizing you forgot to include some module, or build the initrd image after remotely rebooting a kernel is even worse Luckily there are some nice tricks you can use to make a remote kernel upgrade as safe as [...]]]></description>
			<content:encoded><![CDATA[<p>Remotely upgrading a kernel without some sort of remote KVM solution is not for the faint hearted. Realizing you forgot to include some module, or build the initrd image <strong>after</strong> remotely rebooting a kernel is even worse <img src='http://ariekanarie.nl/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Luckily there are some nice tricks you can use to make a remote kernel upgrade as safe as possible.</p>
<p>First, make sure you have a valid kernel. Copy the .config of an old kernel and &#8216;make oldconfig&#8217; to make it work on your new-to-be-compiled kernel.</p>
<p>Second, make the kernel using the &#8216;make-kpkg&#8217; package, don&#8217;t forget the &#8211;initrd parameter if you need it.</p>
<p>Third, after installing the kernel package, don&#8217;t forget to check if the initrd image got generated. For some strange reason Debian won&#8217;t generate this even after building with make-kpkg &#8211;image, you can read more about that <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=528373" target="_blank">here</a>. You basically need to copy a file from &#8216;/usr/share/kernel-package/examples/etc/kernel/postinst.d/initramfs&#8217; to &#8216;/etc/kernel/postinst.d/initramfs&#8217;</p>
<p>Fourth, you need to configure Grub2 so it uses a kernel boot option which makes the kernel restart if it can&#8217;t boot for some reason. To do this with Grub2, open /etc/default/grub and add &#8220;panic=5&#8243; to GRUB_CMDLINE_LINUX_DEFAULT, like this:</p>
<blockquote>
<div id="_mcePaste">GRUB_CMDLINE_LINUX_DEFAULT=&#8221;quiet panic=5&#8243;</div>
</blockquote>
<p>Fifth, Grub2 needs to be told to only boot the new kernel once, so in case the new kernel panics, it automatically restarts using a kernel you know works (your current one perhaps). Else the &#8216;panic=5&#8242; we set earlier will only lead to a reboot loop.</p>
<p>To do this open /etc/default/grub and change GRUB_DEFAULT to saved, like this:</p>
<blockquote><p>GRUB_DEFAULT=saved</p></blockquote>
<p>To configure &#8216;reboot-once-into-new-kernel&#8217;, we need to do two more things, first we need to tell Grub2 what your working, safe kernel is. Check /boot/grub/grub.cfg for the name of this kernel, but don&#8217;t change anything in this file.</p>
<p>My safe kernel is called: &#8221;Debian GNU/Linux, with Linux 2.6.32-2-686&#8243;, which I can set as the default, safe, kernel with this command:</p>
<blockquote><p>grub-set-default &#8221;Debian GNU/Linux, with Linux 2.6.32-2-686&#8243;</p></blockquote>
<p>Now we have to tell Grub to reboot once into the new kernel, again we need the name of the new kernel, mine is &#8221;Debian GNU/Linux, with Linux 2.6.32-example&#8221;, use this command.</p>
<blockquote><p>grub-reboot &#8221;Debian GNU/Linux, with Linux 2.6.32-example&#8221;</p></blockquote>
<p>Don&#8217;t worry, this won&#8217;t reboot your machine.</p>
<p>The final step is to generate a new /boot/grub/grub.cfg, else all the things we just did won&#8217;t have an effect</p>
<blockquote><p>update-grub</p></blockquote>
<p>Now you&#8217;re ready to reboot, good luck and fingers crossed. After a succesful boot, you can set your new kernel as the default using the grub-set-default command</p>
<blockquote><p>grub-set-default &#8221;Debian GNU/Linux, with Linux 2.6.32-example&#8221;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/211/remote-kernel-upgrade-with-debianubuntu-and-grub2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speedup the HTC Hero</title>
		<link>http://ariekanarie.nl/archives/149/speedup-the-htc-hero</link>
		<comments>http://ariekanarie.nl/archives/149/speedup-the-htc-hero#comments</comments>
		<pubDate>Fri, 04 Sep 2009 16:40:05 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=149</guid>
		<description><![CDATA[A week ago I got a new phone, the HTC Hero. It&#8217;s an Android based phone so it&#8217;s easy to customize and there are a lot of great apps available for it. However, HTC&#8217;s default firmware is a bit sluggish. Luckily there&#8217;s a solution. It takes 5 minutes and besides speeding it up, it also [...]]]></description>
			<content:encoded><![CDATA[<p>A week ago I got a new phone, the HTC Hero.</p>
<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2009/09/large8.jpg" rel="lightbox"><img class="size-thumbnail wp-image-150 alignright" title="HTC Hero" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2009/09/large8-150x150.jpg" alt="HTC Hero" width="150" height="150" /></a><br />
It&#8217;s an Android based phone so it&#8217;s easy to customize and there are a lot of great apps available for it.</p>
<p>However, HTC&#8217;s default firmware is a bit sluggish. Luckily there&#8217;s a solution. It takes 5 minutes and besides speeding it up, it also &#8216;roots&#8217; it. &#8216;Rooting&#8217; an Android phone allows a user to do basically anything he wants with the phone.</p>
<p>Here are the steps (by <a href="http://android.modaco.com/content/htc-hero-hero-modaco-com/292018/04-09-2-0-the-modaco-custom-rom-is-here-2-versions-based-on-the-new-update/" target="_blank">Paul of MoDaCo</a>)</p>
<blockquote><p>- Download the custom ROM, and copy it to your SD card (modaco 2.2 core)<br />
- download this file (<a rel="external" href="http://content.modaco.net/dropzone/modacopatchedrecovery-1.0.zip" target="_blank">http://content.modaco.net&#8230;copatchedrecovery-1.0.zip</a>) and extract it to your PC or mac<br />
- open a command prompt to the directory containing the extracted files<br />
- type the following commands (prefix each command with ./ if you&#8217;re on a mac)<br />
- adb shell reboot bootloader (wait for device to reboot into bootloader)<br />
- fastboot boot cm-hero-recovery.img<br />
- Select &#8216;nandroid backup&#8217; from the menu to do a backup<br />
- If you copied the custom rom as update.zip, select &#8216;apply sdcard:update.zip&#8217;, else select the option below.<br />
- all done</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/149/speedup-the-htc-hero/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooth 1080p h264 playback on Linux</title>
		<link>http://ariekanarie.nl/archives/143/smooth-1080p-h264-playback-on-linux</link>
		<comments>http://ariekanarie.nl/archives/143/smooth-1080p-h264-playback-on-linux#comments</comments>
		<pubDate>Wed, 29 Jul 2009 20:22:35 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=143</guid>
		<description><![CDATA[I&#8217;ve been struggling for quite some time trying to get 1080p content to play smoothly on my MythTV pc. I managed to get good playback of 720p files by compiling mplayer myself and using a recent version of the closed source nvidia driver. Playing back 1080p content however, was still a problem. I was never [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been struggling for quite some time trying to get 1080p content to play smoothly on my MythTV pc. I managed to get good playback of 720p files by compiling mplayer myself and using a recent version of the closed source nvidia driver.</p>
<p>Playing back 1080p content however, was still a problem. I was never able to get smooth playback with mplayer. Only the xbmc videoplayer could play 1080p smoothly on my system. XBMC is not an option due to the <a title="WAF" href="http://en.wikipedia.org/wiki/Woman_acceptance_factor" target="_blank">WAF</a>, it has to be something that runs from MythTV.</p>
<p>Fooling around with coreavc-for-linux (I love CoreAVC on Windows) got me nowhere. Recompiling, tweaking and updating mplayer/nvidia/xorg, nothing seemed to work.</p>
<p>Until I tried a new version of mplayer from the Debian Multimedia repositories. The mplayer version in that repository has support for a new feature in the linux nvidia drivers that (finally) allows video decoding on the GPU.</p>
<p>The easy steps to get this to work:</p>
<ul>
<li>Download and install the new nvidia linux drivers (180+)</li>
<li>Add the Debian Multimedia repository to your sources.list</li>
<li>Install mplayer from the new Debian Multimedia repository</li>
<li>Start mplayer with &#8216;-vo vdpau -vc ffh264vdpau&#8217;</li>
</ul>
<p>More than a year of tweaking and tinkering made redundant by these easy steps, excellent!</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/143/smooth-1080p-h264-playback-on-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails on OS X: no such file to load &#8212; mysql</title>
		<link>http://ariekanarie.nl/archives/128/rails-on-os-x-no-such-file-to-load-mysql</link>
		<comments>http://ariekanarie.nl/archives/128/rails-on-os-x-no-such-file-to-load-mysql#comments</comments>
		<pubDate>Wed, 11 Mar 2009 11:24:55 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=128</guid>
		<description><![CDATA[Just a quick post to maybe help someone who has a similar problem: I had the following error whenever I tried to use &#8216;script/console&#8217; (script/server and rake worked fine) require &#8216;mysql&#8217; MissingSourceFile: no such file to load &#8212; mysql from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217; from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217; Turns out I had multiple versions of RubyGems installed on [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to maybe help someone who has a similar problem:</p>
<p>I had the following error whenever I tried to use &#8216;script/console&#8217; (script/server and rake worked fine)</p>
<blockquote><p>require &#8216;mysql&#8217;</p>
<p>MissingSourceFile: no such file to load &#8212; mysql<br />
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;<br />
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;</p></blockquote>
<p>Turns out I had multiple versions of RubyGems installed on my Macbook. The error message already spoils it by saying rubygems in /System/Library/Framework/ is being called, while I actually installed rubygems manually in a different folder.</p>
<p>To prevent these kind of problems in the future I simply deleted the entire Ruby.framework directory and use the manually installed versions instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/128/rails-on-os-x-no-such-file-to-load-mysql/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Switching from Ubuntu/Windows to Mac OS X</title>
		<link>http://ariekanarie.nl/archives/107/switching-from-ubuntuwindows-to-mac-os-x</link>
		<comments>http://ariekanarie.nl/archives/107/switching-from-ubuntuwindows-to-mac-os-x#comments</comments>
		<pubDate>Wed, 21 Jan 2009 22:11:26 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=107</guid>
		<description><![CDATA[I&#8217;ve been using my new Macbook for a whopping two days now, so I think it&#8217;s time to share some of my early impressions. First of all, I&#8217;m not a typical computer user. I&#8217;m picky, opinionated and totally unreasonable when it comes to my requirements for an Operating System. Before my Macbook my setup consisted [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-117   alignright" style="border: 0pt none;" title="apple-logo" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2009/01/apple-logo.png" alt="apple-logo" width="152" height="186" /></p>
<p>I&#8217;ve been using my new Macbook for a whopping two days now, so I think it&#8217;s time to share some of my early impressions.</p>
<p>First of all, I&#8217;m not a typical computer user. I&#8217;m picky, opinionated and totally unreasonable when it comes to my requirements for an Operating System. Before my Macbook my setup consisted of:</p>
<ul>
<li>Desktop PC, Windows XP: Used for gaming mainly, also editting photo&#8217;s and as a &#8216;<a href="http://en.wikipedia.org/wiki/Thin_client" target="_blank">fat client</a>&#8216; for Putty</li>
<li>Laptop, Ubuntu: Used for work and midnight-coding. Purely a development tool for developing Ruby on Rails webapplications, accessing <a href="http://icanhascheezburger.com/" target="_blank">icanhazcheeseburger.com</a> and <a href="http://punditkitchen.com/" target="_blank">other</a> <a href="http://graphjam.com/" target="_blank">important</a> <a href="http://www.dilbert.com/" target="_blank">work</a> <a href="http://thedailywtf.com/">stuff</a>.</li>
</ul>
<p><span id="more-107"></span></p>
<p>The Windows XP of my desktop PC is a necessary evil. Games for Linux and Mac OS X are rare and my girlfriend still has an emergency Windows-account she can use whenever her Windows XP laptop refuses to work properly. Simply put: I&#8217;m stuck with XP for my desktop and I don&#8217;t really mind (a lot).</p>
<p><img class="alignnone size-medium wp-image-116" style="border: 0pt none;" title="607px-ubuntu_logosvg" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2009/01/607px-ubuntu_logosvg-300x78.png" alt="607px-ubuntu_logosvg" width="300" height="78" /></p>
<p>The laptop running <a href="http://http://www.ubuntu.com/" target="_blank">Ubuntu</a> belongs to <a href="http://www.finalist.com/" target="_blank">my employer</a>. Ubuntu is an excellent platform to develop <a href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a> applications, the <a href="http://packages.ubuntu.com/intrepid/" target="_blank">huge Ubuntu repository </a>contains recent version of all necessary tools and the <a href="http://en.wikipedia.org/wiki/Advanced_Packaging_Tool" target="_blank">apt package manager</a> is simply unmatched on any platform. To isolate myself from outside influences during coding sessions I use a closed headphone and <a href="http://amarok.kde.org/" target="_blank">Amarok</a> (a rather bloated <a href="http://kde.org/" target="_blank">KDE</a> program, so I can&#8217;t bitch about iTunes without being an ever bigger hypocrit). <a href="http://pidgin.im" target="_blank">Pidgin</a> provides me with access to nearly all IM networks, while <a href="https://addons.mozilla.org/en-US/firefox/addon/5081" target="_blank">TwitterFox</a> keeps me in touch with fellow twitterati.</p>
<p>My new Macbook is supposed to replace the Ubuntu laptop and serve as an alternative to my desktop at home. Here are some of my initial thoughts regarding this migration:</p>
<blockquote><p><em><strong>It just works</strong></em></p></blockquote>
<p>It doesn&#8217;t.</p>
<p>Ok to be fair, a lot of stuff just &#8216;works&#8217;, I am however spoilt by Ubuntu 8.10 which also &#8216;just works&#8217;, it just fails to work on different points compared to Mac OS X. OS X fails to &#8216;just work&#8217; as a Ruby on Rails development environment, sure it comes preloaded with Ruby on Rails, but it has ancient version of Rails, Ruby and Rake and this completely screwed me over while trying to convert my fresh Macbook into the ultimate web-development machine.</p>
<p>Multimedia support is not as good out of the box as Ubuntu. In Ubuntu all the codecs you need are in the repository and are a easy to install. To be fair, this is only since the 8.x branch of Ubuntu. For OS X I had to find a bunch of codecs from questionable vendors (I&#8217;ll never trust the DivX corporation after their bloated Windows installers) before I could get my movies and series to play in Quicktime.<br />
Speaking of horrible failures, I don&#8217;t see how anyone could enjoy Quicktime. It&#8217;s completely inadequate compared to Zoom Player on Windows or MPlayer on Linux. I&#8217;m planning to replace it by something decent ASAP. Preferbly something pretty like <a href="http://http://xbmc.org/" target="_blank">XBMC</a> or the OS X specific port of this brilliant project.</p>
<blockquote><p><em><strong>Package management? What&#8217;s that?</strong></em></p></blockquote>
<p>Mac OS X understands package management just like <a href="http://www.youtube.com/watch?v=_GxC4kKD9qA" target="_blank">this girl</a> understands &#8220;PC&#8217;s&#8221;. Not a clue. Everything application you install has it&#8217;s own auto-update function and the built-in Software Update is about as useful as &#8220;Microsoft Update&#8221;. Which is not bad, it&#8217;s just not as great as Ubuntu&#8217;s software updater.</p>
<blockquote><p><em><strong>MacPorts &lt; apt</strong></em></p></blockquote>
<p><a href="http://www.macports.org/" target="_blank">MacPorts</a> is similar to Debian/Ubuntu&#8217;s APT. It provides an easy way to install and update software for your Mac. Unfortunately it&#8217;s more like Gentoo&#8217;s &#8216;<a href="http://en.wikipedia.org/wiki/Portage_(software)#emerge" target="_blank">emerge</a>&#8216; and less like Debian&#8217;s &#8216;apt-get&#8217;. Everything you install has to be compiled first, and if you want to install something with fancy graphics you&#8217;ll have to wait for an hour while the X window manager gets compiled (ok, this is only the first time).<br />
Fortunately it does what it&#8217;s supposed to, it just takes quite a lot longer than APT and the repository of available software is tiny compared to Ubuntu&#8217;s insane heap of <a href="http://en.wikipedia.org/wiki/Free_and_Open_Source_Software" target="_blank">FOSS</a>. For example, something like &#8216;<a href="http://htop.sourceforge.net/">htop</a>&#8216; is not available on OS X, but luckily there&#8217;s the <a href="http://guides.macrumors.com/Activity_Monitor" target="_blank">Activity Monitor</a> GUI to offer some compensation.</p>
<blockquote><p><em><strong>OS X &lt; GNU</strong></em></p></blockquote>
<p>Mac OS X implements all the usual Unix tools. Things like find and grep. These are kinda different to the GNU-tools I used on my Ubuntu laptop and Debian servers. As far as I can tell after these few days of use, the Mac OS X versions are inferior to their GNU-siblings. I&#8217;ll have to get used to this or find alternative tools</p>
<p>So much for the bitching, here are a few things I do like:</p>
<blockquote><p><em><strong>It just works</strong></em></p></blockquote>
<p>A lot of stuff works just fine out of the box. The prepackaged software gives Ubuntu a good run for it&#8217;s money. Also, it&#8217;s obvious OS X is more popular than Linux. Quite a few software products offer a reasonable up-to-date version for Mac. Skype for example has a Mac version which is nearly identical to the Windows version, while the Linux version is lacking a lot.</p>
<blockquote><p><em><strong>Basic hardware compatibility is not an issue</strong></em></p></blockquote>
<p>If you&#8217;re the only one making hardware for your OS (or is it the other way around?) it&#8217;s easy to make that hardware supported in the OS. While the linux kernel provides support for nearly every graphics card, sound card, IDE controller and toaster made in the history of electronics, OS X only has to support the very limited set of hardware used by Apple. And to Apple&#8217;s credit, it does this very well. Unlike Linux they don&#8217;t have to work around crappy vendors breaking standards that crash your laptop after a resume-from-standby. As a result, stuff like suspend-to-ram and connecting multiple monitors works really well and quickly.</p>
<blockquote><p><em><strong>It&#8217;s a lot like Linux</strong></em></p></blockquote>
<p>Overall I feel quite at home in OS X already. I was able to set up a proper development environment during a single evening, inspite of the great efforts of MacPorts to keep compiling very large bits of software. During the coming weeks I expect to find a lot more things that are different/worse/better in OS X compared to Ubuntu but the past few days have made me optimistic about the chances of OS X being the only OS on this Macbook. I originally intended to go for a triple boot setup; Windows XP, Ubuntu and OS X, but I think I&#8217;ll settle for installing Windows XP in a VirtualBox. Not because I like XP that much, but for testing web-application in the <a href="http://en.wikipedia.org/wiki/Internet_Explorer_6" target="_blank">worst browser ever made</a> and it&#8217;s younger brothers.</p>
<p>That&#8217;s it for now, I&#8217;ll probably write a new post in a couple of weeks, because I&#8217;m sure OS X has plenty of annoyances and amazements left in store for me.<img class="alignright size-thumbnail wp-image-115" style="border: 0pt none;" title="internet_explorer_logo_old" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2009/01/internet_explorer_logo_old-150x150.png" alt="internet_explorer_logo_old" width="150" height="150" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/107/switching-from-ubuntuwindows-to-mac-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking Online&#8217;s new modem</title>
		<link>http://ariekanarie.nl/archives/67/hacking-onlines-new-modem</link>
		<comments>http://ariekanarie.nl/archives/67/hacking-onlines-new-modem#comments</comments>
		<pubDate>Thu, 28 Aug 2008 13:45:25 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=67</guid>
		<description><![CDATA[Online (previously Wanadoo/Orange) is currently testing a new modem to replace the &#8216;Livebox&#8217;. The new modem is a Speedtouch 706 (WL) and to prevent people from accidently breaking it or use the modem on different DSL networks nearly all administrative options are disabled. Unlike the old Livebox, you only get limited access to forward ports [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.online.nl" target="_blank">Online</a> (previously Wanadoo/Orange) is currently testing a new modem to replace the &#8216;Livebox&#8217;. The new modem is a Speedtouch 706 (WL) and to prevent people from accidently breaking it or use the modem on different DSL networks nearly all administrative options are disabled.</p>
<p style="text-align: center;"><img class="size-medium wp-image-69 aligncenter" title="online-logo" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/08/online-logo.png" alt="" width="271" height="100" /></p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">Unlike the old Livebox, you only get limited access to forward ports and change the wifi SSID and password. Even <a href="http://www.google.nl/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=https%3A%2F%2Fwww.dyndns.com%2F&amp;ei=d6y2SLWGDYeWwgHHlah-&amp;usg=AFQjCNEWc1czf8ED1dhikX2H3yGJF4lGUA&amp;sig2=X7jF0nd39QtNxgJ5M1zr9w" target="_blank">DynDNS</a> support, which was perfectly usable in the Livebox, is disabled.</p>
<p>Looking for a way to disable the built-in DHCP server and change the default IP address of the Speedtouch 706 I tried flashing the device with the original firmware instead of the locked one. However, the firmware updater refuses to flash because of incompatibility.</p>
<p>This didn&#8217;t stop me and using TFTP I tried forcing the flash, but again, this didn&#8217;t work.</p>
<p>After some googling I came across <a href="http://www.gnucitizen.org/blog/bt-home-flub-pwnin-the-bt-home-hub-4/" target="_blank">a vulnerability in the Speedtouch 780</a>, that allows you to access any page of the webinterface, even the ones you shouldn&#8217;t have access to. Using this vulnerability it&#8217;s possible to download the modem&#8217;s configuration, change it in a text editor and upload it again.</p>
<p style="text-align: center;"><img class="size-medium wp-image-70 aligncenter" title="Speedtouch 706WL" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/08/nb-st-706wl-300x253.gif" alt="" width="300" height="253" /></p>
<p>Thanks to this vulnerability I was able to disable the DHCP server and change the symmetric NAT implementation to cone NAT. The default configuration makes it nearly impossible to play online games based on a player-to-player architecture. C&amp;C3 and Supreme Commander are two games that use this technique to allow players to play against eachother. With the original configuration I was unable to connect to about 80% of players in <a href="http://www.supremecommander.com" target="_blank">Supreme Commander</a>, now with the cone NAT configuration I no longer have any issues.</p>
<p>You can find instructions to download/upload the Speedtouch configuration <a href="http://www.gnucitizen.org/blog/bt-home-flub-pwnin-the-bt-home-hub-4/" target="_blank">here</a> and you can find/replace these bits in the user.ini to get cone NAT instead of symmetric NAT:</p>
<blockquote><p>connection bind application=CONE(UDP) port=0</p>
<p>connection appconfig  application=CONE(UDP) timeout=0</p>
<p>ids config state disabled</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/67/hacking-onlines-new-modem/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>mod_rails vs thin vs ebb vs mongrel</title>
		<link>http://ariekanarie.nl/archives/51/mod_rails-vs-thin-vs-ebb-vs-mongrel</link>
		<comments>http://ariekanarie.nl/archives/51/mod_rails-vs-thin-vs-ebb-vs-mongrel#comments</comments>
		<pubDate>Wed, 16 Apr 2008 09:29:22 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=51</guid>
		<description><![CDATA[With the recent release of mod_rails, I thought it was time for yet another benchmark. Mod_rails aims to make deployment of RubyOnRails applications comparable to deploying a PHP application on a shared host. The contestants mod_rails (Apache 2.2.8) Thin 0.8.0 (Cluster of 4 behind nginx 0.5.33, both TCP and Unix socket) Ebb 0.1.0 (Cluster of [...]]]></description>
			<content:encoded><![CDATA[<p>With the recent release of <a href="http://modrails.com" target="_blank">mod_rails</a>, I thought it was time for <a href="http://ariekanarie.nl/archives/45/yet-another-ruby-server" target="_blank">yet</a> <a href="http://ariekanarie.nl/archives/44/ruby-web-server-performance" target="_blank">another</a> benchmark. Mod_rails aims to make deployment of RubyOnRails applications comparable to deploying a PHP application on a shared host.</p>
<p><strong>The contestants</strong></p>
<p>mod_rails (Apache 2.2.8)</p>
<p>Thin 0.8.0 (Cluster of 4 behind nginx 0.5.33, both TCP and Unix socket)</p>
<p>Ebb 0.1.0 (Cluster of 4 behind nginx 0.5.33)</p>
<p>Mongrel 1.1.4 (Cluster of 4 behind nginx 0.5.33)</p>
<p>The benchmark is the index page of <a href="http://leefjedoel.nl" target="_blank">Leef je doel</a>, the hardware used is a Dell D830 laptop with a T7300 (speedstep disabled), 2GB of RAM and a 7200RPM harddisk. The page runs a few queries and also serves a lot of fragments from memcached.</p>
<p><strong>The results</strong></p>
<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/04/image001.png" rel="lightbox"><img class="alignnone size-full wp-image-52" title="mod_rails vs thin vs ebb vs mongrel" src="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/04/image001.png" alt="" width="482" height="289" /></a></p>
<table border="0">
<tbody>
<tr>
<td></td>
<td><strong>-n 10000 -c 10<br />
</strong></td>
<td><strong> -n 10000 -c 50</strong></td>
</tr>
<tr>
<td>mod_rails</td>
<td>79.2</td>
<td>77.4</td>
</tr>
<tr>
<td>thin(tcp)</td>
<td>84.22</td>
<td>84.06</td>
</tr>
<tr>
<td>thin(socket)</td>
<td>86.4</td>
<td>87.65</td>
</tr>
<tr>
<td>ebb</td>
<td>93.2</td>
<td>91.2</td>
</tr>
<tr>
<td>mongrel</td>
<td>79.22</td>
<td>75.92</td>
</tr>
</tbody>
</table>
<p><strong>Performance</strong></p>
<p>Like my previous test, Ebb comes out on top, closely followed by Thin.</p>
<p>Using the default Apache2 config supplied by Ubuntu, mod_rails shows performance equal to mongrel_cluster behind nginx. I&#8217;m sure that by tweaking the Apache config files, some performance can be gained.</p>
<p>Compared to setting up nginx and thin/ebb/mongrel, setting up mod_rails is a lot simpler. Have a look at <a href="http://www.railsplugins.net/passenger.mov" target="_blank">their screencast</a> to see how easy it is, if you have a working Apache2, you&#8217;ll have mod_rails up and running within minutes. There are some small issues with mod_rails at the moment, for a list, check <a href="http://code.google.com/p/phusion-passenger/issues/list" target="_blank">mod_rails&#8217; Google Code page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/51/mod_rails-vs-thin-vs-ebb-vs-mongrel/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
<enclosure url="http://www.railsplugins.net/passenger.mov" length="18988364" type="video/quicktime" />
		</item>
		<item>
		<title>Using MemCached to speed up fragment caching</title>
		<link>http://ariekanarie.nl/archives/46/using-memcached-to-speed-up-fragment-caching</link>
		<comments>http://ariekanarie.nl/archives/46/using-memcached-to-speed-up-fragment-caching#comments</comments>
		<pubDate>Wed, 02 Apr 2008 17:56:04 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/?p=148</guid>
		<description><![CDATA[Like any web 2.0 site, leefjedoel.nl is currently in beta. During this phase we&#8217;re trying to find bottlenecks, fix the last few bugs and optimize heavy parts of the site. During development we already prepared caching for all pages, mostly fragment caching. To expire cache that&#8217;s no longer current, we use sweepers that get called [...]]]></description>
			<content:encoded><![CDATA[<p>Like any web 2.0 site, <a title="leefjedoel.nl" href="http://leefjedoel.nl" target="_blank">leefjedoel.nl</a> is currently in beta. During this phase we&#8217;re trying to find bottlenecks, fix the last few bugs and optimize heavy parts of the site.</p>
<p>During development we already prepared caching for all pages, mostly fragment caching. To expire cache that&#8217;s no longer current, we use sweepers that get called when something relevant is updated. These sweepers only sweep the caches that get outdated.</p>
<p>Because we were unfamiliar with caching and needed to see the result of our fragment caching, we used the file_store to store the generated caches. These files are stored on disk and this way you can easily see how many cache gets generated and what they contain.</p>
<p><strong>Regex and file_store == FAIL</strong></p>
<p>To sweep caches we used regular expressions, this way we could easily sweep all relevant caches at once. This was a bad idea, as you can read <a title="Caching makes your brain explode" href="http://blog.craigambrose.com/past/2007/11/13/caching_makes_your_brain_explode/" target="_blank">here</a> and <a title="Rails expire_fragment(regex) Considered Harmful" href="http://gurge.com/blog/2007/02/04/rails-expire_fragmentregex-considered-harmful/" target="_blank">here</a></p>
<p>During the beta phase the size of the site steadily increased, more users, more goals, more groups. There was a noticeable delay whenever you updated/created something. A short investigation pointed to the cache sweepers as the culprit.</p>
<p>The file_store for cache isn&#8217;t exactly the fastest solution to store your cache, but when you combine it with regex sweepers, things really slow down. Whenever you do a regex sweep, all files in the cache directory get returned (not that surprising if you think of it), and the regex is run against it. So even if you do a sweep on /goals, it will also return files in /users and /groups. As a result, updating your profile could take 15 seconds.</p>
<p><strong>MemCached</strong></p>
<p>We&#8217;d been planning on moving the cache to memcached all along, so this seemed a good opportunity to do it. In the next few paragraphs I&#8217;ll describe how to install memcached, get the correct Rails plugin to make memcached play nice with fragment caching and how to configure your Rails application so it uses your memcache server.</p>
<p><strong>Installation of MemCached on GNU/Linux</strong></p>
<p>First of all, you&#8217;ll need to memcache daemon, assuming you have a nice linux distro you can:</p>
<blockquote><p>sudo apt-get install memcached</p></blockquote>
<p>This will work on Debian, Ubuntu and other Debian-based distro&#8217;s, on Gentoo you can</p>
<blockquote><p>emerge memcached</p></blockquote>
<p>The great thing about memcached is its simplicity, it requires no configuration after installation, just run it.</p>
<p><strong>All about the gems baby</strong></p>
<p>Now we&#8217;ll get the gem to allow Ruby to talk to memcache. There are two gems that do this, Ruby-MemCache and memcache-client. memcache-client is supposed to be faster, so I used that.</p>
<blockquote><p>sudo gem install memcache-client</p></blockquote>
<p><strong>Plugin to play nice with rails</strong></p>
<p>Rails&#8217; fragment caching doesn&#8217;t work with memcached out of the box, you&#8217;ll need a plugin. This plugin also adds a nice bonus to the cache method in views.</p>
<blockquote><p>script/plugin install svn://rubyforge.org/var/svn/zventstools/projects/extended_fragment_cache</p></blockquote>
<div><strong>Environment setup</strong></div>
<p>Now we need to configure your Rails app to use the memcached server. You&#8217;ll need to edit your config/environments/production.rb</p>
<pre name="code" class="ruby">memcache_options = {
:c_threshold = 10_00,
:compression = true,
:debug = false,
:namespace = 'yourappname_or_anything_you_like',
:readonly = false,
:urlencode = false
}
CACHE = MemCache.new(memcache_options)
CACHE.servers = '127.0.0.1:11211'
config.action_controller.fragment_cache_store = CACHE, {}
</pre>
<p><strong>That&#8217;s all folks!</strong></p>
<p>That&#8217;s it, you&#8217;re all done, the &#8216;cache&#8217; method in your views will now use the memcache server.</p>
<p><strong>Oh wait, there&#8217;s an encore</strong></p>
<p>But there&#8217;s more, using memcached you can set expiry times for caches. I edited the plugin for a default expiry time of 1 day. In vendor/plugins/extended_fragment_cache/lib/extended_fragment_cache.rb look for def write(key,content,options=nil)</p>
<pre name="code" class="ruby">
def write(key,content,options=nil)
  expiry = options &amp;&amp; options[:expire] || 1.day
  begin
    set(key,content,expiry)
    rescue ActiveRecord::Base.logger.error("MemCache Error: #{$!}")
    rescue MemCache::MemCacheError = err
    ActiveRecord::Base.logger.error("MemCache Error: #{$!}")
  end
end
</pre>
<p>You can change the 1.day to anything you want. To override this default behaviour, you can use the following code in your views</p>
<pre name="code" class="ruby">
cache('goals/large_cloud', {:expire = 30.minutes.to_i})  do
</pre>
<p>This will make the cache called &#8216;goals/large_cloud&#8217; to expire 30 minutes after it got created.</p>
<p>There are two important things to consider when you move to memcached</p>
<blockquote><p>1. MemCached doesn&#8217;t support regex based expiry of caches. You need to manually enter every cache you want to expire. You can do this in some nice methods of course. Here&#8217;s ours for expiring the cache when a user gets updated.</p>
<pre name="code" class="ruby">
def expire_user_fragments(user)
  fragments = %w[author_icon author_link side_block_friends ..snip...]
  fragments.each do |f|
    expire_fragment("user/#{user.id}/#{f}")
  end
end</pre>
<p>2. Your application will fail when the MemCache server becomes unavailable. If you ever restart MemCache, or if it crashes (haven&#8217;t seen that happen yet), you need to restart your mongrel-cluster/thin/ebb.</p>
<p>3. When you restart MemCache, all cache is cleared, and you need to restart your mongrel-cluster/thin/ebb.</p></blockquote>
<p>This guide only talks about fragment caching, over at <a href="http://www.bencurtis.com/archives/2007/12/painless-rails-action-caching-with-memcached/#more-111">Ben Curtis&#8217; blog</a>, you can read all about action caching.</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/46/using-memcached-to-speed-up-fragment-caching/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Yet another Ruby server</title>
		<link>http://ariekanarie.nl/archives/45/yet-another-ruby-server</link>
		<comments>http://ariekanarie.nl/archives/45/yet-another-ruby-server#comments</comments>
		<pubDate>Tue, 04 Mar 2008 15:55:13 +0000</pubDate>
		<dc:creator>Arie</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ebb]]></category>
		<category><![CDATA[mongrel]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[thin]]></category>

		<guid isPermaLink="false">http://ariekanarie.nl/archives/145/yet-another-ruby-server</guid>
		<description><![CDATA[Ruby Inside just posted a pretty impressive performance graph of a new Ruby server called Ebb. The graph was taken from the homepage of Ebb Now what is Ebb? The design is similar to the Evented Mongrel web server; except instead of using EventMachine (a ruby binding to libevent), the Ebb web server is written [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/03/concurrency.png" title="Ebb bench" rel="lightbox"><img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/03/concurrency.thumbnail.png" alt="Ebb bench" align="right" /></a><a href="http://www.rubyinside.com/ebb-web-framework-http-server-786.html" title="Ruby Inside" target="_blank">Ruby Inside</a> just posted a pretty impressive performance graph of a new Ruby server called Ebb. The graph was taken from the <a href="http://ebb.rubyforge.org/" target="_blank">homepage of Ebb</a></p>
<p>Now what is Ebb?</p>
<blockquote><p>The design is similar to the  <a href="http://swiftiply.swiftcore.org/mongrel.html">Evented Mongrel</a> web server;  except instead of using EventMachine (a ruby binding to libevent), the Ebb  web server is written in C and uses the  <a href="http://software.schmorp.de/pkg/libev.html">libev</a> event loop library.</p>
<p>Connections are processed as follows:</p>
<ol>
<li>libev loops and waits for incoming connections.</li>
<li>When Ebb receives a connection, it passes the request into the <a href="http://mongrel.rubyforge.org/browser/tags/rel_1-0-1/ext/http11/http11_parser.rl">mongrel state machine</a>  which securely parses the headers.</li>
<li>When the request is complete, Ebb passes the information to a user supplied callback.</li>
<li>The Ruby binding supplying this callback transforms the request into a <a href="http://rack.rubyforge.org/">Rack</a> compatible <code>env</code> hash  and passes it on a Rack adapter.</li>
</ol>
</blockquote>
<p>The graph describes performance of a simple rack application and compares Ebb to mongrel, evented mongrel and thin. I&#8217;m more interested in performance with a Rails application and decided to do a benchmark for that.</p>
<p>In my benchmark I used the same application I used for <a href="http://ariekanarie.nl/archives/142/ruby-web-server-performance" target="_blank">my previous benchmark</a>, only this time I benchmarked some extra pages.</p>
<p>Page 1 is a heavily cached page with few dynamic elements</p>
<p>Page 2 is a less cached page with a bit more dynamic elements</p>
<p>Page 3 is a non-cached page with an N+1 performance issue.</p>
<p>Ebb was tested using version 0.0.3, while Thin was on version 0.7.0. Both were run in a cluster of 4 behing nginx as a load balancer.</p>
<p><a href="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/03/image001.png" title="Ebb vs Thin benchmark" rel="lightbox"><img src="http://ariekanarie.nl/wordpress/wp-content/uploads/2008/03/image001.png" alt="Ebb vs Thin benchmark" /></a></p>
<p>Interestingly Ebb managed to outperform Thin by about 10% on every page.</p>
]]></content:encoded>
			<wfw:commentRss>http://ariekanarie.nl/archives/45/yet-another-ruby-server/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
