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
/* Base UIViewController subclass for your iPhone applications which automatically | |
* releases your instance variables pointing to UIView objects or UIView-subclassed objects, | |
* limiting the work you have to do in -dealloc and -viewDidUnload | |
* | |
* All you have to do is make your UIViewController subclasses inherit from BaseUIViewController | |
* instead of UIViewController | |
* | |
* The helper function that disposes of objects is generalized and can be used for other | |
* types of objects as well. | |
* |
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
#!/usr/bin/env ruby -Ku | |
# encoding: utf-8 | |
require 'rubygems' | |
require 'dm-core' | |
require 'dm-migrations' | |
DataMapper::Logger.new($stdout, :debug) | |
DataMapper.setup(:default, 'sqlite3::memory:') |
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
source "http://rubygems.org" | |
gem 'rack-contrib', :git => 'git://github.com/rack/rack-contrib.git' | |
gem 'rack-rewrite' |
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
set :application, "_____" | |
set :repository, "[email protected]:_____/#{application}.git" | |
begin | |
# Parsing the annoying multi-line output of 'git branch'... | |
set :branch, `git branch --no-color`.match(/\* (.+)/)[1] | |
rescue Exception => e | |
set :branch, '(none)' | |
end |
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
# encoding: utf-8 | |
module Mongoid #:nodoc: | |
module Associations #:nodoc: | |
module EmbeddedCallbacks | |
# bubble callbacks to embedded assocaitions | |
def run_callbacks(*args) | |
# now bubble callbacks down | |
self.associations.each_pair do |name, meta| | |
if meta.association == Mongoid::Associations::EmbedsMany |
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
NSString *urlString = @"http://yourserver.com/upload_huge_file"; | |
NSString *filename = @"filename"; | |
NSString * pathToHugeFileToPost = @"hugeFile"; | |
NSMutableURLRequest * request= [[[NSMutableURLRequest alloc] init] autorelease]; | |
[request setURL:[NSURL URLWithString:urlString]]; | |
[request setHTTPMethod:@"POST"]; | |
NSString *boundary = @"---------------------------14737809831466499882746641449"; | |
NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary]; |
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
#!/bin/bash | |
# https://gist.github.com/949831 | |
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
# command line OTA distribution references and examples | |
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html |
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
# | |
# lib/mongoid/counter_cache.rb | |
# ruby | |
# | |
# Created by Zhang Alex on 2011-06-17. | |
# Copyright 2011 __ZhangHanDong__. All rights reserved. | |
# | |
# =================================== | |
# class Forum | |
# references_many :topics |
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
var control = require('control'), | |
script = process.argv[1], | |
perform = control.perform, | |
task = control.task; | |
var ProjectConfig = { | |
rootDir: 'staging', | |
git: 'git://github.com/we4tech/restaurant-review.git', | |
branch: 'master', | |
serverPort: 4000 |
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
// | |
// TransitionController.h | |
// | |
// Created by XJones on 11/25/11. | |
// | |
#import <UIKit/UIKit.h> | |
@interface TransitionController : UIViewController |
OlderNewer