Using specific version of a gem's executable

Example:

  • bundle _1.0.21_
  • rails _3.0.1_

How to list fontnames and font families in iOS

NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]];

NSArray *fontNames;
NSInteger indFamily, indFont;
for (indFamily=0; indFamily<[familyNames count]; ++indFamily)
{
    NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]);
    fontNames = [[NSArray alloc] initWithArray:
                 [UIFont fontNamesForFamilyName:
                  [familyNames objectAtIndex:indFamily]]];
    for (indFont=0; indFont<[fontNames count]; ++indFont)
    {
        NSLog...

How to access backbone.js ajax response headers

var request = foo.destroy({
    success: function() {
        window.location = request.getResponseHeader('Location');
    }
})

Rails counter_cache

It seems rails is automagically detecting the counter_cache field even if you don't set :counter_cache to something and even if you set it to false.

IE and Rails respond_to ordering

http://blog.andrewbruce.net/respond_to-ordering-still-causing-havoc-with-internet-explorer-7

CSS Fix for Firefox Button text vertical alignment

input::-moz-focus-inner /*Remove button padding in FF*/
{ 
  border: 0;
  padding: 0;
}