Saturday, December 11, 2010

Per Host SSH Key Configuration

You can automatically specify an SSH private key, via local configuration, when connecting to SSH hosts. This is especially helpful when using Git to connect to multiple repositories which require different SSH keys.

On a Unix client (or compatible shell such as cygwin, Xming, or msysgit ), create/modify ~/.ssh/config
Host HOSTNAME_OR_IP
IdentityFile ~/.ssh/OTHER_ID_RSA

Wednesday, June 16, 2010

How to Enable Aero on Windows 7 N


To enable the Aero UI enhancements in Windows 7, you must "rate" your computer using the Performance Information and Tools panel. If you receive the error: "This system does not have the necessary multi-media support to run the requested assessment", you may not have Windows Media Player installed (especially if you are running Windows 7 N). Download and install Windows Media Player at http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx and try again.

Tuesday, March 02, 2010

Convert a Hash to a Query String or Parameter String

I Rails, to convert a Hash object into a query string or parameter string for use in a url:

opts = {:a => 1, :b => 2}
params = ActionController::Routing::Route.new.build_query_string(opts)

Params => "?a=1&b=2"

Friday, February 05, 2010

Ruby Multithreading with a Thread Size Limit

I wrote this class in the process of writing a multithreaded Amazon S3 key migrator. S3 doesn't like that, so don't even bother.

You will want to use this with a thread-safe process block.

Tuesday, January 19, 2010

My .irbrc Ruby irb and Rails console configuration

Here is my customized configuration file for Ruby irb and Rails console. You will need to install the wirble and hirb gems for full functionality.

Monday, January 18, 2010

Compile FFMPEG from Source with x264 Support

Here are my notes for compiling FFMPEG from source with x264 and Xvid/DivX support on Ubuntu 9.10 Karmic Koala.

Your milage may vary!!!