Thursday, December 25, 2008

Giving Open Source for Christmas - Growl4Rails Plugin

Growl4Rails is a javascript component that provides the UI for growl-like notifications in your Rails application.

This plugin requires Prototype 1.6 or higher and Scriptaculous 1.7 or higher.



Installation


If you are on Rails 2.1 or higher:
$ script/plugin install git://github.com/jfiorato/growl4rails.git

For older versions of Rails, cd into your application's vendor/plugins, and execute the following:
$ git clone --depth 1 git://github.com/jfiorato/growl4rails.git
$ mkdir ../../public/javascripts/growl4rails ../../public/stylesheets/growl4rails ../../public/images/growl4rails
$ cp growl4rails/public/javascripts/* ../../public/javascripts/growl4rails/
$ cp growl4rails/public/stylesheets/* ../../public/stylesheets/growl4rails/
$ cp growl4rails/public/images/* ../../public/images/growl4rails/

Usage


In your view put the following:
<%= growl4rails_includes %>

Then when you'd like the Growl window to appear:
//javascript
Growl.show("/images/download.png", "Foo Bar.pdf", "File is ready for download.", 5000);

Growl.show method takes 4 arguments:
image - 32x32 icon
title - title of the growl
message - the growl message
duration - the length of time (in milliseconds) that the growl window shows


It's definitely got some kinks, but I'm working those out. Obviously, if you'd like to contribute, feel free!

Sunday, December 21, 2008

Building Something Other Than Software

Ok, so this doesn't have much to do with bits, but it does have to do with building things.

My wife got the idea (for me) to build Harvey (2 1/2) a kitchen for X-Mas this year. She got the idea from Apartment Therapy.

DSC_3759.JPGDSC_3760.JPG



I mostly followed what was described there, but embellished a little bit on the door and shelves and added a bit of structural support. All in all, with pots and pans and utensils it cost about a $100.

Fun project.

Thursday, December 04, 2008

More Cats

Fletcher thinks I need more cats on my blog. Here you go!

spaghetti-cat.jpg