<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="0.92">
<channel>
	<title>The Captain's Log</title>
	<link>http://jamie.homelinux.org</link>
	<description>Biometrics, Signal Processing, Photography and other stuff I'm interested in.</description>
	<lastBuildDate>Sun, 15 Nov 2009 23:37:14 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Bash using ruby for min and max</title>
		<description>
alias min='ruby -e "ARGF.select{&#124;e&#124; e =~ /^[+-]?\d+[.]?\d*/ }.map{&#124;e&#124; e.to_f }.min"'
alias max='ruby -e "ARGF.select{&#124;e&#124; e =~ /^[+-]?\d+[.]?\d*/ }.map{&#124;e&#124; e.to_f }.max"'


Then you can simply do 
 
[user@host]# echo "1" >> numbers.txt
[user@host]# echo "5" >> numbers.txt
[user@host]# cat numbers.txt &#124; min
1


 </description>
		<link>http://jamie.homelinux.org/bash-using-ruby-for-min-and-max/</link>
			</item>
	<item>
		<title>Changing the font in Windows command prompt</title>
		<description>Should be easy but it's not... like some pretty basic things in windows this one actually requires a registry edit in order to use the fonts that are already installed on your system for your command prompt. 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont

There you will see a string value (0 => "Lucida Console") or ...</description>
		<link>http://jamie.homelinux.org/changing-the-font-in-windows-command-prompt/</link>
			</item>
	<item>
		<title>New PT assignment</title>
		<description>This one is for no one else but me :)

model.assignment_parameters_override = {"pt_assignment_config" => "new"}.to_yaml </description>
		<link>http://jamie.homelinux.org/new-pt-assignment/</link>
			</item>
	<item>
		<title>Boost tokenize for the win</title>
		<description>String manipulation has historically been a major shortfalling of the C++ language, or at least it was until boost came along. Something as simple as spliting a string up on a delimeter is now made so much easier thanks to the boost::tokenizer and boost string algorithms. 


#include &#60;iostream&#62;
#include &#60;string&#62;
#include &#60;boost/foreach.hpp&#62;
#include ...</description>
		<link>http://jamie.homelinux.org/boost-tokenize-for-the-win/</link>
			</item>
	<item>
		<title>Linux fstab and UUIDs</title>
		<description>When I upgraded to Ubuntu Intrepid Ibex I installed it clean on a new harddrive that I installed alongside my old Hardy hard drive (that was totally unintentional - but hilarious). I then mounted the old hard drive, which was much bigger, via fstab so that I could have access ...</description>
		<link>http://jamie.homelinux.org/linux-fstab-and-uuids/</link>
			</item>
	<item>
		<title>SVN command line</title>
		<description>Have been wondering for a while now how to force the svn command line to resolve conflicts, didn't really see anything on google until I came across this: http://svnbook.red-bean.com/en/1.5/svn.ref.svn.html

Turns out there is a standard switch which I hadn't found! The accept switch "specifies an action for automatic conflict resolution. Possible ...</description>
		<link>http://jamie.homelinux.org/svn-command-line/</link>
			</item>
	<item>
		<title>Ruby operator precedence of &#8216;&#038;&#038;&#8217; and &#8216;and&#8217;</title>
		<description>Wow that a heck of a post title isn't it... well the up shoot of this post is to point out the non-intuitive (to me anyway) difference in the precedence of the two AND operators in ruby. The operator '&&' has a much higher precedence than 'and', more importantly 'and' ...</description>
		<link>http://jamie.homelinux.org/ruby-operator-precedence-of-and-and/</link>
			</item>
	<item>
		<title>Debugging ruby backticks</title>
		<description>Stolen from Dale's blog... reposted here for my own reference. Also this link is good for a reference on executing shell commands from ruby.


I needed to knock up a Ruby script recently that orchestrated some external processes using backticks. However something was going wrong and I need to temporarily peek ...</description>
		<link>http://jamie.homelinux.org/debugging-ruby-backticks/</link>
			</item>
	<item>
		<title>SVN undelete of a directory</title>
		<description>Somewhere way back in the history of our project someone (read Partro) decided that we didn’t need a pesky little data folder anymore and decided that it should be deleted. Turns out he was pretty much right because it wasn’t until about 200 revisions later that I noted its absence, ...</description>
		<link>http://jamie.homelinux.org/svn-undelete-of-a-directory-2/</link>
			</item>
	<item>
		<title>Ruby file loading</title>
		<description>Just coz I always forget them, three good ways to load files into memory in ruby

File.open(filename, 'r') do &#124;f&#124; f.readlines end
IO.readlines(filename).each do &#124;line&#124; end
lines = IO.read(filename).split("\n")


thanks to Partro for the outline along with the following three points 

File.open gives you a file handle you can stream from
while the IO methods ...</description>
		<link>http://jamie.homelinux.org/ruby-file-loading/</link>
			</item>
</channel>
</rss>
