Blog

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

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