<?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>Katipo Developers Blog &#187; open source</title>
	<atom:link href="http://blog.katipo.co.nz/category/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.katipo.co.nz</link>
	<description></description>
	<lastBuildDate>Fri, 04 Jun 2010 02:39:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A more concise way to call single test file in ruby</title>
		<link>http://blog.katipo.co.nz/2010/04/25/a-more-concise-way-to-call-single-test-files-in-ruby/</link>
		<comments>http://blog.katipo.co.nz/2010/04/25/a-more-concise-way-to-call-single-test-files-in-ruby/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 03:52:12 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=118</guid>
		<description><![CDATA[I&#8217;ve been working with Rails and Ruby since 2006 and I&#8217;m surprised I hadn&#8217;t put this together for myself:

$ cd test # from your rails app root
$ ruby unit/a_model_test.rb

As compared to:

$ ruby -I"lib:test" "/usr/local/Cellar/ruby-enterprise-edition/1.8.7-20090928/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/a_model_test.rb"

Definitely a hand to forehead moment when I read that! Found it in a comment here:
https://rails.lighthouseapp.com/projects/16213/tickets/8
*Assumes your ruby command is set [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with Rails and Ruby since 2006 and I&#8217;m surprised I hadn&#8217;t put this together for myself:</p>
<pre>
<div class="codesnip-container" >$ cd test # from your rails app root
$ ruby unit/a_model_test.rb</div>
</pre>
<p>As compared to:</p>
<pre>
<div class="codesnip-container" >$ ruby -I"lib:test" "/usr/local/Cellar/ruby-enterprise-edition/1.8.7-20090928/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/a_model_test.rb"</div>
</pre>
<p>Definitely a hand to forehead moment when I read that! Found it in a comment here:</p>
<p><a href="https://rails.lighthouseapp.com/projects/16213/tickets/8">https://rails.lighthouseapp.com/projects/16213/tickets/8</a></p>
<p>*Assumes your ruby command is set up correctly in your shell&#8217;s environment, of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2010/04/25/a-more-concise-way-to-call-single-test-files-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using git feature branches to make your master branch commits list concise</title>
		<link>http://blog.katipo.co.nz/2010/03/18/using-git-feature-branches-to-make-your-master-branch-commits-list-concise/</link>
		<comments>http://blog.katipo.co.nz/2010/03/18/using-git-feature-branches-to-make-your-master-branch-commits-list-concise/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 23:18:37 +0000</pubDate>
		<dc:creator>kieran</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[commits]]></category>
		<category><![CDATA[squash]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=112</guid>
		<description><![CDATA[When you&#8217;re starting off, it&#8217;s fairly easy to commit to the master branch. But once your application is released, you probably want to keep things stable on the master branch. So use feature branches.

You do all your work in a feature branch, then pull it into the master branch. There are numerous topics on the [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re starting off, it&#8217;s fairly easy to commit to the master branch. But once your application is released, you probably want to keep things stable on the master branch. So use feature branches.</p>
<p><span id="more-112"></span></p>
<p>You do all your work in a feature branch, then pull it into the master branch. There are numerous topics on the web for this.</p>
<p>But there is a problem with this approach. When you run `git pull origin my_branch`, you end up creating merge commits. Some get around this with `git rebase`, but then you end up rewriting commit shas. So how do you get a clean history without messing up the master branch?</p>
<p>Use `&#8211;squash`. Here is a simplified example:</p>
<pre>
<div class="codesnip-container" >git checkout -b my_branch
touch File1
git commit -a -m "File 1"
touch File2
git commit -a -m "File 2"
git push origin my_branch
git checkout master
git pull --squash origin my_branch
git commit -a -m "File 1 and 2"</div>
</pre>
<p>Note the last two steps. We use &#8211;squash to compact the feature branch commits. This leaves all changes in the other branch in an uncommitted state (which you can then do one final review on). We then go ahead and make a commit.</p>
<p>The result? One commit in master, containing all code from the feature branch.</p>
<p>Now, the caveat: If you have multiple developers who made commits on this branch, you probably want to leave the commits apart for credits sake. But if you&#8217;re the only one who&#8217;s committed, and you don&#8217;t mind squashing the history, this works great!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2010/03/18/using-git-feature-branches-to-make-your-master-branch-commits-list-concise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing MongoDB on Mac OS X using Homebrew</title>
		<link>http://blog.katipo.co.nz/2010/03/16/installing-mongodb-on-mac-os-x-using-homebrew/</link>
		<comments>http://blog.katipo.co.nz/2010/03/16/installing-mongodb-on-mac-os-x-using-homebrew/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 01:20:42 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[Homebrew]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[kete development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=108</guid>
		<description><![CDATA[I&#8217;ve moved from MacPorts to Homebrew which includes a recipe for installing MongoDB. After installing Homebrew, just run this as your normal user:
brew install mongodb
If you prefer to store your MongoDB data all under your home directory, you might find Mislav&#8217;s gist suits your needs instead:
http://gist.github.com/265272
If you prefer installing from source, check out this post:
http://shiftcommathree.com/articles/how-to-install-mongodb-on-os-x
Enjoy.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve moved from MacPorts to <a href="http://github.com/mxcl/homebrew">Homebrew</a> which includes a recipe for installing MongoDB. After installing Homebrew, just run this as your normal user:</p>
<div class="codesnip-container" >brew install mongodb</div>
<p>If you prefer to store your MongoDB data all under your home directory, you might find Mislav&#8217;s gist suits your needs instead:</p>
<p><a href="http://gist.github.com/265272">http://gist.github.com/265272</a></p>
<p>If you prefer installing from source, check out this post:</p>
<p><a href="http://shiftcommathree.com/articles/how-to-install-mongodb-on-os-x">http://shiftcommathree.com/articles/how-to-install-mongodb-on-os-x</a></p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2010/03/16/installing-mongodb-on-mac-os-x-using-homebrew/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OPACs for HLT &#8211; netbooting WebConverger on ASUS EEEBox b202</title>
		<link>http://blog.katipo.co.nz/2009/07/17/opacs-for-hlt-netbooting-webconverger-on-asus-eeebox-b202/</link>
		<comments>http://blog.katipo.co.nz/2009/07/17/opacs-for-hlt-netbooting-webconverger-on-asus-eeebox-b202/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 09:44:22 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[koha]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=56</guid>
		<description><![CDATA[The OPACs at HLT have been failing one by one, so some replacements are in order.  The previous OPACs ran Mozilla in kiosk mode on a hand modified Debian install sufficiently rickety that after ~4 years I didn&#8217;t really want to touch it.
Somewhat surprisingly, the task (taking some hardware and netbooting it into a teenage-vandal-proof [...]]]></description>
			<content:encoded><![CDATA[<p>The OPACs at <a href="http://www.library.org.nz/">HLT</a> have been failing one by one, so some replacements are in order.  The previous OPACs ran Mozilla in kiosk mode on a hand modified Debian install sufficiently rickety that after ~4 years I didn&#8217;t really want to touch it.</p>
<p>Somewhat surprisingly, the task (taking some hardware and netbooting it into a teenage-vandal-proof web kiosk) didn&#8217;t appear to be a solved problem &#8211; there are still a lot of people rolling their own, I&#8217;ve done that once, I didn&#8217;t really want to do it again.</p>
<p>Webconverger almost fits the bill, with a couple of caveats:<span id="more-56"></span></p>
<ol>
<li>it doesn&#8217;t have direct support for netbooting</li>
<li><a title="it doesn't work with the EEEBox b202" href="http://groups.google.com/group/webc-users/browse_thread/thread/82d8bd5a7ac09c1e#%20)">it doesn&#8217;t work with the EEEBox b202</a></li>
</ol>
<p>As Webc is based on Debian Live (which does support PXE booting), and the b202 works fine with Ubuntu, both these issues seemed like they should be soluble, and after much mucking about, that proved true.</p>
<p>First up, there&#8217;s no way that I can see to get Webc to netboot without rebuilding it, so you need to be comfortable with that <a title="process." href="http://webconverger.org/develop/">process.</a>  Be warned that you will consume a fair amount of bandwidth downloading packages (multiple times if you don&#8217;t have a local cache), and that the build process is slooooow.</p>
<p>Solving the non functioning X display was relatively straightforward. First, you need to amend your X configuration.  Add a symlink and a file to the includes tree:
<div class="codesnip-container" >ls -l config/chroot_local-includes/etc/X11<br />
lrwxrwxrwx 1 root simon   13 2009-07-09 18:10 X -> /usr/bin/Xorg<br />
-rw-r&#8211;r&#8211; 1 root simon 1194 2009-07-09 18:10 xorg.conf</div>
<p>inside the xorg.conf you need something like:
<div class="codesnip-container" >Section &#8220;Device&#8221;<br />
Identifier	&#8220;Configured Video Device&#8221;<br />
Option &#8220;monitor-LVDS&#8221; &#8220;LVDS&#8221;<br />
EndSection<br />
Section &#8220;Monitor&#8221;<br />
Identifier	&#8220;LVDS&#8221;<br />
Option &#8220;Ignore&#8221; &#8220;true&#8221;<br />
EndSection<br />
Section &#8220;Monitor&#8221;<br />
Identifier	&#8220;Configured Monitor&#8221;<br />
EndSection<br />
Section &#8220;Screen&#8221;   Identifier	&#8220;Default Screen&#8221;<br />
Monitor	&#8220;Configured Monitor&#8221;<br />
EndSection</div>
<p>then, edit scripts/config and add &#8220;noxautoconfig&#8221; to the &#8211;bootappend-live line, and rebuild.</p>
<p>noxautoconfig disables autogeneration of the X config every time the machine boots &#8211; it isn&#8217;t ideal, in that it makes your build less portable, but it does give you a working display.  Hopefully, the Intel Xorg driver will be updated soon to make this unnecessary (it appears to be assuming that the b202 has a mobile graphics chipset, therefore it must have an LMDS display).</p>
<p>Netbooting Webc is also comparatively simple &#8211; the only major gotcha is that the stock Webc iptables ruleset blocks NFS, which means that your box will hang just before X starts up.   HLT don&#8217;t need iptables in their environment,  so I took the path of least resistance and removed the iptables package completely &#8211; alternatively, you could amend config/chroot_local-includes/etc/iptables.conf to allow NFS.</p>
<p>So to enable netbooting, you make changes as per the Debian live manual &#8211; add something like:</p>
<div class="codesnip-container" >-b net \<br />
&#8211;net-root-path &#8220;/srv/debian-live&#8221; \<br />
&#8211;net-root-server &#8220;192.168.1.1&#8243; \</div>
<p>to scripts/config, then edit config/chroot_local-packageslists/webconverger and remove the &#8220;iptables&#8221; entry.  Finally, if DNS resolution doesn&#8217;t work, you may need to remove &#8220;nonetworking&#8221; from the &#8211;bootappend-live line in scripts/config.  Rebuild webc, and be happy.</p>
<p><strong>Other local changes:</strong></p>
<p>Removed iptables, splashy, cups, iceweasel-webconverger and all the wireless drivers from the package list, and added cron, msttcorefonts and iceweasel-webcyourlibrary.  I needed cron because I wanted to be able to power down the kiosks after the library is closed.</p>
<p>I made some further changes to scripts/config file:</p>
<div class="codesnip-container" >&#8211;bootappend-live &#8220;quiet silent nosudo noxautoconfig homepage=http://www.library.org.nz/ video=vesa:ywrap,mtrr vga=792 nopersistent quickreboot timezone=Pacific/Auckland noblank kioskresetstation=2 swapon&#8221; \<br />
-k 686 \</div>
<p> the timezone is necessary for the cron jobs to work correctly, noblank turns off the screen blanking, swapon enables any swap partitions on the hard drive, and kioskresetstation restarts Iceweasel after two minutes of idleness.  The -k 686 causes the system to boot the 686 optimised kernel &#8211; it&#8217;s not critical, the default 486 kernel also works.  All good.</p>
<p>After making changes to the tree, I run</p>
<div class="codesnip-container" >$ sudo lh_clean &#8211;purge; lh_config ; sudo lh_build</div>
<p>to redo the build.  It&#8217;s a slow process, particularly if you use &#8211;purge.  Once built, to install I run:</p>
<div class="codesnip-container" >$ sudo rm -r /srv/webconverger /srv/debian-live ; sudo tar -C /srv -xzf binary-net.tar.gz ; sudo mv /srv/webconverger/debian-live /srv ; sudo rm -r /tftpboot/pxe/debian-live ; sudo mv /srv/webconverger/tftpboot/debian-live /tftpboot/pxe ; sudo cp prompt.cfg /tftpboot/pxe/debian-live/i386/boot-screens</div>
<p>I copy the prompt.cfg because I couldn&#8217;t work out how to turn off the pxelinux prompt from within debian-live &#8211; this just overwrites the installed file with a simple file that says:</p>
<div class="codesnip-container" >default live<br />
prompt 0<br />
noescape 1</div>
<p><strong>Hardware setup</strong></p>
<p>(mostly these are notes to myself so that when I have to repeat the process in the future I won&#8217;t forget steps):</p>
<p>Updated the BIOS (press Alr-F2 as the machine boots to run the updater), then made some changes in the BIOS &#8211; enabled LAN BootROM, disabled WLAN, Enabled ACPI 2.0 support, enabled Power on by LAN, Full screen logo disabled, Express gate disabled.</p>
<p>I used <a href="http://sourceforge.net/projects/billix/">Billix</a> to boot Ubuntu, shrink the second NTFS partition to 17.2GB, make an ext3 fs (15GB) and the remainder (1.7GB) into  swap, and installed Ubuntu server.  None of this is crucial, but I wanted grub installed, and wanted some swap space, and ubuntu is as good a way of achieving this as any.  Changes to /boot/grub/menu.lst: timeout 15, hiddenmenu, password (), alternative=false, lockold=true, howmany=1, memtest86=false, then run sudo update-grub.  Then add &#8220;title Reboot/nreboot&#8221; as the first option, and &#8220;lock&#8221; to all the remaining options.</p>
<p>I wanted grub because sometimes on warm boot the ethernet interface doesn&#8217;t bring up link, and PXE falls through to the hard drive.  I don&#8217;t know why this is &#8211; it might be a BIOS issue, it might be an incompatibility between my test switch and the b202 &#8211; either way, with grub I can force the machine to reboot and try again, rather than falling through to an unconfigured Windows install.</p>
<p>Verify grub is giving the correct behavior (password within 15 seconds to boot Windows or Ubuntu, otherwise reboot), go back to the BIOS, change the Boot device priority, first: Network boot, second HDD, USB/CDROM disabed, and set a Supervisor password on the BIOS so that it can&#8217;t be modified.  Reboot</p>
<p>When the PXE config text comes up, press Shift F10 to configure, disable the Config message, and set the Show message time to 1 Sec.  Add the MAC of the machine to DHCP/WOL configs, and test.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2009/07/17/opacs-for-hlt-netbooting-webconverger-on-asus-eeebox-b202/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Rails logger available in code normally outside of logger scope</title>
		<link>http://blog.katipo.co.nz/2009/01/24/make-rails-logger-available-in-code-normally-outside-of-logger-scope/</link>
		<comments>http://blog.katipo.co.nz/2009/01/24/make-rails-logger-available-in-code-normally-outside-of-logger-scope/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 23:19:40 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=55</guid>
		<description><![CDATA[Here&#8217;s a quick one.  Say you are debugging a bit of code in a plugin that doesn&#8217;t fall under the Rails app you are working on&#8217;s ActiveSupport context and thus &#8220;logger.debug&#8221; is not available to you.
You could write up your own logging mechanism, with or without using the Logger gem.  However, if what [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick one.  Say you are debugging a bit of code in a plugin that doesn&#8217;t fall under the Rails app you are working on&#8217;s ActiveSupport context and thus &#8220;logger.debug&#8221; is not available to you.</p>
<p>You could write up your own logging mechanism, with or without using the Logger gem.  However, if what you are working on is run by the Rails app and thus has the apps global constants available, you could simply tie it into the existing logger object in the Rails app like so in your file:</p>
<div class="codesnip-container" >logger = RAILS_DEFAULT_LOGGER</div>
<p>Then you can use logger.debug, logger.info, etc. to your heart&#8217;s content.  One caveat, if you are working on a gem or a something more general that won&#8217;t necessarily always be run in the context of Rails, then you will want to pull your use of logger out before distributing your code.  Otherwise you add a dependency on Rails that you may not intend.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2009/01/24/make-rails-logger-available-in-code-normally-outside-of-logger-scope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Gist commands to emacs</title>
		<link>http://blog.katipo.co.nz/2009/01/15/adding-gist-commands-to-emacs/</link>
		<comments>http://blog.katipo.co.nz/2009/01/15/adding-gist-commands-to-emacs/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 20:26:22 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=54</guid>
		<description><![CDATA[You have to give Logical Awesome credit for how much work they do to integrate GitHub&#8217;s services with tools that developers use.
The Gist service is a good example.  First they added command line support for it, then they simultaneously added in-editor support in Textmate, vim, and my own personal favorite emacs.  The blog [...]]]></description>
			<content:encoded><![CDATA[<p>You have to give <a href="http://logicalawesome.com/">Logical Awesome</a> credit for how much work they do to integrate <a href="http://github.com/">GitHub&#8217;s</a> services with tools that developers use.</p>
<p>The <a href="http://gist.github.com/">Gist</a> service is a good example.  First they added command line support for it, then they simultaneously added in-editor support in <a href="http://github.com/blog/233-gist-support-for-textmate">Textmate</a>, <a href="http://github.com/mattn/gist-vim">vim</a>, and my own personal favorite <a href="http://github.com/defunkt/gist.el/tree/master">emacs</a>.  The blog post announcing gist support in emacs and vim is <a href="http://github.com/blog/234-gist-vim-and-gist-el">here</a>.</p>
<p>So how do you add the gist support to emacs?  </p>
<p>First, you&#8217;ll need an account on github.com and have set up your ~/.gitconfig as outlined in <a href="http://github.com/blog/180-local-github-config">here</a>.</p>
<p>Then download or clone the gist.el file from <a href="http://github.com/defunkt/gist.el">http://github.com/defunkt/gist.el</a>, copy only the gist.el file from that repository to someplace in your <a href="http://www.emacswiki.org/emacs/LoadPath">emacs load path</a> (in my case /Users/walter/Library/Preferences/Aquamacs Emacs/ because I use <a href="http://aquamacs.org/">Aquamacs</a> on a Mac), and add a line to your ~/.emacs file or in my case /Users/walter/Library/Preferences/Aquamacs Emacs/Preferences.el that looks like this:</p>
<div class="codesnip-container" >(require &#8216;gist)</div>
<p>Then you have to either restart your emacs program or do M-x load-library and answer prompt with gist for the new gist commands to be available.</p>
<p>Now you have M-x commands like these:</p>
<dl>
<dt>gist-view-gist</dt>
<dd>view gists after they&#8217;re posted</dd>
<dt>gist-region</dt>
<dd>Post the current region as a new paste at gist.github.com<br />
Copies the URL into the kill ring.</dd>
<dt>gist-region-private</dt>
<dd>Post the current region as a new private paste at gist.github.com<br />
Copies the URL into the kill ring.</dd>
<dt>gist-buffer</dt>
<dd>Post the current buffer as a new paste at gist.github.com.<br />
Copies the URL into the kill ring.</dd>
<dt>gist-buffer-private</dt>
<dd>Post the current buffer as a new private paste at gist.github.com.<br />
Copies the URL into the kill ring.</dd>
<dt>gist-region-or-buffer</dt>
<dd>Post either the current region, or if mark is not set, the current buffer as a new paste at gist.github.com<br />
Copies the URL into the kill ring.</dd>
<dt>gist-region-or-buffer-private</dt>
<dd>you can probably guess&#8230;</dd>
<dt>gist-fetch</dt>
<dd>Given an gist id, fetches a Gist and inserts it into a new buffer<br />
If the Gist already exists in a buffer, switches to it.</dd>
</dl>
<p>Very useful stuff for collaboration, but without leaving your editor.</p>
<p>Enjoy,<br />
Walter</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2009/01/15/adding-gist-commands-to-emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;and&#8221; and &#8220;or&#8221; use versus &#8220;&amp;&amp;&#8221; and &#8220;&#124;&#124;&#8221; in ruby</title>
		<link>http://blog.katipo.co.nz/2008/09/09/and-and-or-use-versus-and-in-ruby/</link>
		<comments>http://blog.katipo.co.nz/2008/09/09/and-and-or-use-versus-and-in-ruby/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 22:48:20 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[kete development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=50</guid>
		<description><![CDATA[A natural inclination when one starts programming in Ruby is to use &#8220;and&#8221; and &#8220;or&#8221; instead of the &#8220;&#38;&#38;&#8221; and &#8220;&#124;&#124;&#8221; to increase readability.  However, &#8220;and&#8221; is not a drop in syntactic synonym with &#8220;&#38;&#38;&#8221; and the same goes for &#8220;or&#8221;.
James pointed out a good blog post that explains the issues around order of [...]]]></description>
			<content:encoded><![CDATA[<p>A natural inclination when one starts programming in Ruby is to use &#8220;and&#8221; and &#8220;or&#8221; instead of the &#8220;&amp;&amp;&#8221; and &#8220;||&#8221; to increase readability.  However, &#8220;and&#8221; is not a drop in syntactic synonym with &#8220;&amp;&amp;&#8221; and the same goes for &#8220;or&#8221;.</p>
<p>James pointed out a good blog post that explains the issues around order of precedence with these operators:</p>
<p><a href="http://blog.jayfields.com/2007/08/ruby-operator-precedence-of-and-which.html">http://blog.jayfields.com/2007/08/ruby-operator-precedence-of-and-which.html</a></p>
<p>It&#8217;s worth reading the comments.</p>
<p>It should also be noted that the Ruby on Rails source style guide has a preference for &#8220;&amp;&amp;&#8221; and &#8220;||&#8221;:<br />
<a href="http://rails.lighthouseapp.com/projects/8994/source-style">http://rails.lighthouseapp.com/projects/8994/source-style</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2008/09/09/and-and-or-use-versus-and-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Development Nicety, A Web Browser Inside Aquamacs Emacs</title>
		<link>http://blog.katipo.co.nz/2008/01/14/another-development-nicety-a-web-browser-inside-aquamacs-emacs/</link>
		<comments>http://blog.katipo.co.nz/2008/01/14/another-development-nicety-a-web-browser-inside-aquamacs-emacs/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 23:02:32 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[html/css]]></category>
		<category><![CDATA[kete development]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=41</guid>
		<description><![CDATA[This is handy for reading (or cutting and pasting from) documentation that is in HTML that is included with open source software without jumping to an external browser.  Check it out:
http://bc.tech.coop/blog/080110.html
]]></description>
			<content:encoded><![CDATA[<p>This is handy for reading (or cutting and pasting from) documentation that is in HTML that is included with open source software without jumping to an external browser.  Check it out:</p>
<p><a href="http://bc.tech.coop/blog/080110.html">http://bc.tech.coop/blog/080110.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2008/01/14/another-development-nicety-a-web-browser-inside-aquamacs-emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How much disk space does your Rails Database use?</title>
		<link>http://blog.katipo.co.nz/2007/10/14/how-much-disk-space-does-your-rails-database-use/</link>
		<comments>http://blog.katipo.co.nz/2007/10/14/how-much-disk-space-does-your-rails-database-use/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 22:26:48 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[kete development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=40</guid>
		<description><![CDATA[The other day I was asked how much disk space a particular Kete project&#8217;s production database used.  I didn&#8217;t have an answer, so I started searching for one.
In my case, the db software is MySQL and getting a report about various aspects of a db&#8217;s tables boils down to this query:
show table status;
The output [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was asked how much disk space a particular Kete project&#8217;s production database used.  I didn&#8217;t have an answer, so I started searching for one.</p>
<p>In my case, the db software is MySQL and getting a report about various aspects of a db&#8217;s tables boils down to this query:</p>
<div class="codesnip-container" >show table status;</div>
<p>The output of this query has way more information than I need, plus to get the total number of bytes used you have to add all the values up anyway, so I decided to make a rake task to make this repeatable and return something succinct.</p>
<p>I have added the new rake task to the Kete app&#8217;s codebase.  If you aren&#8217;t a Kete user, but need this functionality for your Ruby on Rails app, you can find it here:</p>
<p><a href="http://svn.kete.net.nz/projects/kete/trunk/lib/tasks/db-disk-usage-report.rake">http://svn.kete.net.nz/projects/kete/trunk/lib/tasks/db-disk-usage-report.rake</a></p>
<p>Note there is a formatting method taken from the Rails Helpers, I would love to not duplicate this definition.  If anyone has a recommendation for the best way to pull this method into this rake task, I would appreciate it.  Probably a simple include statement, but I didn&#8217;t get around to figuring out the correct incantation.</p>
<p>I would also love to hear how best to make this handle other database software, for example PostgreSQL, too.</p>
<p>Cheers,<br />
Walter</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2007/10/14/how-much-disk-space-does-your-rails-database-use/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Server Setup and Deployment for Rails using Capistrano, Mongrel, and Nginx using Mac OS X for Development and Debian Etch for Production</title>
		<link>http://blog.katipo.co.nz/2007/10/14/server-setup-and-deployment-for-rails-using-capistrano-mongrel-and-nginx-using-mac-os-x-for-development-and-debian-etch-for-production/</link>
		<comments>http://blog.katipo.co.nz/2007/10/14/server-setup-and-deployment-for-rails-using-capistrano-mongrel-and-nginx-using-mac-os-x-for-development-and-debian-etch-for-production/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 22:12:44 +0000</pubDate>
		<dc:creator>walter</dc:creator>
				<category><![CDATA[kete development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.katipo.co.nz/?p=30</guid>
		<description><![CDATA[As previously mentioned, I have written a guide on how to set up Kete (also applicable to other Rails apps though Kete includes some extra required software and niceties to make it easier) for Development on Mac OS X.  This guide also includes best practices for Deployment.  So the following guide can be [...]]]></description>
			<content:encoded><![CDATA[<p>As previously mentioned, I have written a guide on how to set up Kete (also applicable to other Rails apps though Kete includes some extra required software and niceties to make it easier) for Development on Mac OS X.  This guide also includes best practices for Deployment.  So the following guide can be seen as the first half of the story:</p>
<p><a href="http://kete.net.nz/documentation/topics/show/16-creating-a-kete-development-environment-on-mac-os-x">http://kete.net.nz/documentation/topics/show/16-creating-a-kete-development-environment-on-mac-os-x</a></p>
<p>But what about the host that you are deploying to?  I cover that for Debian Etch in the following guide:</p>
<p><a href="http://kete.net.nz/documentation/topics/show/15-preparing-a-debian-etch-host-to-be-deployed-to-for-kete">http://kete.net.nz/documentation/topics/show/15-preparing-a-debian-etch-host-to-be-deployed-to-for-kete</a></p>
<p>You might also be curious what software Kete requires.  Here&#8217;s a breakdown:</p>
<p><a href="http://kete.net.nz/documentation/topics/show/19-technical-requirements">http://kete.net.nz/documentation/topics/show/19-technical-requirements</a></p>
<p>Cheers,<br />
Walter</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.katipo.co.nz/2007/10/14/server-setup-and-deployment-for-rails-using-capistrano-mongrel-and-nginx-using-mac-os-x-for-development-and-debian-etch-for-production/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
