<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <id>tag:mrchucho.net,2008:/posts</id>
  <link type="text/html" href="http://mrchucho.net" rel="alternate"/>
  <link type="application/atom+xml" href="http://mrchucho.net/posts.atom" rel="self"/>
  <title type="html">watch this &amp;amp;nbsp;</title>
  <updated>2008-09-30T12:04:20-04:00</updated>
  <entry>
    <id>tag:mrchucho.net,2008:Post/374</id>
    <published>2008-09-30T12:04:20-04:00</published>
    <updated>2008-09-30T12:05:13-04:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/09/30/the-correct-way-to-override-activerecordbasedestroy" rel="alternate"/>
    <title>The correct way to override ActiveRecord::Base#destroy</title>
    <content type="html">&lt;p&gt;In order to correctly override #destroy in an ActiveRecord model, you actually need to implement #destroy_without_callbacks like so:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
def destroy_without_callbacks
  unless new_record?
    # do your custom stuff here, then save
  end
  freeze
end
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Simply implementing #destroy will short-circuit the callback chain and skip the destroy method on any associations marked :dependent =&amp;gt; :destroy.&lt;/p&gt;</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
  <entry>
    <id>tag:mrchucho.net,2008:Post/373</id>
    <published>2008-08-23T10:21:07-04:00</published>
    <updated>2008-08-23T10:21:44-04:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/08/23/times-tables" rel="alternate"/>
    <title>Times Tables</title>
    <content type="html">&lt;p&gt;To help my daughter practice multiplication and to experiment with &lt;a href="http://code.google.com/appengine/"&gt;Google App Engine&lt;/a&gt;, I created a small app for doing your times tables.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://times-tables.appspot.com/"&gt;http://times-tables.appspot.com/&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m pretty impressed with &lt;acronym title="Google App Engine"&gt;GAE&lt;/acronym&gt;. It&amp;#8217;s very easy to use, the Mac App Launcher is helpful and the online Dashboard is well done. I especially like the ability to upload and stage multiple versions.&lt;/p&gt;</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
  <entry>
    <id>tag:mrchucho.net,2008:Post/372</id>
    <published>2008-06-24T10:22:17-04:00</published>
    <updated>2008-07-09T08:00:24-04:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/06/24/next-image-on-amo" rel="alternate"/>
    <title>Next Image on AMO</title>
    <content type="html">&lt;p&gt;I&amp;#8217;ve started the process of having Next Image hosted on the official Mozilla Add-ons site. Once it receives enough ratings, it can be nominated for the public site.&lt;/p&gt;


	&lt;p&gt;Please rate or review Next Image via it&amp;#8217;s sandbox page:&lt;/p&gt;


	&lt;p&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/7824"&gt;Next Image :: Firefox Add-ons&lt;/a&gt;&lt;/p&gt;</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
  <entry>
    <id>tag:mrchucho.net,2008:Post/371</id>
    <published>2008-06-23T12:21:51-04:00</published>
    <updated>2008-06-23T14:33:29-04:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/06/23/next-image-updated-for-firefox-3" rel="alternate"/>
    <title>Next Image Updated for Firefox 3</title>
    <content type="html">&lt;p&gt;I&amp;#8217;m in the process of updating my extensions to support Firefox 3. Unfortunately, there were some significant changes in how extensions can be served. So, at this point, only my Next Image plugin is working. Also, it might not show up via the Add-ons manager &amp;#8220;Find Update&amp;#8221;, so please install it directly.&lt;/p&gt;


	&lt;p&gt;Project Page: &lt;a href="http://www.mrchucho.net/pages/projects#nextimage"&gt;http://www.mrchucho.net/pages/projects#nextimage&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Direct Link: &lt;a href="http://www.mrchucho.net/downloads/nextimage-0.9.xpi"&gt;http://www.mrchucho.net/downloads/nextimage-0.9.xpi&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Updated&lt;/strong&gt; &amp;#8211; My second extension, This Window, is now up-to-date and available, too.&lt;/p&gt;


	&lt;p&gt;Project Page: &lt;a href="http://www.mrchucho.net/pages/projects#thiswindow"&gt;http://www.mrchucho.net/pages/projects#thiswindow&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Direct Link: &lt;a href="http://www.mrchucho.net/downloads/thiswindow-0.8.xpi"&gt;http://www.mrchucho.net/downloads/thiswindow-0.8.xpi&lt;/a&gt;&lt;/p&gt;</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
  <entry>
    <id>tag:mrchucho.net,2008:Post/370</id>
    <published>2008-05-29T19:03:08-04:00</published>
    <updated>2008-05-29T19:14:14-04:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/05/29/this-is-bbot" rel="alternate"/>
    <title>This is bbot</title>
    <content type="html">&lt;p&gt;This blog is powered by a custom blog engine I wrote in Rails. I call it bbot as an homage to my favorite Ruby irc bot, &lt;a href="http://ruby-rbot.org/"&gt;rbot&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;I built bbot for two reasons: I wanted to build a completely RESTful application from scratch and I was tired of wrangling with Wordpress. bbot is simple; it does exactly want I need and nothing more. It supports all the basic blogging features: posts, comments, moderating, drafts, permalinks, etc. plus non-post static page (e.g. my &lt;a href="http://www.mrchucho.net/pages/about"&gt;about&lt;/a&gt;).&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve decided to make bbot available on github: &lt;a href="http://github.com/mrchucho/bbot/tree/master"&gt;http://github.com/mrchucho/bbot/tree/master&lt;/a&gt;. This way I hope to learn more about git &lt;em&gt;and&lt;/em&gt; share bbot with anyone who might be interested.&lt;/p&gt;</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
  <entry>
    <id>tag:mrchucho.net,2008:Post/369</id>
    <published>2008-05-05T22:53:47-04:00</published>
    <updated>2008-05-05T22:53:47-04:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/05/05/gmail-prohibits-attachments-with-executable-files" rel="alternate"/>
    <title>Gmail prohibits attachments with "executable" files</title>
    <content type="html">&lt;p&gt;Since when does Gmail prohibit sending email with a .bat file attached? It won&amp;#8217;t even send a Zip file that &lt;em&gt;includes&lt;/em&gt; a .bat file.&lt;/p&gt;


	&lt;p&gt;Of course, executable shell scripts for other platforms can still be attached and sent. Apparently, even legitimate users require protection from the scourge of Windows batch files.&lt;/p&gt;</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
  <entry>
    <id>tag:mrchucho.net,2008:Post/368</id>
    <published>2008-04-11T14:10:22-04:00</published>
    <updated>2008-04-11T14:10:22-04:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/04/11/tulsa-ruby-workshop" rel="alternate"/>
    <title>Tulsa Ruby Workshop</title>
    <content type="html">&lt;p&gt;If you&amp;#8217;re in Tulsa or the surrounding area and want to learn more about Ruby (or just meet other Tulsa Rubyists) please attend the &lt;a href="http://tulsarubyworkshop.com/"&gt;Tulsa Ruby Workshop&lt;/a&gt; Saturday April 26th from 10am to 4pm.&lt;/p&gt;


	&lt;p&gt;Hope to see you there.&lt;/p&gt;</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
  <entry>
    <id>tag:mrchucho.net,2008:Post/367</id>
    <published>2008-02-19T14:03:10-05:00</published>
    <updated>2008-02-24T16:14:21-05:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/02/19/tip-capistrano-local_repository" rel="alternate"/>
    <title>Tip: Capistrano local_repository</title>
    <content type="html">In the case where your application is deployed on the same server as your Subversion repository, it can be helpful to access the repository via the file system rather than over the network.
&lt;pre&gt;
&lt;code&gt;
set :repository, "file:///path/to/repository" 
&lt;/code&gt;
&lt;/pre&gt;
However your workstation (from which you&amp;#8217;ll run Capistrano) will need to access the repository over the network. This is accomplished by setting that &lt;strong&gt;local_respository&lt;/strong&gt; parameter. &amp;#8220;local&amp;#8221;, in this case, meaning your local workstation.
&lt;pre&gt;
&lt;code&gt;
set :local_repository, "http://host/svn/repository" 
&lt;/code&gt;
&lt;/pre&gt;
Thanks to an &lt;a href="http://articles.slicehost.com/2008/2/1/capistrano-series-alternative-subversion-setups"&gt;article&lt;/a&gt; on my host, &lt;a href="http://www.slicehost.com/"&gt;Slicehost&lt;/a&gt;, for pointing this out.</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
  <entry>
    <id>tag:mrchucho.net,2008:Post/366</id>
    <published>2008-02-14T13:56:28-05:00</published>
    <updated>2008-02-24T16:14:21-05:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/02/14/the-rest-is-history" rel="alternate"/>
    <title>The REST is History</title>
    <content type="html">&lt;p&gt;It&amp;#8217;s all about the Rewrite Condition.&lt;/p&gt;


Rails &lt;strong&gt;page caching&lt;/strong&gt; is great and &lt;span class="caps"&gt;REST&lt;/span&gt; is great, but together they can be confusing. Considering a resource &amp;#8220;Posts&amp;#8221;, Rails gives you the following routes:
&lt;pre&gt;
&lt;code&gt;
  GET    /posts     {:controller=&amp;gt;"posts", :action=&amp;gt;"index"}
 POST    /posts     {:controller=&amp;gt;"posts", :action=&amp;gt;"create"}
  PUT    /posts/:id {:controller=&amp;gt;"posts", :action=&amp;gt;"update"}
&lt;/code&gt;
&lt;/pre&gt;
If you have Apache configured with mod_rewrite to serve your cached pages (instead of sending them to mongrel, e.g.), then all of those routes appear to be requests for &amp;#8220;posts.html&amp;#8221;. The end result is that you can&amp;#8217;t create or update the &amp;#8220;Posts&amp;#8221; resource.

The solution, let Apache handle the &lt;span class="caps"&gt;GET&lt;/span&gt; requests and mongrel handle everything else:
&lt;pre&gt;
&lt;code&gt;
RewriteEngine On
RewriteRule ^/$ /index.html [QSA]

RewriteCond %{REQUEST_METHOD} ^GET$
RewriteRule ^([^.]+)$ $1.html [QSA]

RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
&lt;/code&gt;
&lt;/pre&gt;</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
  <entry>
    <id>tag:mrchucho.net,2008:Post/365</id>
    <published>2008-02-02T17:04:19-05:00</published>
    <updated>2008-02-24T16:14:21-05:00</updated>
    <link type="text/html" href="http://mrchucho.net/2008/02/02/quick-mac-clone" rel="alternate"/>
    <title>Quick Mac Clone</title>
    <content type="html">&lt;p&gt;Boot your Mac using the &amp;#8220;Mac &lt;span class="caps"&gt;OS X&lt;/span&gt; Install Disc&amp;#8221;, then select &amp;#8220;Utilities &amp;gt; Terminal&amp;#8230;&amp;#8221; to get a command prompt. With an external drive attached, run the following command substituting the name of the disk you want to clone (source) and the name of the partition onto which you want to place the clone (target):&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;asr &amp;#8212;source /Volumes/Macintosh\ HD &amp;#8212;target /Volumes/Clone &amp;#8212;erase&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;This will do a fast, block-level bootable clone of your Mac. I use this all the time before doing any major upgrades or changes to the partition table.&lt;/p&gt;</content>
    <author>
      <name>mrchucho</name>
    </author>
  </entry>
</feed>
