Author Archives: Tony

Rails Authentication with Devise and CanCan – Customizing Devise Controllers

I’m tired of spending loads of time creating user authentication systems with permissions or swimming against the current to customize what’s available. There’s great open source stuff out there but until now, I haven’t gotten the full package with really easy customization. The Devise and CanCan combo for user authentication and permissions in Rails is my [...]
Posted in Software | Tagged , , , , , , , | 12 Comments

Safely turn off Spotlight and remove from menu bar in OS X Snow Leopard

I don’t like the Spotlight indexing and search that is included in Mac OS X. I use Quicksilver instead but have been procrastinating turning off Spotlight. Well I finally got around to disabling Spotlight and wanted to go about it in a safe way. I came across too many forum posts doing dangerous things [...]
Posted in Software | Tagged , , , , , | Leave a comment

Country Seed Data for your Rails App

Never go looking for basic country seed data again: [ { :name => 'Afghanistan', :iso_two_letter_code => 'AF' }, { :name => 'Aland Islands', :iso_two_letter_code => 'AX' }, { :name => 'Albania', :iso_two_letter_code => 'AL' }, { :name => 'Algeria', :iso_two_letter_code => 'DZ' }, { :name => 'American Samoa', :iso_two_letter_code => 'AS' [...]
Posted in Software | Tagged , , , | 1 Comment

Simple Quarter Select – Rails plugin for Q1,Q2,Q3,Q4 selector

Have you ever wanted a select component for Quaters of the Fiscal Year (Q1,Q2,Q3,Q4)? The Simple Quarter Select Ruby on Rails plugin does it for you. It’s highly configurable and maps to the month of any datetime attribute in your model. Why map the quarter to a datetime attribute? I think the answer is obvious but [...]
Posted in Software | Tagged , , , , | Leave a comment

Scaling a Rails Application – Thinking About the Full Stack

I found a great presentation about scaling web applications that I wanted to share with the world. Enjoy! Scaling a Rails Application from the Bottom Up If you enjoyed this post, make sure you subscribe to my RSS feed!
Posted in Software | Tagged , , , | Leave a comment

Getting FancyUpload to work with Rails

FancyUpload is a slick looking file uploader with a progress bar. However, it’s not completely obvious how to get it working with your Rails application. I searched long and hard and found 2 pretty good examples here and here. The problem is that the former only works with Amazon S3, and the [...]
Posted in Software | Tagged , , , , , | 3 Comments

How to change a UIBarButtonItem in the iphone toolbar

I recently needed to add a custom button to the iPhone toolbar but it needed to have state. Specifically, I needed the ability to enable and disable it based on some conditions. I implemented this using two images for the button – one for enabled and one for disabled. First, add the button to the [...]
Posted in Software | Tagged , , | Leave a comment

B’more on Rails synopsis – April 2010

B’more on Rails is a community of Baltimore folks who use the Ruby programming language and the Ruby on Rails application framework. Check out our MeetUp page. Below is a brief synopsis from our April 2010 meetup. You can also download the slides here. Bundler is great for gem management. Among other [...]
Posted in Bmore On Rails Review, Software | Tagged , , , , , , , , , , , | Leave a comment

Install MySQL on Mac OS X 10.6 and add StartupItem

Installing MySQL on Mac OS X 10.6 took a bit of digging around. Here is a consolidated tutorial. I am leaving out sudo commands for convenience. Use them where you don’t have permission. # create the directory where you will keep your MySQL binary distribution mkdir ~/src cd ~/src   # download mysql binary distribution from http://dev.mysql.com/downloads/mysql/ # [...]
Posted in Software | Tagged , , , | 3 Comments

Recovering off screen windows in Mac OS X

I constantly lose windows on OS X. I think it’s because sometimes I am connected to an external monitor so OS X gets confused when I am not. I found a great solution online that I would like to re-post here so that I never have to look for it again and I [...]
Posted in Random, Software | 2 Comments