Breaking into Orkut with Mechanize

Posted by Corban Brook Mon, 26 Feb 2007 16:05:28 GMT

Alternate title: Using Mechanize to Scrape Orkut for Love Letters from Lonely Brazilian Beauties and Translating their Wantings to English

Shout outs to Natai for the request.

In this tutorial we will use mechanize to login to Orkut, pull our scrap messages, we will assume the message is written in Portuguese and translate the message to English with Google Translate.

FUN!

Read more...

Posted in  | Tags , ,  | 5 comments

Scraping Gmail with Mechanize and Hpricot

Posted by Corban Brook Thu, 15 Feb 2007 02:48:54 GMT

This quick tutorial will show you how to use mechanize and hpricot to login to gmail and return a list of Unread emails.

Read more...

Posted in  | Tags , , ,  | 13 comments

Multiple Concurrent Database Connections with ActiveRecord

Posted by Corban Brook Wed, 06 Dec 2006 21:08:32 GMT

ActiveRecord is a great tool to use for database maintenance as I explored in my previous article, Using ActiveRecord for Simple Maintenance Scripting, but what if you need to do tasks that require you to be connected to multiple databases at once.

Perhaps you want to compare records in one database and copy them to another, well heres how you do it.

Read more...

Posted in  | 8 comments

250 RadRails Templates

Posted by Corban Brook Fri, 17 Nov 2006 16:41:31 GMT

Dr. Nic has converted all of the Textmate snippets to RadRails templates. All 250 of them.

RADRails will include these templates in the new version 0.7.2 scheduled to push next week, but if you cant wait, download them now from Dr. Nics new site, www.radrailstemplates.com.

Posted in ,  | no comments

Installing Rails and Mongrel on a Shared Host

Posted by Corban Brook Wed, 15 Nov 2006 22:01:10 GMT

In some situations you may find yourself needing to install mongrel or other ruby gems in a shared environment and the documentation out there for taking on such an enterprise is quite lacking.

Today I went through the trouble and figured out how.

Read more...

Posted in ,  | 2 comments

Using RMagick with Flickr

Posted by Corban Brook Mon, 23 Oct 2006 21:14:00 GMT

In my previous article, Render Great-looking Collages with Ruby and RMagick, I showed how you can use RMagick to generate a lovely collage from a selection of random images. This tutorial will take it one step further and show you how to use RMagick with RFlickr to generate a collage from your own Flickr account or even a results from a flickr search.

4 random images found with the search term “Mazda MX-3” (my car)

Read more...

Posted in  | Tags , ,  | 3 comments

Render Great-looking Collages with Ruby and RMagick

Posted by Corban Brook Wed, 18 Oct 2006 19:46:32 GMT

Yesterday I was glancing Douglas Bowman’s Photo gallery and a fun idea came to me. Inspired by using photo slides on a light table, Douglas employs a unified theme and feel across his gallery. Kindly he released the theme free for use and is available for download on his website.

Douglas is an incredible graphic artist and prepares lovely photo collages for each gallery in his album painstakingly by hand.

What if we wanted to to generate such a collage on the fly from random images in our gallery? What follows is some insight into using RMagick to accomplish just such a task.


Read more...

Posted in  | Tags  | 14 comments

Mongrel 0.3.13.4 Pre-Release

Posted by Corban Brook Sun, 30 Jul 2006 16:55:00 GMT

Mongrel 0.3.13.4 Pre-Release is out and now it supports an option for prefixing your rails applications into sub directories.

“A new—prefix command line option for people who want to mount their rails app at a different base URI.”

This means you can now run rails applications from within a sub directory off the webroot easily and without broken paths.

Note: I have tested this with a collaboa install in a sub dir, like: http://www.domain.com/collaboa and it works without a hitch.

Read more...

Posted in ,  | no comments | no trackbacks

Using ActiveRecord for Simple Maintenance Scripting

Posted by Corban Brook Tue, 09 Aug 2005 20:12:00 GMT

Over the last year the new ruby web framework, Ruby on Rails, has been rapidly maturing and a 1.0 release is due to push before RubyConf2005 in October. Rails is designed for RAD utilizing code generators and scaffolding allowing developers to quickly prototype interfaces to database tables . A great deal of the Rails magic comes from the ActiveRecord library which implements ORM to effectively map database tables to classes and appends CRUD functionality.

The purpose of this article is to show how to use the ActiveRecord library standalone in your own scripts.

Read more...

Posted in ,  | no comments | no trackbacks