watch this  

the official mrchucho blog

This is bbot

Posted 2008 May 29

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, rbot.

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 about).

I’ve decided to make bbot available on github: http://github.com/mrchucho/bbot/tree/master. This way I hope to learn more about git and share bbot with anyone who might be interested.

comments (0)

Gmail prohibits attachments with "executable" files

Posted 2008 May 05

Since when does Gmail prohibit sending email with a .bat file attached? It won’t even send a Zip file that includes a .bat file.

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.

comments (0)

Tulsa Ruby Workshop

Posted 2008 Apr 11

If you’re in Tulsa or the surrounding area and want to learn more about Ruby (or just meet other Tulsa Rubyists) please attend the Tulsa Ruby Workshop Saturday April 26th from 10am to 4pm.

Hope to see you there.

comments (0)

Tip: Capistrano local_repository

Posted 2008 Feb 19
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.

set :repository, "file:///path/to/repository" 

However your workstation (from which you’ll run Capistrano) will need to access the repository over the network. This is accomplished by setting that local_respository parameter. “local”, in this case, meaning your local workstation.

set :local_repository, "http://host/svn/repository" 

Thanks to an article on my host, Slicehost, for pointing this out.
comments (0)

The REST is History

Posted 2008 Feb 14

It’s all about the Rewrite Condition.

Rails page caching is great and REST is great, but together they can be confusing. Considering a resource “Posts”, Rails gives you the following routes:

  GET    /posts     {:controller=>"posts", :action=>"index"}
 POST    /posts     {:controller=>"posts", :action=>"create"}
  PUT    /posts/:id {:controller=>"posts", :action=>"update"}

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 “posts.html”. The end result is that you can’t create or update the “Posts” resource. The solution, let Apache handle the GET requests and mongrel handle everything else:

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]

comments (0)

Quick Mac Clone

Posted 2008 Feb 02

Boot your Mac using the “Mac OS X Install Disc”, then select “Utilities > Terminal…” 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):

asr —source /Volumes/Macintosh\\ HD —target /Volumes/Clone —erase

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.

comments (0)

Leopard: readline and vi bindings

Posted 2007 Nov 06

After upgrading to Leopard and reading about how readline support was included for irb (among other things), I was frustrated to find that my vi bindings were not working. vi bindings worked fine for bash, but irb, python, mysql, etc. reverted to the default emacs bindings. Well, it turns out that Leopard actually uses libedit, a “non-GPL replacement for readline library”.

Apparently, libedit uses .editrc instead of .inputrc and has a different syntax. So, in order to get vi bindings in Leopard, create the file .editrc with the following contents: bind -v
comments (5)

Tapestry-style views for Rails

Posted 2007 Jun 27

When I first heard about Rails, I was using the Java Framework Tapestry for most of my projects. My first complaint about Rails was that one had to mix code, albeit concise, into the HTML view. Whereas, in Tapestry, you add an HTML identifier and the dynamic content is mixed-in during rendering.

In fact, I posted my thoughts on DHH’s blog and subsequently had a short conversation with the Rails creator on my site.

Well, it looks like someone has finally implemented Tapestry-style, HTML-only views for Rails: Lilu.

comments (0)

Growl Plugin for Firefox Updated

Posted 2007 Apr 29

I’ve updated my Growl plugin for Firefox to remove the dependency on “growlnotify”. I submitted an update for the Official Mozilla page.

Download from mrchucho.net.

comments (2)

Big Update to Growl Firefox Plugin Coming!

Posted 2007 Apr 29

Thanks to reader “Alex P”, it looks like I’ll be able to remove the dependency on “growlnotify” from the Growl plugin for Firefox. Stay tuned!

comments (0)
atom rss