Blog

Tuesday, June 21, 2011

Access the last argument for a UNIX command to use in your next command

You can access the argument using the !$ variable. For example:

Monday, May 16, 2011

"Building Web Apps with HTML5: Beyond the Buzzword" Follow-up

Just completed the Building Web Apps with HTML5: Beyond the Buzzword at RailsConf. The tutorial was well organized, had a quick pace and finished early, which is a good sign in my book. I'm not a fan of having a mad rush at the end to get everything finished. The tutorial itself was mostly self-directed with some discussion throughout so I'm not sure how much value was added by the instructor or doing it as a group.

Overall, well worth the time to get your feet wet with these emerging technologies. You can complete the tutorial yourself at: https://github.com/subelsky/html5tutorial. Thanks Mike Subelsky for your efforts.

One useful resource referenced throughout the tutorial is the website Dive into HTML5. Check it out.

Friday, May 6, 2011

What Git revision is deployed to Heroku?

Updated: Does not work on Heroku's Cedar stack.

If you want to know which revision has been deployed to Heroku execute the following command in your project:

heroku console "ENV['COMMIT_HASH']"

Credit: http://stackoverflow.com/questions/2281772/view-remote-git-revision-on-heroku/4609925#4609925

Tuesday, May 3, 2011

Compare Git Branches, Compare Two Files in Different Branches

Git offers a couple of great commands for comparing branches. To get a comparison of branches in a "status" type format:

git diff --name-status branch1..branch2

Will give you output something like:

M       config/boot.rb
M       config/database.yml
M       config/deploy.rb
M       config/environment.rb
M       config/environments/development.rb
M       config/environments/production.rb
M       config/environments/staging.rb

Now that you have a list of files, you may wish to get a diff of a specific file:

git difftool branch1:config/environment.rb branch2:config/environment.rb

On OSX, this will open the awesome FileMerge.app allowing you to compare both files.

File merge

Saturday, April 16, 2011

Installing RubyGems with no Rdoc/RI

Finally took the step today of not generating RDoc and Ri when installing Ruby Gems by default by adding the following to ~/.gemrc.

install: --no-rdoc --no-ri
update: --no-rdoc --no-ri

Saturday, April 9, 2011

Code examples from Associative Arrays with James Edward Gray II

I watched David Brady's pod call with James Edward Gray II discussing Associative Arrays. There are definitely some gems (no pun intended) in this video. While watching the video I transcribed the code examples below.

Associative Arrays with James Edward Gray II from David Brady on Vimeo.

Monday, April 4, 2011

Looking for a Montréal-based Ruby on Rails developer?

Admittedly, I have been booked for a while now and haven't had any time to take on any projects. So where does one go if they are looking for Ruby on Rails developers located in Montréal? I would recommend checking out Working with Rails.

You might like to do a keyword search for Montréal or browse for developers located in Canada. I hope this helps your search for developers.

Please note this blog is no longer maintained. Please visit CivilCode Inc - Custom Software Development.