<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>hernan43's github blog</title>
 <link href="http://hernan43.github.com/atom.xml" rel="self"/>
 <link href="http://hernan43.github.com/"/>
 <updated>2010-01-25T08:50:09-08:00</updated>
 <id>http://hernan43.github.com/</id>
 <author>
   <name>hernan43</name>
   <email>hernan43 at gmail dot com</email>
 </author>

 
 <entry>
   <title>Finally something to work on</title>
   <link href="http://hernan43.github.com/2010/01/25/miniapp-to-work-on.html"/>
   <updated>2010-01-25T00:00:00-08:00</updated>
   <id>http://hernan43.github.com/2010/01/25/miniapp-to-work-on</id>
   <content type="html">&lt;p&gt;Months ago, I became inspired by &lt;a href=&quot;http://gilesbowkett.blogspot.com&quot;&gt;Giles Bowkett&amp;#8217;s&lt;/a&gt; idea of doing a miniapp a month. He made a very cool app to read &lt;a href=&quot;http://news.ycombinator.com&quot;&gt;Hacker News&lt;/a&gt; in the format of a &lt;a href=&quot;http://gilesbowkett.blogspot.com/2009/04/miniapp-hacker-newspaper.html&quot;&gt;traditional newspaper&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I am always in the process of developing my skills, so I thought the concept of using miniapp development was awesome. I can come up with an idea for a simple app, then start working on it. I&amp;#8217;m not prolific enough to do one per month, but I figure something is better than nothing.&lt;/p&gt;
&lt;p&gt;Recently, I&amp;#8217;ve become obsessed with learning more and more about &lt;a href=&quot;http://mongodb.org&quot;&gt;MongoDB&lt;/a&gt;. After reading scads of articles on MongoDB and &lt;a href=&quot;http://github.com/jnunemaker/mongomapper&quot;&gt;mongomapper&lt;/a&gt; on &lt;a href=&quot;http://railstips.org&quot;&gt;John Nunemaker&amp;#8217;s&lt;/a&gt; blog I decided I just have to wrap my head around MongoDB and figure out if it is something that is valuable to me.&lt;/p&gt;
&lt;p&gt;Having trouble as I usually do trying to figure out what miniapp to work on next, I think I&amp;#8217;ve finally come up with something that I can work on that will snuggle up with MongoDB nicely. I don&amp;#8217;t want to get into what it is just yet. If I did and found out I was out of my depth I&amp;#8217;d feel like a total nozzle. So hopefully you can watch this space and see what I come up with.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Filtering my tweet spam with Ruby</title>
   <link href="http://hernan43.github.com/2009/12/14/spam-filtering-my-tweets.html"/>
   <updated>2009-12-14T00:00:00-08:00</updated>
   <id>http://hernan43.github.com/2009/12/14/spam-filtering-my-tweets</id>
   <content type="html">&lt;p&gt;I watched &lt;a href=&quot;http://www.hilarymason.com/blog/&quot;&gt;Hillary Mason&amp;#8217;s&lt;/a&gt; video titled &lt;a href=&quot;http://www.hilarymason.com/blog/ignitenyc-how-to-replace-yourself-with-a-very-small-shell-script/&quot;&gt;How to Replace Yourself with a Very Small Shell Script&lt;/a&gt; a few weeks ago, and it got my creative juices flowing. The gist of the video was that by using document classification you could determine the importance of an email message.&lt;/p&gt;
&lt;p&gt;In the video Hillary suggests using this method on your Twitter feed. This was where I got all fired up. It is all too common for me to hear &lt;a href=&quot;http://www.atebits.com/tweetie-mac/&quot;&gt;Tweetie&lt;/a&gt; bleep, I swivel my chair around to see what new tidbit someone has tweeted to find, &amp;#8220;I like candy&amp;#8230;&amp;#8221; Or some other inane pap.&lt;/p&gt;
&lt;p&gt;If I could use &lt;a href=&quot;http://en.wikipedia.org/wiki/Naive_Bayes_classifier&quot;&gt;some method of document classification&lt;/a&gt;, maybe I could train a Twitter client to identify which tweets where interesting, I could avoid the constant &amp;#8220;need coffee&amp;#8221; tweets. A ha!&lt;/p&gt;
&lt;p&gt;Enter the &lt;a href=&quot;http://classifier.rubyforge.org/&quot;&gt;Ruby classifier gem&lt;/a&gt;. The classifier gem takes care of all the mathematical leg for you. It makes it a simple exercise to train my tweets as being &amp;#8216;interesting&amp;#8217; or &amp;#8216;uninteresting&amp;#8217;. At least in theory.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# create my classifier&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Classifier&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Bayes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_category&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;interesting&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_category&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;uninteresting&amp;quot;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# train items&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;train&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;uninteresting&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;uninteresting_tweet&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;train&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;interesting&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;interesting_tweet&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# classify/guess which type of tweet it is&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;classify&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tweet&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Using the above code I can train my tweet classification database and determine which tweets are interesting and which ones aren&amp;#8217;t.&lt;/p&gt;
&lt;p&gt;So far, I have only done one round of testing. I trained about 30-40 tweets and ran the classifier on at least another 30-40. I am pretty surprised at the accuracy. The ones it marked as being uninteresting were ones I would have normally ignored. The ones it marked as interesting were ones I would mostly consider worth reading. At least as worth reading as a tweet can be ;-).&lt;/p&gt;
&lt;p&gt;This first experiment has paved the way for me to expand this into a bigger project. Considering I am not particularly happy with any one Twitter client, I think I may write my own and incorporate the Bayesian classification. At least as an excuse to play with this idea a bit more.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Wrapping my brain around long polling with Orbited/Rails</title>
   <link href="http://hernan43.github.com/2009/11/02/trying_to_wrap_my_head_around_long_polling.html"/>
   <updated>2009-11-02T00:00:00-08:00</updated>
   <id>http://hernan43.github.com/2009/11/02/trying_to_wrap_my_head_around_long_polling</id>
   <content type="html">&lt;p&gt;I&amp;#8217;ve been reading about &lt;a href=&quot;http://en.wikipedia.org/wiki/Comet_(programming)&quot;&gt;Comet/long polling&lt;/a&gt; for a while now. It seems to be becoming a popular topic of discussion. There are a lot of opinions and theories on it. Not having any experience with it myself, I&amp;#8217;ve only pseudo-understood what it was.&lt;/p&gt;
&lt;p&gt;Wikipedia has &lt;a href=&quot;http://en.wikipedia.org/wiki/Comet_(programming)&quot;&gt;a nice breakdown&lt;/a&gt; of what it is. Basically, it is a way for a web application to &amp;#8216;push&amp;#8217; data to the client using long running &lt;span class=&quot;caps&quot;&gt;HTTP&lt;/span&gt; requests.&lt;/p&gt;
&lt;p&gt;Now that I&amp;#8217;ve gotten around to reading up on it, I decided a week or so ago to try and do a simple implementation of it. I noticed that a lot of people use the chat room concept with Comet, so I decided to try and make a simple app that implemented a chat room. Kind of like when I discovered &lt;a href=&quot;http://rubyonrails.org/&quot;&gt;Ruby on Rails&lt;/a&gt;, I decided to do the quintessential &amp;#8216;make a blog with rails&amp;#8217; experiment.&lt;/p&gt;
&lt;h3&gt;Try #1 &amp;#8211; Nginx push module&lt;/h3&gt;
&lt;p&gt;Without knowing any better, I decided to try out the new-ish &lt;a href=&quot;http://github.com/slact/nginx_http_push_module&quot;&gt;Nginx http push module&lt;/a&gt;. I&amp;#8217;m familiar enough with &lt;a href=&quot;http://nginx.net/&quot;&gt;Nginx&lt;/a&gt;. I figured it would be easy. It sort of was.&lt;/p&gt;
&lt;p&gt;I followed the instructions for install Nginx with the http push module. Everything seemed to work as advertised. I even tried the sample code from &lt;a href=&quot;http://www.igvita.com/2009/10/21/nginx-comet-low-latency-server-push/&quot;&gt;Nginx &amp;amp; Comet: Low Latency Server Push&lt;/a&gt;. Everything worked as advertised. I was pretty impressed.&lt;/p&gt;
&lt;p&gt;In my app I used the &lt;a href=&quot;http://github.com/collectiveidea/delayed_job&quot;&gt;delayed_job&lt;/a&gt; plugin to queue messages to be sent to the publish &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;. For the most part it appeared to be working correctly. I could see the messages entering the queue and I could see that they were getting published to my Nginx polling server.&lt;/p&gt;
&lt;p&gt;Unfortunately, my Javascript/&lt;a href=&quot;http://prototypejs.org&quot;&gt;Prototype&lt;/a&gt; skills are &lt;em&gt;clearly&lt;/em&gt; not up to par. I was unable to get my chat room to work reliably. It would only receive messages sometimes and it seemed to lose track of my polling server.&lt;/p&gt;
&lt;p&gt;I spent a day trying to figure out what I was doing wrong and finally threw my hands up in defeat, grabbed my Xbox controller, and cooled off to some &lt;a href=&quot;http://www.borderlandsthegame.com/&quot;&gt;Borderlands&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Try #2 &amp;#8211; Orbited&lt;/h3&gt;
&lt;p&gt;The difference between my first try and this try were night and day. The &lt;a href=&quot;http://orbited.org/&quot;&gt;Orbited&lt;/a&gt; setup was seemingly simpler than my Nginx one.&lt;/p&gt;
&lt;p&gt;Orbited is a &lt;a href=&quot;http://python.org&quot;&gt;Python&lt;/a&gt; server using the &lt;a href=&quot;http://twistedmatrix.com/trac/&quot;&gt;Twisted&lt;/a&gt; framework. Twisted is an extremely stable/reliable networking framework. It has been around for as long as I have been using Python&lt;/p&gt;
&lt;p&gt;Instead of having to have Nginx running + Apache + the delayed job runner running, I could slim it down to just Apache + Orbited. Also the &lt;a href=&quot;http://github.com/mallio/orbited&quot;&gt;Orbited plugin&lt;/a&gt; made integration into Rails &lt;strong&gt;extremely&lt;/strong&gt; easy. Installing the plugin created a config file with defaults set the same as the defaults in the Orbited config. So I really didn&amp;#8217;t have to configure it to point to Orbited at all.&lt;/p&gt;
&lt;p&gt;In my &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; template I had to add the following to my head section:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;orbited_javascript&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;And then for the chat channels I just did:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stomp_connect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:slug&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;The &lt;code&gt;params[:slug]&lt;/code&gt; variable is set to whatever my current chat channel is. It was really simple.&lt;/p&gt;
&lt;p&gt;In my messages controller I have a private method called &lt;code&gt;send_message_via_orbited(message)&lt;/code&gt;. This method sends newly created messages to the default Orbited &lt;span class=&quot;caps&quot;&gt;STOMP&lt;/span&gt; service(&lt;a href=&quot;http://www.morbidq.com/&quot;&gt;MorbidQ&lt;/a&gt;) and then to my channel&amp;#8217;s page.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;send_message_via_orbited&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;orbited_data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;render_to_string&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:update&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;insert_html&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
		&lt;span class=&quot;s1&quot;&gt;&amp;#39;messages&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
		&lt;span class=&quot;ss&quot;&gt;:partial&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;channels/message&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
		&lt;span class=&quot;ss&quot;&gt;:locals&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:message&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;message_form&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;down&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;form&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reset&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;Orbited&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;send_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;channel&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;orbited_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;All this code does is updated the messages div with the new message. This is done via &lt;a href=&quot;http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html&quot;&gt;&lt;span class=&quot;caps&quot;&gt;RJS&lt;/span&gt;&lt;/a&gt; which sends Javascript through Orbited to the page where it is eval&amp;#8217;d.&lt;/p&gt;
&lt;h3&gt;Aaaaaaand done!&lt;/h3&gt;
&lt;p&gt;Orbited was extremely easy and worked pretty reliably for the little bit of testing that I did. You can browse the source on &lt;a href=&quot;http://github.com&quot;&gt;GitHub&lt;/a&gt;, I called it &lt;a href=&quot;http://github.com/hernan43/pollchat&quot;&gt;pollchat&lt;/a&gt;.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>My so called Hacker Blog</title>
   <link href="http://hernan43.github.com/2009/10/18/my-so-called-hacker-blog.html"/>
   <updated>2009-10-18T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/10/18/my-so-called-hacker-blog</id>
   <content type="html">&lt;p&gt;After trying out &lt;a href=&quot;http://www.wordpress.com&quot;&gt;Wordpress&lt;/a&gt; for a few months now, I&amp;#8217;ve decided to leave it in favor of &lt;a href=&quot;http://pages.github.com/&quot;&gt;GitHub Pages&lt;/a&gt; and &lt;a href=&quot;http://wiki.github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt;. Jekyll is a static site generator with a penchant for blogs.&lt;/p&gt;
&lt;p&gt;Years ago, I used to use a piece of software called, &lt;a href=&quot;http://pyblosxom.sourceforge.net/&quot;&gt;PyBlosxom&lt;/a&gt;. PyBlosxom is a Python based blog generator, that stores posts in individual files and can be used to generate a static site.&lt;/p&gt;
&lt;p&gt;Much like PyBlosxom, Jekyll also stores blog posts in flat text files. It can process many of the most popular markup engines and is highly customizable. One nice feature of Jekyll is that it is what powers GitHub Pages, and therefore you are able to use your free GitHub account to run a blog.&lt;/p&gt;
&lt;p&gt;My favorite part about this is that I can edit posts using &lt;a href=&quot;http://www.vim.org&quot;&gt;&lt;span class=&quot;caps&quot;&gt;VIM&lt;/span&gt;&lt;/a&gt;, push the changes to GitHub, and &lt;strong&gt;&lt;span class=&quot;caps&quot;&gt;BOOM&lt;/span&gt;!&lt;/strong&gt; My blog is updated.&lt;/p&gt;
&lt;h3&gt;Why leave Wordpress?&lt;/h3&gt;
&lt;p&gt;I really like the Wordpress blogging platform. It is free, extensible, and has a really nice administrative interface.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;But I am a hacker at heart.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I like the idea of using a simple text editor and some command line tools to be able to publish new posts. I also like the idea of having a distributed, version controlled copy of my blog site.&lt;/p&gt;
&lt;h3&gt;Migrating my Wordpress posts&lt;/h3&gt;
&lt;p&gt;I hemmed and hawed about whether I should take my &lt;a href=&quot;http://wordpress.com&quot;&gt;Wordpress.com&lt;/a&gt; posts along with me on this new adventure. Jekyll had a &lt;a href=&quot;http://wiki.github.com/mojombo/jekyll/blog-migrations&quot;&gt;bunch of converters&lt;/a&gt; for the popular blog engines, including Wordpress, but they required database access. Since my blog was on Wordpress.com, I only had access to an &lt;span class=&quot;caps&quot;&gt;XML&lt;/span&gt; dump of all my posts.&lt;/p&gt;
&lt;p&gt;Relenting, I decided to bring my old posts over. I used &lt;a href=&quot;http://github.com/whymirror/hpricot&quot;&gt;Hpricot&lt;/a&gt; to whip up a simple shell script that would parse out all of my old posts, and convert them to the &lt;a href=&quot;http://wiki.github.com/mojombo/jekyll/usage&quot;&gt;Jekyll file convention&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;#!/usr/bin/env ruby&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# usage:&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# ./wordpress_xml_to_jekyll.rb wordpress.xml &amp;lt;jekyll-dir&amp;gt;/_posts&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;rubygems&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;hpricot&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;erb&amp;#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# my posts are pretty basic&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;post_template&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ERB&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;EOF&lt;/span&gt;
&lt;span class=&quot;sh&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;sh&quot;&gt;title: &amp;lt;%= title %&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sh&quot;&gt;layout: post&lt;/span&gt;
&lt;span class=&quot;sh&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;sh&quot;&gt;&amp;lt;%= content %&amp;gt;&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;EOF&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# wordpress xml file&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;xml_file&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ARGV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# where to put the posts, i.e. &amp;lt;jekyll_dir&amp;gt;/_posts/&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;output_dir&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ARGV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# read xml in&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xml_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# convert to Hpricot object&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;doc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Hpricot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;doc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;item&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# get the particulars for each post&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;title&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inner_text&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;slug&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;wp:post_name&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inner_text&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;date&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;DateTime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;wp:post_date&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inner_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;content&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;content:encoded&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;inner_text&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# create a file name for the post&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;file_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;year&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;month&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;day&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;slug&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.liquid&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;output_file&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;output_dir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# render my ERB template&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;file_contents&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;post_template&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;binding&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  
  &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;output_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;w&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# write the post to its respective file&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file_contents&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h3&gt;Wanna try blogging with Jekyll?&lt;/h3&gt;
&lt;p&gt;Here are some really good resources on using Jekyll, Git, and GitHub Pages.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://wiki.github.com/mojombo/jekyll&quot;&gt;Jekyll Wiki&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://blog.envylabs.com/2009/08/publishing-a-blog-with-github-pages-and-jekyll/&quot;&gt;Publishing a Blog with GitHub Pages and Jekyll&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://pages.github.com/&quot;&gt;GitHub Pages&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://progit.org/&quot;&gt;The Pro Git Book &amp;#8211; great resource on using git&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
 </entry>
 
 <entry>
   <title>first post!</title>
   <link href="http://hernan43.github.com/2009/10/15/first-post.html"/>
   <updated>2009-10-15T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/10/15/first-post</id>
   <content type="html">&lt;p&gt;This is my first post to my github pages page.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Revisiting an old friend</title>
   <link href="http://hernan43.github.com/2009/09/28/revisiting-an-old-friend.html"/>
   <updated>2009-09-28T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/09/28/revisiting-an-old-friend</id>
   <content type="html">&lt;p&gt;A few years ago, circa 2003, I started a new job at my current employer. Everyone there used IRC for everything. We had a guy that was telecommuting so it made it easier to collaborate with the whole team. As long as we discussed it in IRC, everyone was able to participate
&lt;/p&gt;
&lt;p&gt;We had a large number of systems that we monitored using &lt;a href=&quot;http://bb4.com/&quot; title=&quot;Network Monitoring Software - Big Brother&quot;&gt;Big Brother&lt;/a&gt;. It was quite nice, but we always had to have our web browser tuned to the Big Brother monitoring app, or we had to be sure to pay attention to our email.
&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;Naturally we didn't always do either so sometimes 5, maybe 10 minutes would go by before we noticed a system was having trouble. I thought it would be cool to create an IRC bot that posted system notifications in an IRC channel. 
&lt;/p&gt;
&lt;p&gt;This worked great because everyone's client would let you know when there were new messages in the channel. If we wanted to we could (and did) colorize 'info' messages one color, and 'severe' messages another and so on.
&lt;/p&gt;
&lt;p&gt;We loved the bot so much that on my last day there, I accidentally deleted my home directory on that machine (I got a little overzealous with the rm -rf). My boss had me leave the box on so they could leave the bot running in core memory for a number of months. I didn't have another copy of the code and needless to say I was cheesed off.
&lt;/p&gt;
&lt;p&gt;Last year I decided to sit down and re-create it as best as I could. I sent it to my old team mates so they could use it again if they wished. I've also open sourced it in case anyone else would like to play with it. 
&lt;/p&gt;
&lt;p&gt;I call it the &lt;a href=&quot;http://github.com/hernan43/telnechobot&quot; title=&quot;hernan43's telnechobot at master - GitHub&quot;&gt;Telnecho Bot&lt;/a&gt;.
&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>A few days of testing</title>
   <link href="http://hernan43.github.com/2009/09/16/a-few-days-of-testing.html"/>
   <updated>2009-09-16T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/09/16/a-few-days-of-testing</id>
   <content type="html">&lt;p&gt;So I started an exercise to learn &lt;a title=&quot;Test-driven development - Wikipedia, the free encyclopedia&quot; href=&quot;http://en.wikipedia.org/wiki/Test-driven_development&quot;&gt;TDD&lt;/a&gt; with &lt;a title=&quot;Ruby on Rails&quot; href=&quot;http://rubyonrails.org/&quot;&gt;Ruby on Rails&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;I created a &lt;a href=&quot;http://github.com/hernan43/tdd-experiment&quot;&gt;project on git&lt;/a&gt; and started coding it up whenever I get a few spare minutes here and there.
&lt;/p&gt;
&lt;p&gt;It has been slow going but I am creeping along. Thoughtbot's &lt;a title=&quot;Projects - Factory Girl&quot; href=&quot;http://www.thoughtbot.com/projects/factory_girl&quot;&gt;factory-girl&lt;/a&gt; and &lt;a title=&quot;Projects - Shoulda&quot; href=&quot;http://www.thoughtbot.com/projects/shoulda/&quot;&gt;shoulda&lt;/a&gt; have been making it much easier.
&lt;/p&gt;
&lt;p&gt;I am currently reading &lt;a title=&quot;Andrzej on Software: 15 TDD steps to create a Rails application&quot; href=&quot;http://andrzejonsoftware.blogspot.com/2007/05/15-tdd-steps-to-create-rails.html&quot;&gt;15 TDD steps to create a Rails application&lt;/a&gt; and its children to help me get started with getting into the TDD mindset.
&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>My Rails Rumble 2009 Entry</title>
   <link href="http://hernan43.github.com/2009/09/09/my-rails-rumble-2009-entry.html"/>
   <updated>2009-09-09T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/09/09/my-rails-rumble-2009-entry</id>
   <content type="html">&lt;p&gt;So I didn't create a &lt;a href=&quot;http://hernan43.wordpress.com/2009/08/24/the-rumbly-in-my-tumbly/&quot;&gt;finals-worthy entry&lt;/a&gt; in the &lt;a href=&quot;http://r09.railsrumble.com/&quot; title=&quot;Rails Rumble :: Rails Rumble Leaderboard&quot;&gt;2009 Rails Rumble&lt;/a&gt; but that doesn't mean it isn't useful
&lt;/p&gt;
&lt;p&gt;I've decided to &lt;a href=&quot;http://www.gnu.org/copyleft/gpl.html&quot; title=&quot;Gnu Pulic License&quot;&gt;open source&lt;/a&gt; my entry so that other people can take a look at it and maybe even use it or steal from it.
&lt;/p&gt;
&lt;p&gt;Check out the &lt;a href=&quot;http://github.com/hernan43/laterz/tree/master&quot; title=&quot;laterz github repo&quot;&gt;github repository for laterz here&lt;/a&gt;.
&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>The Rumbly in My Tumbly</title>
   <link href="http://hernan43.github.com/2009/08/24/the-rumbly-in-my-tumbly.html"/>
   <updated>2009-08-24T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/08/24/the-rumbly-in-my-tumbly</id>
   <content type="html">&lt;p&gt;So I threw my hat into the ring this weekend and participated in the &lt;a href=&quot;http://r09.railsrumble.com/&quot; title=&quot;Rails Rumble :: Welcome to the '09 Rumble&quot;&gt;2009 Rails Rumble&lt;/a&gt;. The gist of it is you have 48 to make a web app based off of a &lt;a href=&quot;http://rack.rubyforge.org/&quot; title=&quot;Rack: a Ruby Webserver Interface&quot;&gt;Rack&lt;/a&gt; compatible web framework.
&lt;/p&gt;
&lt;p&gt;I've never done anything like this before and I was pretty nervous. My idea was revolved around a common habit of mine. When I write these posts, I tend to build up folders of bookmarks that I will use for research. I go through my bookmarks, do my post, and then I trash the folder. Sometimes I forget to delete these folders or I neglect to do it for whatever reason. Next thing I know, my bookmarks bar is full of these mothers and I'm deleting a whole bunch of them.
&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;&lt;img src=&quot;http://hernan43.files.wordpress.com/2009/08/screenie.png&quot; alt=&quot;Screenie&quot; height=&quot;399&quot; width=&quot;533&quot;&gt;
&lt;/p&gt;
&lt;p&gt;So my app, &lt;a href=&quot;http://laterz.r09.railsrumble.com/&quot;&gt;Laterz&lt;/a&gt;, lets me use a bookmarks bar shortcut to auto-save URLs for me to go over later. I jokingly refer to it as &lt;a href=&quot;http://en.wikipedia.org/wiki/Time_shifting&quot; title=&quot;Time shifting - Wikipedia, the free encyclopedia&quot;&gt;time shifting&lt;/a&gt; URLs.
&lt;/p&gt;
&lt;p&gt;With Laterz, you login with &lt;a href=&quot;http://openid.net/&quot; title=&quot;OpenID Foundation website&quot;&gt;OpenID&lt;/a&gt; and have a storage area for URLs. You can create categories to organize them if you want. Each category gets its own shortcut that can be copied to your bookmarks bar to auto-save URLs to that category.
&lt;/p&gt;
&lt;p&gt;It is pretty simple. I wish my design skills were a bit better so that it wouldn't look like some kind of &lt;a href=&quot;http://phpnuke.org/&quot; title=&quot;PHP-Nuke&quot;&gt;PHP Nuke&lt;/a&gt; template from 1998 but oh well.
&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Rumble in the Internet Jungle</title>
   <link href="http://hernan43.github.com/2009/07/13/rumble-in-the-internet-jungle.html"/>
   <updated>2009-07-13T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/07/13/rumble-in-the-internet-jungle</id>
   <content type="html">&lt;p&gt;Well I've casted my lot and am entered in the &lt;a href=&quot;http://r09.railsrumble.com/&quot;&gt;Rails Rumble 2009&lt;/a&gt;. The Rails Rumble is a 48 hour coding competition using &lt;a href=&quot;http://rubyonrails.org/&quot;&gt;Ruby on Rails&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;The actual competition doesn't happen until August 22nd, 2009. I have a good idea about what I am going to do. The only real question is how much I can accomplish in 48 hours.
&lt;/p&gt;
&lt;p&gt;I am positive I can get the basics working in 48 hours but my concept has some pretty grand ideas and I would love to finish a few of them before the time is up. Who knows, maybe I'll even win a prize.
&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&quot;http://blog.railsrumble.com/&quot;&gt;Rails Rumble Blog&lt;/a&gt; for more info.
&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Been workin</title>
   <link href="http://hernan43.github.com/2009/06/25/been-workin.html"/>
   <updated>2009-06-25T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/06/25/been-workin</id>
   <content type="html">&lt;p&gt;I've been working on a really small project that I've decided to share with the world. I would love for people to try it out. Hopefully I can get a handful of users using it so I can see my creation in action.
&lt;/p&gt;
&lt;p&gt;Without further ado, I present my little baby, &lt;a title=&quot;ENIV.US&quot; href=&quot;http://eniv.us&quot;&gt;eniv.us&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;Here is a blog entry that has more detailed info:
&lt;/p&gt;
&lt;a href=&quot;http://enivus.wordpress.com/2009/06/25/eniv-us-my-little-experiment/&quot;&gt;http://enivus.wordpress.com/2009/06/25/eniv-us-my-little-experiment/&lt;/a&gt;

&lt;p&gt;He also has &lt;a href=&quot;http://twitter.com/enivus&quot;&gt;his own Twitter page.&lt;/a&gt;
&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Got Root?</title>
   <link href="http://hernan43.github.com/2009/06/02/got-root.html"/>
   <updated>2009-06-02T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/06/02/got-root</id>
   <content type="html">&lt;p&gt;I was walking to lunch this afternoon and for some reason I conjured up a long lost memory. A memory from a headier time when I was a young college student. I worked for a small department on campus at &lt;a href=&quot;http://msu.edu&quot;&gt;Michigan State University&lt;/a&gt; as a Linux system administrator. 
&lt;/p&gt;
&lt;p&gt;This was not a memory of a great triumph or some great prank. This was a memory of an event that changed my life as a coder and as a sysadmin. The memory that came into my head was of the very first(and hopefully last) time I got rooted.
&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;As I sit here typing this up on a rainy evening, I am reminded of the day it happened. It was an early morning just as a rainstorm was finishing up drenching everything. It was mildly foggy as I walked into the now demolished Paolucci building on the campus of &lt;a href=&quot;http://www.msu.edu/&quot; title=&quot;Michigan State University&quot;&gt;Michigan State University&lt;/a&gt;.
&lt;/p&gt;
&lt;h3&gt;Prologue&lt;/h3&gt;

&lt;p&gt;I came upstairs to the student office and was greeted by a fellow student. &quot;Some guy from the Computer Center called. He said something was wrong with one of our computers. He wanted you to call him as soon as you got in. Also they shut off the internet connection to our building.&quot;
&lt;/p&gt;
&lt;p&gt;&quot;What the hell? What could have been wrong with one of our machines. We only have a couple that do anything of any substance.&quot; I sat down and started dialing the number my coworker gave me. The person on the other end of the phone told me that one of our boxes had been hacked, and that it was DDoS'ing the campus network hardware north of the river. It was causing network trouble so they shut off our building's network connection. He also told me to touch nothing, he was going to be there in a little bit.
&lt;/p&gt;
&lt;p&gt;Needless to say there was no way I was going to not touch anything. Sorry security dudes. I promptly logged onto the machine and started poking around. Even with my limited knowledge I was able to somewhat easily find out what was the cause of all the trouble. The attacker didn't even really make any attempt to cover their tracks. Luckily this machine was a new install so it didn't have anything I couldn't stand to lose.
&lt;/p&gt;
&lt;h3&gt;The Day Before&lt;/h3&gt;

&lt;p&gt;The day before I decided to setup a &lt;a href=&quot;http://en.wikipedia.org/wiki/Dhcp&quot; title=&quot;Dynamic Host Configuration Protocol - Wikipedia, the free encyclopedia&quot;&gt;DHCP&lt;/a&gt; server for my office to allocate IPs to the various laptops, desktops, and whatnot that were in our office. I thought it would be a clever use of my time and maybe I'd learn something new, and boy was I right!
&lt;/p&gt;
&lt;p&gt;That same day I installed a copy of &lt;a href=&quot;http://www.redhat.com/&quot; title=&quot;redhat.com | The World's Open Source Leader&quot;&gt;RedHat&lt;/a&gt;(which was probably version 6.2 or 7). After the install finished I booted it up and left for lunch with a hungry belly and a promise to come back later and finish setting everything up.
&lt;/p&gt;
&lt;p&gt;Well as it turns out I forgot all about the box and got caught up with other things to do. I finished out my day and left for home, thinking of better days and brighter futures.
&lt;/p&gt;
&lt;h3&gt;Meeting the Security Dude&lt;/h3&gt;

&lt;p&gt;So that leads me into the next day. Or as I like to call it, &lt;strong&gt;The Day I Learned What &quot;Owned&quot; Meant&lt;/strong&gt;. There I was waiting for the &lt;strong&gt;Security Dude&lt;/strong&gt; to show up. My heart was pounding. What were they going to do? What were they going to say? Was I going to get fired? Were they going to think I did it? It was too late to think about all that the &lt;strong&gt;Security Dude&lt;/strong&gt; was here. The interaction went something like this:
&lt;/p&gt;
&lt;p&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
	&lt;tr&gt;
		&lt;td&gt;Bud&lt;/td&gt;
		&lt;td&gt;&quot;Hello. My name is Security J. Dude III. Nice to meet you. You may call me, Bud.&quot;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Me&lt;/td&gt;
		&lt;td&gt;Hey, my name is hernan43. &lt;em&gt;Oh well, that wasn't so bad. He seemed nice. He even let me call him by a nickname(I changed the name in case you couldn't tell).&lt;/em&gt; 
		&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Bud&lt;/td&gt;
		&lt;td&gt;Did you make sure not to touch anything?&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Me&lt;/td&gt;
		&lt;td&gt;Uh well I logged in before I called you and poked around, but I haven't messed with it after that. &lt;em&gt;Oh yeah I lied like my life depended on it.&lt;/em&gt;&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;/p&gt;

&lt;p&gt;Bud either bought my lie or did a good job at faking annoyance at my ignorance, either way he sat down at the affected machine and got to work. He typed in a series of seemingly complicated commands and watched the text scroll by soaking in all of the information before turning in his chair to address me.
&lt;/p&gt;
&lt;p&gt;Bud informed me that the particular version of RedHat I used installed an ftp server by default that had a known exploit. He told me the attacker used a rootkit to assume control of the machine. He showed me the terminal where he had one of the system logs being displayed. He pointed to a single line, &quot;Right here is the point where you were pretty much owned.&quot;
&lt;/p&gt;
&lt;p&gt;He mentioned that had I left the machine alone it would have been more likely that it could have been used to catch the attacker. Finally he told me about &lt;a href=&quot;http://www.tripwire.com/&quot; title=&quot;Configuration Control - Tripwire&quot;&gt;Tripwire&lt;/a&gt; and the importance of installing the OS with the network unplugged until I was in a position to patch it.
&lt;/p&gt;
&lt;p&gt;Bud was a little cheesed that I was trying to setup my own DHCP server in the office since there was a possibility that if I didn't configure it correctly it could interfere with the main campus DHCP service. 
&lt;/p&gt;
&lt;p&gt;Despite the situation he was pretty kind and understanding. I was expecting him to chastise me for being such a dilettante, but I guess he sees this stuff so often that he probably couldn't help but feel sorry for me.
&lt;/p&gt;
&lt;h3&gt;The Aftermath&lt;/h3&gt;

&lt;p&gt;Once Bud was finished, he told me that they would reactivate our network when he got back to his office since he was pretty much confident that the problem was solved.
&lt;/p&gt;
&lt;p&gt;I was worried that I was in some major caca when my boss got in, but when I told him the story he seemed indifferent. &quot;Did anything get taken?&quot; &quot;No&quot; &quot;Did they turn the internet back on?&quot; &quot;Yes&quot; &quot;Ok well, don't do it again. Back to work.&quot;
&lt;/p&gt;
&lt;p&gt;I learned many a valuable lesson that day. Specifically I started taking security way more seriously. I started believing people when they said things like, &quot;someone can crack your machine at the drop of a hat so make sure you lock down XYZ thing.&quot;
&lt;/p&gt;
&lt;p&gt;Luckily for me I have not been rooted since. It is a feeling that I do not want to experience ever again. Even when I was a &quot;green as green&quot; green horn and I knew it, I still felt embarrassed beyond belief having to look Bud in the eye and come to grips with the fact that I got a box rooted. I can only imagine how low I would feel today. 
&lt;/p&gt;
&lt;p&gt;Hmm... I better stop typing and check my patches...
&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Walk the Command Line</title>
   <link href="http://hernan43.github.com/2009/04/30/walk-the-command-line.html"/>
   <updated>2009-04-30T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/04/30/walk-the-command-line</id>
   <content type="html">&lt;p&gt;When I was a young whipper snapper in college I was learning how to use &lt;a href=&quot;http://en.wikipedia.org/wiki/Solaris_Operating_System&quot;&gt;UNIX&lt;/a&gt; and I came from a world of &lt;a title=&quot;Microsoft Windows - Wikipedia, the free encyclopedia&quot; href=&quot;http://en.wikipedia.org/wiki/Microsoft_Windows&quot;&gt;Windows&lt;/a&gt; and &lt;a title=&quot;Mac OS - Wikipedia, the free encyclopedia&quot; href=&quot;http://en.wikipedia.org/wiki/Mac_OS&quot;&gt;Mac OS&lt;/a&gt;. I found the &lt;a title=&quot;Common Desktop Environment - Wikipedia, the free encyclopedia&quot; href=&quot;http://en.wikipedia.org/wiki/Common_Desktop_Environment&quot;&gt;CDE&lt;/a&gt; interface to be putrid at best. I also thought the command line stuff we had to do was an archaic holdover from caveman days.
&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;I hated using the command line but I thought, &quot;well, I have to crawl before I can walk.&quot; I mean, if it doesn't have a GUI it must be a pile of trash, right? So I put my head down, sucked it up, and trudged my way through countless classes stuck on command line UNIX hoping for better days ahead. No wonder no one uses UNIX operating systems.
&lt;/p&gt;
&lt;p&gt;Fast forward 13 years and here I am a command line chauvinist. I do everything I can on the command line. I seek out command line interfaces to *everything*. If some new thing floats across my way and I like it, the first thing I ask myself is, &quot;I wonder if it has a command line interface...&quot;
&lt;/p&gt;
&lt;p&gt;Thanks to places like &lt;a title=&quot;All commands | commandlinefu.com&quot; href=&quot;http://www.commandlinefu.com/commands/browse&quot;&gt;commandlinefu.com&lt;/a&gt; I can now feed my need like never before. Like &lt;a title=&quot;Delicious&quot; href=&quot;http://delicious.com/&quot;&gt;Delicious bookmarks&lt;/a&gt; for command line snippets, commandlinefu.com is loaded with gems.
&lt;/p&gt;
&lt;p&gt;Some of my favorites are:
&lt;ul&gt;
	&lt;li&gt;&lt;a title=&quot;Update twitter via curl | commandlinefu.com&quot; href=&quot;http://www.commandlinefu.com/commands/view/176/update-twitter-via-curl&quot;&gt;Tweeting from the shell&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a title=&quot;Twitpic upload and Tweet | commandlinefu.com&quot; href=&quot;http://www.commandlinefu.com/commands/view/2007/twitpic-upload-and-tweet&quot;&gt;Twitpic from the shell&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a title=&quot;Copy a MySQL Database to a new Server via SSH with one command | commandlinefu.com&quot; href=&quot;http://www.commandlinefu.com/commands/view/887/copy-a-mysql-database-to-a-new-server-via-ssh-with-one-command&quot;&gt;MySQL DB copy over SSH&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a title=&quot;output your microphone to a remote computer's speaker | commandlinefu.com&quot; href=&quot;http://www.commandlinefu.com/commands/view/350/output-your-microphone-to-a-remote-computers-speaker&quot;&gt;Output your microphone to a remote machine's speaker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;The command line is a treasure trove of automation and productivity enhancements. Not to mention it is seemingly a lost art. It seems as though, more and more, when I tell people to fire up a command line and run a specific command I am greeted with a groan. Is the command line truly dying? Or do I just hang out with too many GUIites?
&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Why add my voice to zillions of others</title>
   <link href="http://hernan43.github.com/2009/04/27/why-add-my-voice-to-zillions-of-others.html"/>
   <updated>2009-04-27T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2009/04/27/why-add-my-voice-to-zillions-of-others</id>
   <content type="html">&lt;p&gt;I signed up for a &lt;a href=&quot;http://en.wordpress.com/api-keys/&quot;&gt;Wordpress API key&lt;/a&gt; many a year ago. I needed it to try out &lt;a href=&quot;http://akismet.com/&quot;&gt;Akismet&lt;/a&gt;. I was teaching myself how to write &lt;a href=&quot;http://www.djangoproject.com&quot;&gt;Django&lt;/a&gt; apps and was doing the quintessential &quot;build your own blog&quot; method of self instruction.
&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;What I did not realize at the time was that it created a Wordpress.com blog for me when I created my account. Maybe I did realize it at the time and didn't care. Either way, I forgot it existed only to stumble across it years later. 
&lt;/p&gt;
&lt;p&gt;Now here I am at a Wendy's killing time before I have to go back to work. I have &lt;a href=&quot;http://macromates.com&quot;&gt;TextMate&lt;/a&gt; open and a spicy chicken sandwich at my side. I'm not really a writer and I have tried blogging in the past only to let my poor blog languish away in a furious firestorm of inactivity.
&lt;/p&gt;
&lt;p&gt;So why am blogging now? Well &lt;a href=&quot;http://www.rubyinside.com/11-tips-on-hiring-a-rails-developer-662.html&quot;&gt;I read somewhere&lt;/a&gt; that in order to make yourself more appealing to potential employers you should have a blog that you use to engage with the community.
&lt;/p&gt;
&lt;p&gt;I have no idea if this is at all effective or if I will even make my way back into the world of blogging but I guess I should try. Summer is coming back, the weather is changing, my garden is getting ready to burst forth with life, and I have a new found excitement for the spice of life.
&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Hello world!</title>
   <link href="http://hernan43.github.com/2006/08/05/hello-world.html"/>
   <updated>2006-08-05T00:00:00-07:00</updated>
   <id>http://hernan43.github.com/2006/08/05/hello-world</id>
   <content type="html">Welcome to &lt;a href=&quot;http://wordpress.com/&quot;&gt;WordPress.com&lt;/a&gt;. This is your first post. Edit or delete it and start blogging!
</content>
 </entry>
 
 
</feed>