SMS Fu Gets Rails 2.1 Compatibility

I've received a couple of e-mails regarding SMS Fu and its incompatibility with Rails 2.1 lately. I've been quite busy lately and haven't had much time to check out the situation, but fret no more. I've updated SMS Fu to be fully compatible with the newest version of Rails. Please visit the SMS Fu project page at ActsAsCommunity if you have any questions or comments or you could always check it out at GitHub. Also, if you're on 2.1, you can install SMS Fu directly from GitHub using the line below -- sexy.

script/plugin install git://

Send Text Messages From Rails with SMS Fu

This plugin has been sitting dormant for a while and I haven't had a chance to really write about it since I've been so busy lately. Basically what this is, is just a quick Rails plugin that allows you to send an SMS from your application. This does not require any kind of "gateway" or third-party service to get the job done. The plugin takes in a phone number, the carrier, and a message. From this information, it will format an e-mail correctly that will actually end up being sent to that phone in the form of a text message. How easy is it to use? Very.

You can grab the latest from GitHub.
git clone git:// vendor/plugins/sms_fu

Supported Carriers: Sorry, International carriers aren't supported at the moment. Alltel, Ameritech, AT&T, BellSouth Mobility, BlueSkyFrog, Boost Mobile, Cellular South, Fido, Metro PCS, PSC Wireless, Qwest, Southern Link, Sprint, Suncom, T-Mobile (US/UK/Germany), Virgin Mobile, Verizon Wireless, Vodafone (UK,Italy,Japan).

Add this one include line to one of your controllers.
class ExampleController < ApplicationController

After this, just edit /config/sms_fu.yml with your custom reply-to address.

The three required parameters are the phone number, carrier, and the message itself. You can find the correct carrier codes in sms_fu.yml.

deliver_sms("5558675309","AT&T","your message here")

You can set the maximum length of the SMS message, which is not set by default. Most phones can only accept 128 characters, and each phone can handle these messages differently. To set the limit, just pass it in as an option when delivering an SMS.

deliver_sms("5558675309","AT&T","your message here", :limit => 200)

If you want to roll your own mailer and just want to use SMS Fu to retrieve the formatted address of the recipient, you can do so by doing the following below.


Hope you all enjoy, and please send me some feedback on any new features you'd like added.

New Apple 30" Cinema Display

I've been putting this off for a while, mainly because of the fact that it costs quite a bit of money. Well, I ended up getting one today and I do not regret it one bit, especially since Edel knocked off about $800 of it for me. Since I do work from home, it will be used quite a bit and with the amount of windows I typically have open, I'll be using it to the fullest of it's potential, well, at least the resolution. There is indeed a correlation between screen size and productivity! Oh, and I must say that I find it quite easy on the eyes!

TinyURL Rails Plugin - ActsAsTinyURL

Today, I felt like making a quick little Rails plugin and what better & easier than one that ties into TinyURL's URL shortening services. The service works by you submitting them a URL, and they return to you a nice shortened version that redirects to the URL that you originally submitted. I've had to integrate their services into a web application before, but I didn't see a plugin made for this, so I thought I'd whip one up called ActsAsTinyURL because it was quick and easy.

script/plugin install

How do you use it? It's extremely simple. Once installed, open up a controller you want to use it in and put 'include ActsAsTinyURL' right underneath the class declaration.

class ApplicationController < ActionController::Base
  include ActsAsTinyURL

Once you've got this in place, you can start doing some quick magic.

tiny_url("")  # =>

Expect updates within the next few days when I get some added time in my schedule.

Yappd's Articles From Beginning to End

When we (Brent, Andrew, and myself), started Yappd in August, we didn't think it'd gain as much attention as it did. Not all of it was good attention, but we were all just happy to know that people noticed what we built. I never really spoke out about Yappd that much, but I must say that it is something that I am really proud of and I am amazed at how hard we worked to get it up and running within two weeks. After the acquisition of Yappd's "assets" and it's closing this month, I thought it'd be good to consolidate a list of articles that mentioned Yappd. Below is a list of all of the articles from popular publications and web blogs. I might have missed some, and if I did let me know and I'll make sure to add it in. Hopefully I'll be able to add another list like this for something else, but I don't think I'm allowed to do that anytime soon.

Yappd Launches, Calls Itself "Twitter With Pictures"
Yappd Didn't Last Long. Deadpool

PC Magazine
Get The Word out Fast! Yappd

Yappd is a Visual Twitter Clone
Visual Twitter Clone Yappd Acquired; By Who?

Center Networks
Interview with Yappd Co-Founder, Brendan Lim
Yappd Launches Developer API and Web Photo Uploads
Yappd Acquired

Extreme Tech
Twitter, Jaiku, Pownce, Yappd - Four Microblogging Sites Reviewed

Download Squad
Another Twitter Launches, This Time It's Called Yappd

Killer Startups
Yappd - Twitter With Picture Messaging

Crop Images Using attachment_fu and RMagick

I'm a big fan of attachment_fu, but one of the things that it doesn't do 'out-of-the-box' is allow you to specify a fixed width and height for a thumbnail so that you can create a cropped image. I spent a while digging around other sites and found some great tips from Toolman Tim regarding cropping images in attachment_fu using mini magick -- but what if you to stick with RMagick? In the model that is used for your uploaded images, just add a bang (!) to force a crop. Notice how the thumbnail type 'cropped' specifies height and width and contains a bang (!).

has_attachment :content_type => :image, 
               :storage => :s3,
               :path_prefix => '/your_directory/', 
               :max_size => 500.kilobytes,
               :resize_to => '400>',
               :thumbnails => { 
                 :regular_resize => '60', 
                 :cropped => '50x50!' }

Now, the next step is to modify rmagick_processor.rb in the processors directory of attachment_fu. Just replace your resize_image method with the one below and you should be good to go.

# Performs the actual resizing operation for a thumbnail
def resize_image(img, size)
  size = size.first if size.is_a?(Array) && size.length == 1 && !size.first.is_a?(Fixnum)
  if size.is_a?(Fixnum) || (size.is_a?(Array) && size.first.is_a?(Fixnum))
    size = [size, size] if size.is_a?(Fixnum)
    img.change_geometry(size.to_s) { |cols, rows, image| image.crop_resized!(cols, rows) }
  self.temp_path = write_to_temp_file(img.to_blob)

Highlights From My Cousin's Wedding

Just got back from Normandy, France, where the actual wedding took place. Now, I'm here in St. Brice, France, 18km away from Paris at my Uncle's house. Yesterday was quite a long day. It started with us going to the actual place of the wedding (45 min drive), setting up the mats & food for the Cambodian part of the wedding. We then all went to the city hall (200+ people) to see Samantha and Olivier get married.

_MG_7282.JPG   _MG_7281.JPG

Here's a picture of Samantha and Olivier leaving City Hall, and heading back to get ready for the Cambodian part of the wedding.


After we all left City Hall, we went back to have the Cambodian wedding. This took three hours, which to me, seemed like a lifetime -- but according to my father, some Cambodian weddings last up to three days. The place where everything took place looked amazing by the way. It was in the middle of nowhere -- just farm lands left and right.

_MG_7229.JPG   _MG_7121.JPG

The picture below was during the second half of the wedding ceremony.


As for me, besides taking pictures, eating cheese, drinking wine, and helping the photographer unload some pics, I pretty much smoked most of the time.


Ahh, and Chhorn did as well ..


Oh, and we had fun with Philip, who by the way, let me borrow the Canon EF-S 10-22mm lens -- and even bought me a cleaning kit for my camera. Philip, "fishing and drinking" if you're reading this by the way. :)


But, at around 1:30am, we realized we drank too much wine and had to go to bed. We missed out on the dancing, but we had a bunch of fun and will definitely remember all the good times we had with everybody.


Ended up taking about 350 pictures yesterday -- making this the biggest gallery I have on Flickr so far, with over 600 pictures. You can either choose to look at them individually (can download the images by clicking on 'All Sizes', or view them as a slideshow (bigger pictures --> recommended).