<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2575587491339768572</id><updated>2012-01-25T11:34:01.586+08:00</updated><category term='linux'/><category term='ruby'/><category term='facebook'/><category term='java'/><category term='osx google chrome javascript'/><category term='REST'/><category term='global it creations'/><category term='macbook pro'/><category term='howto'/><category term='apple'/><category term='etiquette'/><category term='gym'/><category term='goals'/><category term='privacy'/><category term='michca'/><category term='curl'/><category term='SOA'/><category term='osx'/><category term='censorship'/><category term='OSS'/><category term='firefox'/><category term='iphone'/><category term='passenger'/><category term='exploits'/><category term='gem'/><category term='nginx'/><category term='twitter'/><category term='rails'/><category term='debian'/><category term='memcached'/><category term='gist'/><category term='singapore'/><category term='tdd'/><category term='code'/><category term='j2ee'/><title type='text'>Wandering Coder</title><subtitle type='html'>Code, aimless meanderings and occasional outbursts from an Australian expatriate living in Singapore.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>31</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-4265079045462094125</id><published>2012-01-25T11:34:00.000+08:00</published><updated>2012-01-25T11:34:01.594+08:00</updated><title type='text'>Bundler invalid byte sequence</title><content type='html'>Running "bundle install" today gave me...&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ArgumentError: invalid byte sequence in US-ASCII&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Normally I use Terminal.app but I recently switched to iTerm as I'm finding it is quite a bit faster, so this little issue caught me out. iTerm doesn't enable UTF-8 by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Adding this to ~/.bash_profile will set it no matter what terminal app you're using.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;export LANG=en_US.UTF-8&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;export LC_ALL=en_US.UTF-8&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-4265079045462094125?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/4265079045462094125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=4265079045462094125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4265079045462094125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4265079045462094125'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2012/01/bundler-invalid-byte-sequence.html' title='Bundler invalid byte sequence'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-2383900263251894465</id><published>2011-08-08T19:43:00.001+08:00</published><updated>2011-08-08T19:44:23.683+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='osx google chrome javascript'/><title type='text'>Angry Birds Not Working On OSX</title><content type='html'>&lt;div&gt;I noticed a month or so ago that the online version of &lt;a href="http://chrome.angrybirds.com/"&gt;Angry Birds&lt;/a&gt; &amp;nbsp;has stopped working. That is a bit of a shame, I really enjoyed it.&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;So out of curiosity I took a peek at the Javascript console for some clues as to why it doesn't work. Ah, ok. 31 errors. The first one is.&lt;/div&gt;&lt;br /&gt;
&lt;pre&gt;XMLHttpRequest cannot load http://r2303.latest.project-slingshot-hr.appspot.com/cors/fowl/sprite_sheets/INGAME_BIRDS.json. Origin http://chrome.angrybirds.com is not allowed by Access-Control-Allow-Origin.&lt;/pre&gt;&lt;br /&gt;
&lt;div&gt;Ah, that old chestnut. Origin is not allowed by Access-Control-Allow-Origin. Basically the game resources aren't being loaded. Simple.&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;So it looks like I'll have to continue being productive rather than feeding my time to the birds until someone updates the crossdomain.xml file which is currently a 404.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-2383900263251894465?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/2383900263251894465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=2383900263251894465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2383900263251894465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2383900263251894465'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2011/08/angry-birds-not-working-on-osx.html' title='Angry Birds Not Working On OSX'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-2585195282664392829</id><published>2010-07-08T12:24:00.002+08:00</published><updated>2010-07-13T12:57:00.351+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>Rolling Back iPhone iOS4 to iPhone iOS3</title><content type='html'>&lt;p&gt;Installing iPhone iOS4 on my iPhone 3G and it was a big mistake for me. My iPhone instantly changed from a lovely, responsive device, to one that was taking 15-20 seconds to start up the SMS or Mail applications.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;The list of issues I had with iOS4 was long and uncomfortable enough to force me into deciding to rollback to iOS3.&lt;/p&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Slow to start applications&lt;/li&gt;
&lt;li&gt;Applications are generally slow and unresponsive&lt;/li&gt;
&lt;li&gt;Camera app was slow to start, and slow to take a picture&lt;/li&gt;
&lt;li&gt;3G network access became unreliable&lt;/li&gt;
&lt;li&gt;Lockups and freezing requiring restarts&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;p&gt;It was slow and buggy enough that I hated using my phone at all. I didn't get this phone to become the owner of a useless brick.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Waiting for the first update to iOS4 seemed like a lame idea. Who knows how many of the issues would be addressed anyway?&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;iTunes won't directly allow you to rollback to a previous OS just by choosing a backup that was on that OS version. It doesn't downgrade the operating system, it only restores the data.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Trying to restore an earlier firmware explicitly in iTunes got close, but also failed.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;It turns out there is one more step needed to make the rollback work... &lt;a href="http://www.sebby.net/443-recboot-final-release/"&gt;RecBoot&lt;/a&gt;. &lt;a href="http://twitter.com/pjammer"&gt;@pjammer&lt;/a&gt; sent me a link to a &lt;a href="http://www.youtube.com/watch?v=XWDbOhnPlR8"&gt;YouTube video&lt;/a&gt; showing how to rollback to iOS3, which worked a treat.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;After restoring the earlier firmware you will receive an error message telling you the OS could not be restored and you should choose one of your backups to restore from. Running &lt;a href="http://www.sebby.net/443-recboot-final-release/"&gt;RecBoot&lt;/a&gt; at this point in time allows you to take you phone out of recovery mode.... to find the firmware of your choice running.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;You can then restore your data or setup for a new phone.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Victory!&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Guess what? My iPhone 3G is fast again. I'll be researching very cautiously before attempting another upgrade to iOS4.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-2585195282664392829?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/2585195282664392829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=2585195282664392829' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2585195282664392829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2585195282664392829'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2010/07/rolling-back-iphone-ios4-to-iphone-ios3.html' title='Rolling Back iPhone iOS4 to iPhone iOS3'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-6712378298757399691</id><published>2010-06-30T10:29:00.004+08:00</published><updated>2010-09-11T08:46:26.672+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Installing Postgres gem on Snow Leopard</title><content type='html'>&lt;p&gt;I had to jump through a small hoop to install the postgres gem on Snow Leopard so I'm putting it here to help others out. Hopefully it saves you some time.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Basic System&lt;/h2&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Ruby 1.8.7&lt;/li&gt;
&lt;li&gt;Macports&lt;/li&gt;
&lt;li&gt;OSX 10.6 (Snow Leopard)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h2&gt;Install Postgresql&lt;/h2&gt;&lt;br /&gt;
&lt;pre&gt;# sudo port install postgresql84-server
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Install the Postgres Gem&lt;/h2&gt;&lt;br /&gt;
&lt;pre&gt;# sudo env ARCHFLAGS="-arch x86_64" gem install postgres -- --with-pgsql-lib=/opt/local/lib/postgresql84 --with-pgsql-include=/opt/local/include/postgresql84
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-6712378298757399691?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/6712378298757399691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=6712378298757399691' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/6712378298757399691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/6712378298757399691'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2010/06/installing-postgres-gem-on-snow-leopard.html' title='Installing Postgres gem on Snow Leopard'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-3760803816786650141</id><published>2010-05-08T17:12:00.000+08:00</published><updated>2010-05-08T17:12:11.248+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gym'/><category scheme='http://www.blogger.com/atom/ns#' term='etiquette'/><title type='text'>Basic Gym Etiquette Is Cool</title><content type='html'>&lt;p&gt;There is some basic gym etiquette that most people understand and follow without ever being told, or even without thinking about it. These people probably fit very easily into life and society in general without much effort. They're easy to get along with, considerate, clean and polite. Everybody loves them.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Then there are those other gym users. You might know the ones I mean. The inconsiderate, dirty, and loud gym users.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;This stuff is common sense but apparently not everyone has enough to spare, so here it goes...&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Wipe Down Equipment&lt;/h2&gt;&lt;br /&gt;
&lt;p&gt;Nothing... &lt;em&gt;I repeat, "Nothing"...&lt;/em&gt; is more revolting than going to use a bench that is covered with someones sweat. So the next user of the equipment is expected to use their towel to wipe off that 10 litres of sweat? What the hell is wrong with you!? Wipe it down when you're done.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;There are signs everywhere about this at any gym, but I don't think the offenders in question care.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Wipe down equipment after you use it. It takes about 2 seconds. If you don't you're a pig.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Put Equipment Back&lt;/h2&gt;&lt;br /&gt;
&lt;p&gt;You got the weights of the rack. You used them. Then you just walked away. You're not a very nice member of the Gym world are you?&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I'm not your Mama! Put your own damn weights back where they belong. I know you just lifted a personal best. Awesome. I'm sore and tired too. Why should I put them back for you?&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;A lovely side effect of everyone putting equipment back after use is that everyone can find it easily. Bonus!&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Share Equipment&lt;/h2&gt;&lt;br /&gt;
&lt;p&gt;Nothing is more annoying than someone commandeering a piece of equipment for a long period of time. If you're going to be using something for quite a while the least you can do is get on, do your thing, then stand aside a moment. This makes it easy for others to approach you and ask if you mind if they "cut in" for a set.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Phone Calls&lt;/h2&gt;&lt;br /&gt;
&lt;p&gt;This point deserves a post all for itself!&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Do you really think everyone in the gym wants to listen to your marathon phone call? Walk away from the equipement, go and find somewhere away from everyone. Talk your ass off as loud as you want there.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Don't Throw Your Weights&lt;/h2&gt;&lt;br /&gt;
&lt;p&gt;We all know how awesome and powerful you are. Your strength makes me quiver. But do you need to drop your weights from as high as possible?&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;We all know you rock even if you just put the weights down.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Clean Gym Attire&lt;/h2&gt;&lt;br /&gt;
&lt;p&gt;Don't turn up to the gym in the same gear that is still soaking wet from your last workout.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;My favourite gym member is the one that sits on a bench, sweating like a pig with no towel in sight, totally surrounded by the 5 different sets of dumbells they've been using while talking on the phone the one of their mates about the awesome babe they almost picked up Friday night. You're a filthy pig. I doubt you were going to pickup either.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Is any of this that hard?&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I would love to see the trainers that walk around the gym pull people up for breaking etiquette but they won't for fear of upsetting a paying member. What about the majority of gym users that have to train in the same gym as the above mentioned gym users? That's the majority of your paying customers. Look after them.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-3760803816786650141?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/3760803816786650141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=3760803816786650141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3760803816786650141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3760803816786650141'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2010/05/basic-gym-etiquette-is-cool.html' title='Basic Gym Etiquette Is Cool'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-8350714607920188237</id><published>2010-04-26T12:11:00.001+08:00</published><updated>2010-04-26T12:12:45.861+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='michca'/><title type='text'>Mishca's Mothers En Vogue Photoshoot</title><content type='html'>Mishca had a photoshoot for Mothers En Vogue on Nov 25th 2009.&lt;br /&gt;
&lt;br /&gt;
She went &lt;b&gt;really&lt;/b&gt; well considering she was such a shy little girl just a few months ago :)&lt;br /&gt;
&lt;br /&gt;
Well done Mishca!&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://lh6.ggpht.com/_qf9d_8wjB0c/S0WE66W1xvI/AAAAAAAAAWk/zKdi4nSUSi4/s1600/22437.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh6.ggpht.com/_qf9d_8wjB0c/S0WE66W1xvI/AAAAAAAAAWk/zKdi4nSUSi4/s320/22437.jpg" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/_qf9d_8wjB0c/S0WFA1BYm2I/AAAAAAAAAWs/eSak8LQdF5U/s1600/22446.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh5.ggpht.com/_qf9d_8wjB0c/S0WFA1BYm2I/AAAAAAAAAWs/eSak8LQdF5U/s320/22446.jpg" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/_qf9d_8wjB0c/S0WFG7ZZZ0I/AAAAAAAAAW0/pimGtTaA3PA/s1600/22449.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh6.ggpht.com/_qf9d_8wjB0c/S0WFG7ZZZ0I/AAAAAAAAAW0/pimGtTaA3PA/s320/22449.jpg" /&gt;&lt;/a&gt;&lt;a href="http://lh4.ggpht.com/_qf9d_8wjB0c/S0WFL5XL3RI/AAAAAAAAAW4/6e4PDXXNyBw/s1600/22474.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh4.ggpht.com/_qf9d_8wjB0c/S0WFL5XL3RI/AAAAAAAAAW4/6e4PDXXNyBw/s320/22474.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://lh4.ggpht.com/_qf9d_8wjB0c/S0WFL5XL3RI/AAAAAAAAAW4/6e4PDXXNyBw/s1600/22474.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/_qf9d_8wjB0c/S0WFQcnLARI/AAAAAAAAAW8/VBD86Kot1Xc/s1600/22402.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh6.ggpht.com/_qf9d_8wjB0c/S0WFQcnLARI/AAAAAAAAAW8/VBD86Kot1Xc/s320/22402.jpg" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/_qf9d_8wjB0c/S0WFU34EN8I/AAAAAAAAAXE/0Xb9Dv45ck0/s1600/22427.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh5.ggpht.com/_qf9d_8wjB0c/S0WFU34EN8I/AAAAAAAAAXE/0Xb9Dv45ck0/s320/22427.jpg" /&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/_qf9d_8wjB0c/S0WFakAHIGI/AAAAAAAAAXI/w6JOOmorL6A/s1600/22432.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://lh3.ggpht.com/_qf9d_8wjB0c/S0WFakAHIGI/AAAAAAAAAXI/w6JOOmorL6A/s320/22432.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-8350714607920188237?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/8350714607920188237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=8350714607920188237' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/8350714607920188237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/8350714607920188237'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2010/04/mishcas-mothers-en-vogue-photoshoot.html' title='Mishca&apos;s Mothers En Vogue Photoshoot'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_qf9d_8wjB0c/S0WE66W1xvI/AAAAAAAAAWk/zKdi4nSUSi4/s72-c/22437.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-5718397994574305279</id><published>2010-04-25T13:52:00.013+08:00</published><updated>2010-04-25T14:30:22.197+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='facebook'/><category scheme='http://www.blogger.com/atom/ns#' term='privacy'/><title type='text'>Facebook Makes More Of Your Data Available Again</title><content type='html'>&lt;p&gt;&lt;a href="http://facebook.com/"&gt;Facebook&lt;/a&gt; is once again making more of your data available without your 
  permission.&lt;/p&gt;

&lt;p&gt;I was very disappointed to see that I was suddenly opt-ed in to basically
sharing everything about me, and allowing my friends to also share this
information about me. I &lt;strong&gt;never&lt;/strong&gt; gave my
explicit permission to do this. I'm sure it is entirely
covered by their Terms and Conditions.&lt;/p&gt;

&lt;p&gt;At a minimum, Facebook
should have asked users what their preference was, but chose not to do so.
This is an extremely deceptive practice, somewhat similar to lying by
omission.&lt;/p&gt;

&lt;p&gt;Yes, I am aware I can change the settings. I also know most people won't
because they don't care, are too lazy, or just do not understand how much they
are &amp;quot;sharing&amp;quot;.&lt;/p&gt;

&lt;p&gt;I also &lt;em&gt;love&lt;/em&gt; how giving away your personal information is
called &amp;quot;sharing&amp;quot; now. How very, &amp;quot;&lt;a
href="http://en.wikipedia.org/wiki/Doublespeak"&gt;double-speak&lt;/a&gt;&amp;quot; of 
Facebook. To be fair Facebook aren't the only social networks that shares
you information to their partners.&lt;/p&gt;

&lt;p&gt;As an individual that still has dreams of privacy  I simply
do not like where this is going. I was hesitant about joining
Facebook to begin with because I could see the depth the data that would allow
information seekers to build very detailed profiles on each of us. I even
deactivated my Facebook account once before giving in and re-activating
it.&lt;p&gt;
  
&lt;p&gt;So, I'll announce it to the world...&lt;/p&gt;

&lt;p&gt;
  I will be deleting my account on or before 25 May 2010, using Facebook's 
  &lt;a href="https://ssl.facebook.com/help/contact.php?show_form=delete_account"&gt;Delete my Account&lt;/a&gt; page.
&lt;/p&gt;

&lt;p&gt;Deep down I am not at all
surprised by the direction Facebook is going with this. My lack of surprise
also reminds me that although I was quite sure it would get to this point it
was a stupid decision ever choosing to believe it could would have been any
different.&lt;/p&gt;

&lt;p&gt;Bye bye Facebook. It has been... educational.&lt;/p&gt;

&lt;p&gt;Links&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;a href="http://yro.slashdot.org/story/10/04/24/1222210/Facebook-Retroactively-Makes-More-User-Data-Public"&gt;http://yro.slashdot.org/story/10/04/24/1222210/Facebook-Retroactively-Makes-More-User-Data-Public&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href="http://news.cnet.com/8301-31322_3-20003185-256.html"&gt;http://news.cnet.com/8301-31322_3-20003185-256.html&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href="http://www.eff.org/deeplinks/2010/04/facebook-further-reduces-control-over-personal-information"&gt;http://www.eff.org/deeplinks/2010/04/facebook-further-reduces-control-over-personal-information&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-5718397994574305279?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/5718397994574305279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=5718397994574305279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/5718397994574305279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/5718397994574305279'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2010/04/facebook-makes-more-of-your-data.html' title='Facebook Makes More Of Your Data Available Again'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-3954794520536421885</id><published>2010-01-18T10:40:00.014+08:00</published><updated>2010-02-03T10:07:54.537+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='howto'/><category scheme='http://www.blogger.com/atom/ns#' term='gist'/><title type='text'>Howto Install Ruby 1.8 and RubyGems from source on Debian</title><content type='html'>&lt;p&gt;In the latest addition to the, "Howto Install stuff from Source on 
  Debian", series, this post shows how to install 
  &lt;a href="http://ruby-lang.org/"&gt;Ruby 1.8&lt;/a&gt; and 
  &lt;a href="http://rubyforge.org/projects/rubygems/"&gt;RubyGems&lt;/a&gt; from 
  source on Debian.&lt;/p&gt;

&lt;p&gt;This installation has been tested out successfully on 
&lt;a href="http://www.debian.org/releases/lenny/"&gt;Debian Lenny&lt;/a&gt;, 
and &lt;a href="http://www.debian.org/releases/etch/"&gt;Debian Etch&lt;/a&gt;. It should
also work on &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Permissions&lt;/h2&gt;

&lt;p&gt;As noted in my 
  &lt;a href="/2010/01/install-nginx-from-source-on-debian.html"&gt;last post&lt;/a&gt;, 
  my user has write permissions to /usr/local/src so I don'thave to run 
  everything under sudo. This was accomplished by allowing the staff group
  to write to /usr/local/src , giving write access to the staff group, and 
  adding my user to the "staff" group.&lt;/p&gt;

&lt;p&gt;If you would like to set this up...&lt;/p&gt;

&lt;pre&gt;
# sudo chown root:staff /usr/local/src
# sudo chmod 775 /usr/local/src
# sudo usermod -a -G staff your_username
&lt;/pre&gt;

&lt;p&gt;If you were not previously a member of the staff group you will need
  to logout and login again, or just open a new shell, for the changes to 
  take effect.&lt;/p&gt;

&lt;h2&gt;Install&lt;/h2&gt;

&lt;p&gt;A browser friendly version of the script can be seen at 
  &lt;a href="http://gist.github.com/271029"&gt;http://gist.github.com/271029&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once again, I've leveraged &lt;a href="http://gist.github.com/"&gt;gist&lt;/a&gt; as
  a tool to store my installation scripts.&lt;/p&gt;

&lt;p&gt;The script is just a wrapper to install the necessary Debian 
  packages. This script then downloads a second script which actually 
  downloads, configures, and install Ruby 1.8 and RubGems.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Not only is &lt;a href="http://gist.github.com/"&gt;gist&lt;/a&gt; a very useful
  tool, but I've also found &lt;a href="http://github.com/"&gt;GitHub&lt;/a&gt; to be 
  an excellent online git repository.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The scripts use the "Raw" versions of the gists.&lt;/p&gt;

&lt;p&gt;To install, run these commands...&lt;/p&gt;

&lt;pre&gt;
# wget http://gist.github.com/raw/271029/d16c8acf620047b88e509ccab205959681fd443d/install_ruby18_on_debian.sh
# chmod a+x ./install_ruby18_on_debian.sh
# ./install_ruby18_on_debian.sh
&lt;/pre&gt;

&lt;p&gt;If all goes well, Ruby and RubyGems will have been installed.&lt;/p&gt;

&lt;pre&gt;
# which ruby
/usr/local/bin/ruby

# ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]

# which gem
/usr/local/bin/gem

# gem -v
1.3.5
&lt;/pre&gt;

&lt;p&gt;Enjoy &lt;a href="http://ruby-lang.org/"&gt;Ruby&lt;/a&gt;!&lt;/p&gt;

&lt;h2&gt;Other Posts in this Series&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="/2009/12/install-memcached-from-source-on-debian.html"&gt;Install Memcached from source on Debian Lenny&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="/2010/01/install-nginx-from-source-on-debian.html"&gt;Install Nginx from source on Debian&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-3954794520536421885?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/3954794520536421885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=3954794520536421885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3954794520536421885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3954794520536421885'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2010/01/howto-install-ruby-18-and-rubygems-from.html' title='Howto Install Ruby 1.8 and RubyGems from source on Debian'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-7416215749488302792</id><published>2010-01-15T21:40:00.013+08:00</published><updated>2010-04-25T19:33:41.444+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='howto'/><category scheme='http://www.blogger.com/atom/ns#' term='nginx'/><category scheme='http://www.blogger.com/atom/ns#' term='gist'/><title type='text'>Install Nginx from source on Debian</title><content type='html'>&lt;p&gt;I thought it was time to write a followup post to,    &lt;a href="http://scottbarr.blogspot.com/2009/12/install-memcached-from-source-on-debian.html"&gt;Install Memcached from source on Debian Lenny&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;At this moment, Debian provides Nginx 0.6.39 and I was wanting to run    Nginx 0.7. &lt;a href="http://nginx.org/en/download.html"&gt;The latest stable version&lt;/a&gt; is 0.7.64, so I thought I would put   together a script to automate the download and installation for me.&lt;/p&gt;&lt;p&gt;Some devoted Debian users will want to string me up for installing a    source package, and some others will no doubt say that I'm hating Debian for not using aptitude. These    people are entitled to their opinion of course, but I don't feel that there    is anything wrong with installing a source package on Debian.&lt;/p&gt;&lt;p&gt;If you feel like installing a package from source makes Debian cry, leave    now :)&lt;/p&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Permissions&lt;/h2&gt;&lt;p&gt;On my system, my user has write permissions to /usr/local/src so I don't    have to run everything under sudo.&lt;/p&gt;&lt;p&gt;You may need to set permissions for your system.&lt;/p&gt;&lt;h2&gt;Install&lt;/h2&gt;&lt;p&gt;A browser friendly version of the script can be seen at    &lt;a href="http://gist.github.com/274883"&gt;http://gist.github.com/274883&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;This script should work on Debian Lenny, and Debian Etch. I &lt;em&gt;think&lt;/em&gt; it would also work on Ubuntu.&lt;/p&gt;&lt;p&gt;By the way, I've found gists to be an excellent tool when automating    source installs. Using gists makes it wasy to put any kind of script up   on the net, as well as supporting config files as so on.&lt;/p&gt;&lt;p&gt;There is a link on that page to the "Raw" version of the script, which the script below will download and execute.&lt;/p&gt;&lt;div&gt;  &lt;img src="http://lh4.ggpht.com/_qf9d_8wjB0c/S1CCsE3r5II/AAAAAAAAAYI/cperDCWwY58/gist_274883.jpg" alt="Gist Screenshot"/&gt; &lt;/div&gt;&lt;p&gt;To install, run this command...&lt;/p&gt;&lt;pre&gt;# bash -c "`curl http://gist.github.com/raw/274883/e93ec7c38b303b759699e1023c8f6d2e60c93351/install_nginx_on_debian.sh`"
&lt;/pre&gt;&lt;p&gt;If all goes well, Nginx has been installed, started up, and set to start automatically at boot.&lt;/p&gt;You can verify Nginx is running...  &lt;pre&gt;# ps -p `cat /var/run/nginx.pid`
  PID TTY          TIME CMD
15004 ?        00:00:00 nginx
&lt;/pre&gt;&lt;p&gt;Check that Nginx has been set to start at system boot.&lt;/p&gt;&lt;pre&gt;# sudo sysv-rc-conf --list nginx
nginx        0:off 1:off 2:on 3:on 4:on 5:on 6:off
&lt;/pre&gt;&lt;p&gt;I'd love to hear if this was useful to you.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-7416215749488302792?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/7416215749488302792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=7416215749488302792' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/7416215749488302792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/7416215749488302792'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2010/01/install-nginx-from-source-on-debian.html' title='Install Nginx from source on Debian'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_qf9d_8wjB0c/S1CCsE3r5II/AAAAAAAAAYI/cperDCWwY58/s72-c/gist_274883.jpg' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-3216807334174513256</id><published>2009-12-14T16:22:00.014+08:00</published><updated>2010-04-25T19:35:13.777+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='memcached'/><category scheme='http://www.blogger.com/atom/ns#' term='howto'/><category scheme='http://www.blogger.com/atom/ns#' term='gist'/><title type='text'>Install Memcached from source on Debian Lenny</title><content type='html'>&lt;p&gt;Debian is quite simply excellent, and I wouldn't even consider running any other distro in production anymore. &lt;/p&gt;&lt;p&gt;Occasionally though, there are packages that become a bit outdated, and a source install is needed.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;For me, Memcached is one of those packages. The latest in the Debian Lenny Apt repositories is 1.2.2, but the latest stable build is actually 1.4.4. Good luck seeing that in the stable apt repositories anytime soon :)&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;So, to make life easy, I've put together a fairly simple bash script that downloads and installs Memcached, and libevent, for you.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The script is a blunt instrument, and assumes...&lt;/p&gt;&lt;ol&gt;&lt;li&gt;You haven't installed memcached from apt repositories on this machine&lt;/li&gt;
&lt;li&gt;You won't be sad when it puts config and startup files at     &lt;ul&gt;&lt;li&gt;/etc/memcached.conf&lt;/li&gt;
&lt;li&gt;/etc/init.d/memcached&lt;/li&gt;
&lt;li&gt;/usr/share/memcached/scripts/start-memcached&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;If you have installed memcached using apt, I suggest uninstalling it first, and backup the 3 config files.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This script has worked for me with Debian Lenny, and Debian Etch.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://gist.github.com/255875"&gt;Download the installation script&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;I would love to hear if this works for you :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-3216807334174513256?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/3216807334174513256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=3216807334174513256' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3216807334174513256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3216807334174513256'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/12/install-memcached-from-source-on-debian.html' title='Install Memcached from source on Debian Lenny'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-654976068076506543</id><published>2009-12-10T11:35:00.001+08:00</published><updated>2009-12-10T11:35:54.329+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='nginx'/><category scheme='http://www.blogger.com/atom/ns#' term='passenger'/><title type='text'>Fix POST for Ruby 1.9.1 and Passenger</title><content type='html'>&lt;p&gt;How exciting! A new Ruby release to play with.&lt;/p&gt;
&lt;p&gt;I figured it was time to migrate this particular app to 1.9.1 on the integration server. We've been developing this app with 1.9 and all looks good.&lt;/p&gt;
&lt;p&gt;So I...&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Upgraded Nginx to version 0.7.64&lt;/li&gt;
  &lt;li&gt;Installed Ruby 1.9.1-p376&lt;/li&gt;
  &lt;li&gt;Installed Passenger 2.2.7&lt;/li&gt;
  &lt;li&gt;Configured Nginx to use the new versions of Ruby and Passenger&lt;/li&gt;
  &lt;li&gt;... and restarted Nginx&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hit the home page of the app.... Sweet, it works! Yay!&lt;/p&gt;
&lt;p&gt;At this point I did a minor happy dance. Nothing over the top, you know... just a little wiggle :)&lt;/p&gt;
&lt;p&gt;Then I tried to login to the app... "500 Internal Server Error"&lt;/p&gt;
&lt;p&gt;Oh. :(&lt;/p&gt;
&lt;p&gt;I stopped dancing right there.&lt;/p&gt;
&lt;p&gt;It turns out that POST requests fail for Ruby 1.9.1 and Passenger.&lt;/p&gt;
&lt;p&gt;Fortunately, &lt;a href="http://stackoverflow.com/questions/1627582/ruby-1-9-1-p234-passenger-2-2-5-rails-2-3-stable-closed-stream-on-post-request/1671305#1671305"&gt;there is a patch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Patching tempfile.rb did the trick. On that particular machine, tempfile.rb was located at /usr/local/lib/ruby19/1.9.1/tempfile.rb&lt;/p&gt;
&lt;p&gt;Thanks to &lt;a href="http://frozenplague.net/"&gt;Ryan Bigg&lt;/a&gt; for &lt;a href="http://frozenplague.net/2009/12/ruby-1-9-1-friends-11-months-on/"&gt;confirming the fix is good&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-654976068076506543?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/654976068076506543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=654976068076506543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/654976068076506543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/654976068076506543'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/12/fix-post-for-ruby-191-and-passenger.html' title='Fix POST for Ruby 1.9.1 and Passenger'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-4472578615658366566</id><published>2009-11-24T10:34:00.005+08:00</published><updated>2009-11-24T10:36:18.297+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='goals'/><title type='text'>Remember Which Goals are Important</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;a href="http://addictedtonew.com/"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;John Nunemaker&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; made &lt;/span&gt;&lt;a href="http://readernaut.com/jnunemaker/notes/11649/"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;an excellent comment&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; which reminds us of the value of setting goals.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial, serif;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial, serif;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;In the "crazy" world of software development, we are often pushed to make software the best, the biggest, or the option with the most features.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial, serif;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial, serif;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;But...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="line-height: 24px; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;i&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;When Boeing prepared to launch the design of the 727 passenger plain in the 1960s, its managers set a goal that was deliberately concrete: The 727 must seat 181 passengers, fly nonstop from Miami to New York City, and land on Runway 4-22 at La Guardia. (The 4-22 runway was chosen for its length--less than a mile, which was much to short for any of the existing passenger jets.) With a goal this concrete, Boeing effectively coordinated the actions of thousands of experts in various aspects of engineering or manufacturing. Imagine how much harder it would have been to build a 727 whose goal was to be "the best passenger plane in the world."&lt;/span&gt;&lt;/blockquote&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="line-height: 24px; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Setting those few important goals helped make the 727 a successful and versatile aircraft. This same concept can be applied to anything we do, even on a much less grand scale.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="line-height: 24px; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="line-height: 24px; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;This is a great reminder to not lose focus on what is important to your project.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="line-height: 24px; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="line-height: 24px; "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Now, back to creating the best software I can :)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-4472578615658366566?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/4472578615658366566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=4472578615658366566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4472578615658366566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4472578615658366566'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/11/remember-which-goals-are-important.html' title='Remember Which Goals are Important'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-4215916834810715862</id><published>2009-11-10T14:48:00.004+08:00</published><updated>2009-11-10T15:24:23.902+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='tdd'/><title type='text'>Factory.create(:factory_girl, :fixtures =&gt; false)</title><content type='html'>Rails fixtures are a great starting point, but you can't live with them on a large project.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;While working on a feature recently I kept breaking other unit tests while working with working in the associated fixtures. The relationship graph between all these objects is quite large, and I quickly decided this wasn't a game I wanted to play anymore.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Enter &lt;a href="http://github.com/thoughtbot/factory_girl"&gt;FactoryGirl&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;a href="http://github.com/thoughtbot/factory_girl"&gt;FactoryGirl&lt;/a&gt; isn't new, and I've actually played around with &lt;a href="http://github.com/thoughtbot/factory_girl"&gt;FactoryGirl&lt;/a&gt; in the past. It didn't take much effort to add a test/factories.rb, specify a few Factory objects and then bask in the win. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Tests written. New feature added. Existing tests continue to work. Everybody is happy.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Over the last few weeks we have almost entirely replaced fixtures as we've encountered them. At this point in time it is quicker to replace the fixtures than it is to continue repairing fixtures.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Yay, our tests aren't as brittle anymore :)&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;For everything but the most trivial project, I'll be dropping fixtures at the start of the project.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-4215916834810715862?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/4215916834810715862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=4215916834810715862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4215916834810715862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4215916834810715862'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/11/factorycreatefactorygirl-fixtures-false.html' title='Factory.create(:factory_girl, :fixtures =&gt; false)'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-2577829135520322168</id><published>2009-05-26T14:37:00.005+08:00</published><updated>2009-05-26T14:46:10.430+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='twitter'/><title type='text'>Twitter really satisfies?</title><content type='html'>I haven't felt the need to blog lately at all. Maybe expressing myself on &lt;a href="http://twitter.com/scottjbarr"&gt;Twitter&lt;/a&gt; has been enough to satisfy my urge to vent from time to time?&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Flinging 140 characters around with Twitter is cheap with regards to my time, which is an extremely precious commodity to me. More people probably read my tweets than read my blog anyway. Most of what I blog about is of interest to such a small group of people it probably just doesn't matter here. I can communicate effectively with those people on Twitter.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Life and work has been so busy lately the only way to express anything meaningful at all is via those gorgeous 140 characters that Twitter limits me to. The limit means no prattling on.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I'll make a deal with myself (and you too, if anyone is reading this)... If I can't fit it into 140 characters and it is still worth saying, I'll blog about it.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;If you're interested in seeing what I'm up to on regular basis, follow me on &lt;a href="http://twitter.com/scottjbarr"&gt;Twitter&lt;/a&gt; .&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Tweet you later :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-2577829135520322168?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/2577829135520322168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=2577829135520322168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2577829135520322168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2577829135520322168'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/05/twitter-really-satisfies.html' title='Twitter really satisfies?'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-3740487529115007785</id><published>2009-03-20T13:48:00.008+08:00</published><updated>2009-03-20T22:59:44.407+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='censorship'/><title type='text'>Australian Website Blacklist. Would you like lies with that?</title><content type='html'>&lt;p&gt;So it seems the &lt;a href="http://www.news.com.au/technology/story/0,28348,25210931-5014239,00.html"&gt;Australian government lied&lt;/a&gt; about &lt;a href="http://yro.slashdot.org/article.pl?sid=09/03/19/2321259&amp;amp;art_pos=6"&gt;how many URL's are on their blacklist&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Fair enough I suppose, we weren't meant to ever know what was on the list anyway.&lt;/p&gt;&lt;p&gt;Of course they lied. Whenever power is wielded in the absence of transparency do we ever hear about how it was secretly used for out benefit? No, we don't.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.news.com.au/technology/story/0,28348,25210931-5014239,00.html"&gt;Senator Conroy says that this isn't the list&lt;/a&gt;. Now, because the list is supposed to be a secret there is nothing to weigh this statement against, so it must be taken on faith alone.&lt;/p&gt;&lt;p&gt;Ah, faith...&lt;/p&gt;&lt;p&gt;This is where we get to the other part of the problem. Senator Conroy represents a group of Australians that think it is OK to push their religious views onto others. We all know how great religious zealots are at being open and honest. They've scored a 0 out of 10 for that. These guys are as "open and honest" as they need to be to push their agenda, or to escape prosecution. Don't tell me you need examples.&lt;/p&gt;&lt;p&gt;What about my agenda? I don't have one. I'm also a nobody with no power. I just want information to be out on the open where it wants to be. If you or I want information, we should be able to find it. I do not want my Government telling me what information I should or should not see, as it has proven so often in the past to be way too tempting to Governments to use censorship to help keep themselves in power. Again, you don't need examples, I'm sure you can think of many instances of this being reported... eventually.&lt;/p&gt;&lt;p&gt;"But won't someone think of the children?!", some of you cry. Will someone think of the children years from now when they are denied access to information about about other political parties in Australia, or news about the latest bad things the Government has been doing to Australians.? OK, that may not happen, but once a blacklist exists it can happen. You don't need examples provided for this either.&lt;/p&gt;&lt;p&gt;I'm quite sure if the Labour Party had made it known they were planning on introducing web censorship the balance would not have tipped in their favor at the last election. I suppose thats why they want to get the blacklist implemented in the early part of their term. Voters have short memories generally.&lt;/p&gt;&lt;p&gt;Once we've all been conditioned to accept with censorship of the information we can see, your opinion as an individual is worthless. You lost the power to make your vote mean what you intended it to mean, because without all the information available to you, how can you make an informed decision?&lt;/p&gt;&lt;p&gt;As an Australian I'm incredibly disappointed about this whole mess, although the cynic inside me is not at all surprised.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-3740487529115007785?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/3740487529115007785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=3740487529115007785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3740487529115007785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3740487529115007785'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/03/australian-website-blacklist-would-you.html' title='Australian Website Blacklist. Would you like lies with that?'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-4522251435040437905</id><published>2009-03-08T21:34:00.005+08:00</published><updated>2009-03-20T23:07:33.763+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='gem'/><title type='text'>scottbarr-number_to_text RubyGem</title><content type='html'>I was playing around with a bit of Ruby to convert numbers to text a few weeks ago but never finished it and forgot all about it. Today Guest11057 (thats an extremely boring nick!) on the #rubyonrails IRC channel asked if something like this existed, and apparently it doesn't. That reminded me about the mothballed code, and motivated me to finish it off and package it up as a RubyGem.

To convert a number to text:&lt;pre&gt;n = Number.new(119)
puts n.to_text # =&gt; "one-hundred-and-nineteen"&lt;/pre&gt;I'm not happy with how the implementation came, but it does the job. I'll clean it up to work a bit nicer sometime :)

If you need to convert numbers to text in Ruby, take a look at &lt;a href="http://github.com/scottbarr/number_to_text/tree/master"&gt;http://github.com/scottbarr/number_to_text/tree/master&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-4522251435040437905?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/4522251435040437905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=4522251435040437905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4522251435040437905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4522251435040437905'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/03/scottbarr-numbertotext-rubygem.html' title='scottbarr-number_to_text RubyGem'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-6668076668817533662</id><published>2009-02-15T13:38:00.002+08:00</published><updated>2009-02-15T13:47:52.743+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>Shiny new Apple Airport Extreme</title><content type='html'>Last week my Linksys WRT300N died after only 8 months use. It didn't die as much as it became so unreliable that it was useless. Every now and then it would drop the wireless connection, and then refuse to allow reconnection no matter how many times I power cycled it. This became so frequent and wasted so much of my time that I decided the unit had to go. I could probably send it back Linksys under warranty but I would need another wireless unit in the meantime anyway.

As I've had an excellent run with Apple products I decided to give the Airport Extreme a shot.

It was a breeze to setup, and my wife and I can both notice the speed difference when accessing the net.

So far, so good!

Quality costs more but it seems you get what you pay for. We'll see if I'm singing the same tune about the Airport Extreme in 12months time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-6668076668817533662?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/6668076668817533662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=6668076668817533662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/6668076668817533662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/6668076668817533662'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/02/shiny-new-apple-airport-extreme.html' title='Shiny new Apple Airport Extreme'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-8719127924201050929</id><published>2009-02-15T09:33:00.014+08:00</published><updated>2009-03-20T23:08:32.011+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='global it creations'/><category scheme='http://www.blogger.com/atom/ns#' term='OSS'/><category scheme='http://www.blogger.com/atom/ns#' term='gem'/><title type='text'>YahooCurrency Gem</title><content type='html'>I recently created the YahooCurrency Ruby gem that gets currency exchange rates from Yahoo! Finance.

Originally the code was part of a working Ruby on Rails demo I created about 12 months ago. A project we are currently working on needed exchange rates, so i created a Gem from the original code so we could easily reuse it across any of our future Ruby projects.

We discussed making the project open source, and agreed that it would probably be useful for others, and also great for &lt;a href="http://www.globalitcreations.com/"&gt;Global IT Creations&lt;/a&gt; to contribute something back to the open source. It is only a small contribution, but you have to start somewhere.

Here is some example code...
&lt;pre&gt;exchange_rate = YahooCurrency.get_rate!("JPY", "USD")
exchange_rate.from #=&gt; "JPY"
exchange_rate.to #=&gt; "USD"
exchange_rate.rate #=&gt; 0.0111
exchange_rate.timestamp #=&gt; Wed Feb 11 22:20:00 +0800 2009
&lt;/pre&gt;Get the source or the gem from &lt;a href="http://github.com/scottbarr/yahoo_currency/tree/master"&gt;http://github.com/scottbarr/yahoo_currency/tree/master&lt;/a&gt;

Hopefully this will be the first of many projects that &lt;a href="http://www.globalitcreations.com/"&gt;GITC&lt;/a&gt; releases as Open Source.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-8719127924201050929?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/8719127924201050929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=8719127924201050929' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/8719127924201050929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/8719127924201050929'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/02/yahoocurrency-gem.html' title='YahooCurrency Gem'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-9113855219574455681</id><published>2009-02-12T14:29:00.010+08:00</published><updated>2009-03-20T23:09:06.296+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='code'/><title type='text'>Horror Movie Code</title><content type='html'>For the last few days I've had the displeasure of working through some code that we have inherited from another company, which I will not name.

One section of code I'm looking at has a 300+ line if/elseif block, up to 9 levels deep! And if you want to see some real crap, you can look anywhere else in the remaining 700+ lines of code.

As for the project in general there are no meaningful unit tests, all the code is crammed into the Controllers, and it is so un-DRY you need a raincoat to get through it.

Code like this makes me want to cry.

This code is concrete evidence that if your parents are blood relatives you should not write software. &lt;span style="font-style:italic;"&gt;(No offence intended to non-code writing inbreeds.)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-9113855219574455681?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/9113855219574455681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=9113855219574455681' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/9113855219574455681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/9113855219574455681'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2009/02/horror-movie-code.html' title='Horror Movie Code'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-5498037423295860567</id><published>2008-09-22T11:30:00.015+08:00</published><updated>2010-07-13T12:58:03.054+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Rails with NO Fixtures?</title><content type='html'>I have a Rails project, and I created a Country model. I added the basic details of Norway to the countries.yml fixture.&lt;pre&gt;norway:
 code: NO
 name: Norway
&lt;/pre&gt;I added a unit test to make sure I could get Norway by it's country code, which is NO &lt;pre&gt;def test_find_by_code
 assert_equal countries(:norway), Country.find_by_code('NO')
end
&lt;/pre&gt;Agreed, I probably don't need a unit test for this, but this should have worked, but it was failing with the following message. &lt;pre&gt;Country id: 318845244, code: "1", name: "Norway" expected but was
nil
&lt;/pre&gt;Apparently NO in the yaml file is interpreted as a 0 (zero).  To prove the theory I changed the code of norway to YES. The unit test failed, and indicated that the model it expected should have had code: "1".  Changing countries.yml to be...&lt;pre&gt;norway:
 code: "NO"
 name: Norway
&lt;/pre&gt;I personally really like fixtures and the nice features they bring in, but sometimes they can catch you out. I'm sure it's not a bug, I've just never encountered this before.  Ever found anything strange in your fixtures?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-5498037423295860567?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/5498037423295860567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=5498037423295860567' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/5498037423295860567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/5498037423295860567'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/09/rails-with-no-fixtures.html' title='Rails with NO Fixtures?'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-3714249151637991598</id><published>2008-09-16T20:18:00.005+08:00</published><updated>2009-03-18T11:44:37.942+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Phantom Butterlies OSX Screensaver</title><content type='html'>I've had the &lt;a href="http://www.whiteknightlogic.net/code.php?8"&gt;Phantom Butterflies screensaver&lt;/a&gt; installed for a while now. It's a very attractive screen saver, isn't too distracting, and my 14 month old daughter Mishca loves it. She has a good shot at saying, "Butterflies!".

I poked around a bit more and found that &lt;a href="http://www.whiteknightlogic.net/"&gt;White Knight Logic&lt;/a&gt; has a few &lt;a href="http://www.whiteknightlogic.net/code.php"&gt;other nice screen savers &lt;/a&gt;that are also worth downloading.

Whats your favorite OSX screen saver?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-3714249151637991598?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/3714249151637991598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=3714249151637991598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3714249151637991598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3714249151637991598'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/09/phantom-butterlies-osx-screensaver.html' title='Phantom Butterlies OSX Screensaver'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-547103644089380304</id><published>2008-09-04T08:57:00.002+08:00</published><updated>2008-09-04T09:07:09.751+08:00</updated><title type='text'>My Psychic Inner Child</title><content type='html'>Damn my Psychic Inner Child, he (or is it a she??!) let me down once again.

We had a great meeting with a client a few days ago, and we're busily putting together an estimate to do the project. Yet we are still raising questions!! Why didn't my psychic inner child fast forward a few days and see what we had dug up in the analysis, and then whisper them to me that I needed to ask these questions in the meeting?

Big let down this time, psychic inner child.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-547103644089380304?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/547103644089380304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=547103644089380304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/547103644089380304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/547103644089380304'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/09/my-psychic-inner-child.html' title='My Psychic Inner Child'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-4358463421513336763</id><published>2008-08-31T19:30:00.009+08:00</published><updated>2010-04-25T19:36:27.887+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='curl'/><category scheme='http://www.blogger.com/atom/ns#' term='iphone'/><title type='text'>View source code for iPhone RSS feed</title><content type='html'>&lt;p&gt;I tried to view the &lt;a href="http://www.slashdot.org/"&gt;Slashdot&lt;/a&gt; &lt;a href="http://rss.slashdot.org/Slashdot/slashdot"&gt;RSS feed&lt;/a&gt; on my iPod Touch, but instead of an RSS feed I was redirected to a specially formatted feed for iPhones. Very nice!&lt;/p&gt;&lt;p&gt;The iPhone specific URL is http://reader.mac.com/mobile/v1/http://rss.slashdot.org/Slashdot/slashdot .&lt;/p&gt;&lt;p&gt;I was curious to about the source code of the page, really just to see if there was any interesting markup. So I tried to view the URL in Firefox... no dice. I was shown a page saying, "This Application Is Viewable Only On iPhone".&lt;/p&gt;&lt;p&gt;Hmm... it was time to cheat a little then. I googled around for the User Agent that the iPhone sends, opened a terminal and entered...&lt;/p&gt;&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# curl -A "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3 " "http://reader.mac.com/mobile/v1/http://rss.slashdot.org/Slashdot/slashdot"
&lt;/pre&gt;&lt;p&gt;I can now take a look at what makes an iPhone/iPod specific feed :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-4358463421513336763?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/4358463421513336763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=4358463421513336763' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4358463421513336763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/4358463421513336763'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/08/view-iphone-feed-source.html' title='View source code for iPhone RSS feed'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-5084689816158089215</id><published>2008-08-14T10:54:00.007+08:00</published><updated>2008-08-16T08:02:02.761+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>Ruby on Rails doesn't scale you say?</title><content type='html'>You might want to read this how this Bumer Sticker, a Linked-In application, that is &lt;a href="http://blog.linkedin.com/blog/2008/06/web-scalability.html"&gt;serving 1 billion page views per month&lt;/a&gt;.

From the article...

&lt;span style="font-style: italic;"&gt;"Ruby on Rails is frequently criticized for lacking the ability to scale. While the road to a billion page views per month has certainly had some potholes, Bumper Sticker has clearly demonstrated that the Rails platform can scale quite well, so as long as the team behind it understands that many of the bottlenecks are exactly those faced by developers on any other database-driven web platform."&lt;/span&gt;

Joyent also &lt;a href="http://www.joyeur.com/2008/06/24/1-billion-page-views-a-month"&gt;blogged about this&lt;/a&gt;.

How many Rails application have you developed, then found scaling the app was fast, relatively simple... not to mention cheap?

How many Java web applications have you developed, then found scaling the app was difficult, slower, and expensive? You probably aren't even aware of the extra work you're going through here if you've never tried to scale a Rails app.

You can take your pick of frameworks, I'm not citing any specific Java web application frameworks here. I'm not directly comparing Rails to Java, but Rails to &lt;span style="font-style: italic;"&gt;insert-your-java-framework-here.&lt;/span&gt;

I've been working with Java for a long time, and it still has it's place. But I think Rails is eating Java's lunch in a lot of areas these days, particularly in the web application and web services area.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-5084689816158089215?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/5084689816158089215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=5084689816158089215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/5084689816158089215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/5084689816158089215'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/08/ruby-on-rails-doesnt-scale-you-say.html' title='Ruby on Rails doesn&apos;t scale you say?'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-2265795784537923481</id><published>2008-08-07T15:40:00.007+08:00</published><updated>2010-06-30T11:10:20.584+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>Stop and start PostgreSQL on OSX</title><content type='html'>&lt;p&gt;To manually stop or start a PostgreSQL 8.2 server that was installed via macports, use the following commands.&lt;/p&gt;&lt;br /&gt;
&lt;h2&gt;Stop&lt;/h2&gt;&lt;br /&gt;
&lt;pre&gt;# sudo launchctl stop org.macports.postgresql82-server
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Start&lt;/h2&gt;&lt;br /&gt;
&lt;pre&gt;# sudo launchctl start org.macports.postgresql82-server
&lt;/pre&gt;&lt;br /&gt;
&lt;p&gt;Obviously this will also work for PostgreSQL 8.3 or 8.4 if you change the commands slightly.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I prefer the approach Linux distros have generally taken for service management, where all services are listed under the /etc/init.d diretory. To me /etc/init.d/postgresql-8.2 is easier, and you can use command completion to type it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-2265795784537923481?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/2265795784537923481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=2265795784537923481' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2265795784537923481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2265795784537923481'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/08/stop-and-start-postgresql-on-osx.html' title='Stop and start PostgreSQL on OSX'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-5291284731917498797</id><published>2008-07-18T16:57:00.013+08:00</published><updated>2010-07-16T09:15:55.492+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>sudo bash &gt; /dev/evil</title><content type='html'>Today I sat down with one of my team while he logged into a linux server to perform some administration tasks.&lt;br /&gt;
&lt;br /&gt;
After ssh'ing to the machine, the first command entered was:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# sudo bash&lt;/pre&gt;&lt;br /&gt;
Ouch!&lt;br /&gt;
&lt;br /&gt;
Most of the time when we log into a remote server we are intending to perform admin tasks, but not every command needs to be executed as root. Executing &amp;quot;sudo bash&amp;quot; defeats the whole purpose of using sudo to begin with.&lt;br /&gt;
&lt;br /&gt;
Sudo helps provide elevated privileges to multiple users of a machine. I don't want to limit the sudo rights on these machines as they are development and integration machines and many services are experimented with, configured, stopped, started, and generally played around with. I just want the team to treat root with respect.&lt;br /&gt;
&lt;br /&gt;
Am I being picky about this?&lt;br /&gt;
&lt;br /&gt;
What do you think?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-5291284731917498797?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/5291284731917498797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=5291284731917498797' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/5291284731917498797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/5291284731917498797'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/07/sudo-bash-devevil.html' title='sudo bash &gt; /dev/evil'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-2796331073365841576</id><published>2008-06-22T14:56:00.001+08:00</published><updated>2009-03-18T11:46:48.195+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><category scheme='http://www.blogger.com/atom/ns#' term='REST'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><title type='text'>Re-Architecting J2EE with REST</title><content type='html'>I'm investigating re-architecting parts of an existing client's application. I prefer not to re-architect existing applications of non-trivial size but the current application has outgrown its current lack of architecture. Because of it's size (not to mention the development environment being used!), development work on the application runs at a snails pace, fear of breaking code is high, and deployment is a long, painful process.

The state of the project is at least partly my responsibility, as I have worked with this project in the past. My previous attempts to get client buy-in on improving the architecture failed. I am planning to use other methods and tactics to try and illustrate to the client just what they are getting out of this.

But I digress...

I have become a big a fan of &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"&gt;REST&lt;/a&gt; over the last few years with success on various projects built using &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"&gt;REST&lt;/a&gt;. I looked at the &lt;a href="http://www.restlet.org/"&gt;Restlet&lt;/a&gt; project about a 6-9 months ago, but the documentation was inadequate for me at that stage. This isn't surprising because &lt;a href="http://www.restlet.org/"&gt;Restlet&lt;/a&gt; was quite early in the development at that time, so I'm not having a go at the &lt;a href="http://www.restlet.org/"&gt;Restlet&lt;/a&gt; team here in any way, they've been doing some really good work with their &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"&gt;REST&lt;/a&gt;  implementation.

But on having the need for &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"&gt;REST&lt;/a&gt; in Java again, I've taken another look at &lt;a href="http://www.restlet.org/"&gt;Restlet&lt;/a&gt;. The &lt;a href="http://www.restlet.org/documentation/1.1/"&gt;documentation&lt;/a&gt; has improved a lot. The examples, tutorials and explanations of the &lt;a href="http://www.restlet.org/"&gt;Restlet&lt;/a&gt; implementation are now at a stage where you can quickly evaluate &lt;a href="http://www.restlet.org/"&gt;Restlet&lt;/a&gt;, and decide if it can work for you.

I would of course rather do all of this in Ruby or Python, but with the existing application in Java/J2EE the &lt;a href="http://www.restlet.org/"&gt;Restlet&lt;/a&gt; implementation of &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"&gt;REST&lt;/a&gt; will mean the current team can still use Java, and means I have one less hurdle to try and negotiate.

As I have experienced on other large applications, when you move components out into discreet services you end up with a nice SOA application that naturally enforces separation of layers. I am expecting to see large improvements in development speed, quality of code, and deployment.

I'll blog about how the proof of concept goes in a later post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-2796331073365841576?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/2796331073365841576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=2796331073365841576' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2796331073365841576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2796331073365841576'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/06/restlets.html' title='Re-Architecting J2EE with REST'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-6642429367645621700</id><published>2008-06-19T22:36:00.000+08:00</published><updated>2008-06-20T12:16:36.136+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macbook pro'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><title type='text'>MacBook Pro Trackpad Gestures</title><content type='html'>Sometimes its like a light bulb just got switched on in your head, and you have a strong suspicion you were the only one still floundering around in the dark :)

I was just reading some pages at the &lt;a href="http://www.danga.com/memcached/"&gt;memcached&lt;/a&gt; site using my MacBook Pro, when I accidentally dragged 2 fingers down the trackpad. And what do you know... the page scrolled! I didn't realise that using two fingers on the trackpad was a gesture for scrolling.

After a little investigation theres a whole bunch of gesture options under the Mouse and Keyboard options in System Preferences.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-6642429367645621700?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/6642429367645621700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=6642429367645621700' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/6642429367645621700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/6642429367645621700'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/06/macbook-pro-trackpad-gestures.html' title='MacBook Pro Trackpad Gestures'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-2748191030650107679</id><published>2008-06-19T10:02:00.002+08:00</published><updated>2008-08-16T08:03:45.389+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exploits'/><category scheme='http://www.blogger.com/atom/ns#' term='osx'/><category scheme='http://www.blogger.com/atom/ns#' term='apple'/><title type='text'>ARDAgent Local Explot on OSX</title><content type='html'>Ouch... Nice one.

&lt;span style="font-family:courier new;"&gt;# osascript -e 'tell app "ARDAgent" to do shell script "whoami"';&lt;/span&gt;
&lt;span style="font-family:courier new;"&gt;root&lt;/span&gt;

Hopefully this is patched soon. I'm sure there are some apps out there that could make creative use of this hole.

This is discussed at length on Slashdot at, &lt;a href="http://it.slashdot.org/article.pl?sid=08/06/18/1919224"&gt;"Mac OS X Root Escalation Through AppleScript".&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-2748191030650107679?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/2748191030650107679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=2748191030650107679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2748191030650107679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2748191030650107679'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/06/osx-local-explot.html' title='ARDAgent Local Explot on OSX'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-3868361672056930055</id><published>2008-06-18T21:47:00.000+08:00</published><updated>2008-06-18T22:33:23.765+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><title type='text'>Firefox 3.0 is Shiny</title><content type='html'>Firefox 3.0 final was released today, so I thought I'd better take a look while it's still shiny :)

I'm actually writing this post using Firefox 3.0 and all seems sweet. The look fits well with the OSX Leopard. After many years of running Linux desktops I really enjoy a unified GUI. Looks aren't everything of course. 

I really like the 'Awesome Bar', which is an impressive improvement over the Location Bar in Firefox 2. The drop down of suggested URLs is feature rich and should prove really useful. Think of the Awesome Bar as the Location Bar on steroids.

Zooming in is also really nice, more like a true zoom than anything I've used before other than my iPod Touch.

I switch between Firefox and Safari depending on my mood and the way the wind is blowing, but I always enjoy something new so I'm sure I'll favour FF 3.0 for at least a little while so I can get a feel for what it really has to offer over Firefox 2.

There is a cool download counter at &lt;a href="http://downloadcounter.sj.mozilla.com/"&gt;http://downloadcounter.sj.mozilla.com/&lt;/a&gt; . For posterity I've captured a video of the counter in action.

&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-c76a28d457eb68e2" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;
&lt;param name="bgcolor" value="#FFFFFF"&gt;
&lt;param name="allowfullscreen" value="true"&gt;
&lt;param name="flashvars" value="flvurl=http://v24.nonxt3.googlevideo.com/videoplayback?id%3Dc76a28d457eb68e2%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330350799%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D5EB0EC39C94AA1021651E9BD45F792693C47B8F5.62D38DD7A275458DB42C6A3E4E2BEF3878DB346C%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dc76a28d457eb68e2%26offsetms%3D5000%26itag%3Dw160%26sigh%3D_GI_CuUGcPrCCkQeCsBAAMyD778&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;
&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"
width="320" height="266" bgcolor="#FFFFFF"
flashvars="flvurl=http://v24.nonxt3.googlevideo.com/videoplayback?id%3Dc76a28d457eb68e2%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330350799%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D5EB0EC39C94AA1021651E9BD45F792693C47B8F5.62D38DD7A275458DB42C6A3E4E2BEF3878DB346C%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dc76a28d457eb68e2%26offsetms%3D5000%26itag%3Dw160%26sigh%3D_GI_CuUGcPrCCkQeCsBAAMyD778&amp;autoplay=0&amp;ps=blogger"
allowFullScreen="true" /&gt;&lt;/object&gt;


Oh yeah, and apparently the &lt;a href="http://www.flickr.com/photos/robceemoz/2587912633/"&gt;IE team sent the Firefox team a cake!&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-3868361672056930055?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=c76a28d457eb68e2&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/3868361672056930055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=3868361672056930055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3868361672056930055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/3868361672056930055'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/06/firefox-30-is-shiny.html' title='Firefox 3.0 is Shiny'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2575587491339768572.post-2078316029569869568</id><published>2008-06-17T13:09:00.000+08:00</published><updated>2008-06-18T22:34:09.801+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='singapore'/><title type='text'>Back in Singapore... Again!</title><content type='html'>I'm back in Singapore again!

My wife and I returned home to Australia in 2007, but both Australia and Singapore both have their plus sides, and after returning we eventually decided that Singapore is be a better place for us to be in the long run. We're really looking forward to making Singapore home again :)

I accepted a position with the company I used to work for here previously, &lt;a href="http://www.globalitcreations.com/"&gt;Global IT Creations&lt;/a&gt;. I'm quite excited about working with this company again, as we do some really interesting work for our clients. There isn't one other company I've previously worked for that I would return to work with, but I can easily make an exception for GITC.

I really want to blog about bits of code I write and play with, and this will be the outlet for those experiments. At the moment I'm mostly using Ruby and Ruby on Rails, but I've had lots of development experience using Java/J2EE, Python and PHP in the past.

I've also recently been toying with Flash after avoiding it for so long, and I've really taken a shine to ActionScript 3.

Lets see what comes out of it all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2575587491339768572-2078316029569869568?l=scottbarr.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottbarr.blogspot.com/feeds/2078316029569869568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2575587491339768572&amp;postID=2078316029569869568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2078316029569869568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2575587491339768572/posts/default/2078316029569869568'/><link rel='alternate' type='text/html' href='http://scottbarr.blogspot.com/2008/06/back-in-singapore.html' title='Back in Singapore... Again!'/><author><name>Scott Barr</name><uri>http://www.blogger.com/profile/14653508919695537928</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_qf9d_8wjB0c/S2e2Ty7xphI/AAAAAAAAAYM/gnREDoVrEqM/S220/scott_brunch.jpg'/></author><thr:total>0</thr:total></entry></feed>
