Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jerodsanto's full-sized avatar
:shipit:
Always be shipping

Jerod Santo jerodsanto

:shipit:
Always be shipping
View GitHub Profile
# 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
require 'rubygems'
require 'benchmark'
gem = ARGV.shift.strip rescue ''
if gem == ''
STDERR.puts "usage: #{$0} [gem]"
exit 1
end
`free`
- (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];
=== 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
@jerodsanto
jerodsanto / firebug_logger.rb
Created December 9, 2009 16:23 — forked from simonjefford/firebug_logger.rb
Rack::FirebugLogger
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'])
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;