This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upArrow = [[CPImage alloc] initWithContentsOfFile:@"Resources/upArrow.png" size:CGSizeMake(8.0, 7.0)]; | |
downArrow = [[CPImage alloc] initWithContentsOfFile:@"Resources/downArrow.png" size:CGSizeMake(8.0, 7.0)]; | |
@implementation CPTableHeaderView (myAdditions) | |
- (void)mouseDown:(CPEvent)anEvent | |
{ | |
var selectedColumnNumber = [self columnAtPoint:[self convertPoint:[anEvent locationInWindow] fromView:nil]]; | |
if(selectedColumnNumber == CPNotFound) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rack | |
class FirebugLogger | |
def initialize(app, options = {}) | |
@app = app | |
@options = options | |
end | |
def call(env) | |
status, headers, orig_response = @app.call(env) | |
return [status, headers, orig_response] unless (headers["Content-Type"] =~ /html/ && env['firebug.logs']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== Epic Snow Leopard Upgrayyyyd Guide === | |
Son, you’re now living in the land of 64-bit systems. | |
That means that some of your 32-bit shit is now broken. | |
Not all is lost. | |
== Fixing MySQL weirdness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |
[window addSubview:[navigationController view]]; | |
[window makeKeyAndVisible]; | |
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; | |
} | |
// Delegation methods | |
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken { | |
Device *device = [[Device alloc] init]; | |
device.token = [devToken description]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'benchmark' | |
gem = ARGV.shift.strip rescue '' | |
if gem == '' | |
STDERR.puts "usage: #{$0} [gem]" | |
exit 1 | |
end | |
`free` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Point *.example.com in your DNS setup to your server. | |
# | |
# 2) Setup an Apache vhost to catch the star pointer: | |
# | |
# <VirtualHost *:80> | |
# ServerName *.example.com | |
# </VirtualHost> | |
# | |
# 3) Set the current account from the subdomain | |
class ApplicationController < ActionController::Base |