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
@interface GGConnectedAccountStore : NSObject | |
- (GGConnectedAccount *)accountWithType:(GGAccountType)accountType; | |
@property (nonatomic, strong) NSArray *accounts; | |
@end | |
@interface GGConnectedAccount : NSObject | |
- (id)initWithAccountType:(GGConnectedAccountType)type; | |
@property (nonatomic, assign) GGConnectedAccountType type; | |
@property (nonatomic, copy) NSString *username; |
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
Pod::Spec.new do |s| | |
s.name = 'Kiwi' | |
s.version = '1.1.1' | |
s.summary = 'A Behavior Driven Development library for iPhone and iPad development.' | |
s.homepage = 'http://kiwi-lib.info' | |
s.authors = { 'Allen Ding' => '[email protected]', 'Luke Redpath' => '[email protected]' } | |
s.license = { :type => 'MIT', :file => 'License.txt' } | |
s.source = { :git => 'https://github.com/allending/Kiwi.git', :tag => '1.1.1' } | |
s.source_files = 'Kiwi' | |
s.framework = 'SenTestingKit' |
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 'https://rubygems.org' | |
gem 'rails', '3.1.0' | |
gem 'haml' | |
group :development, :test do | |
gem 'ruby-debug19' | |
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
require 'yaml' | |
require 'logger' | |
require 'active_record' | |
namespace :db do | |
def create_database config | |
options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'} | |
create_db = lambda do |config| | |
ActiveRecord::Base.establish_connection config.merge('database' => nil) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
## Setup the following Custom Actions in SourceTree preferences in order | |
## to easily open a FILE or commit SHA in a browser on github.com | |
# No need to checkmark "Open in Separate Window" or "Show in Full Output" | |
# Menu Caption: Open SHA on github.com | |
# Script to run: ~/path/to/this_script.rb | |
# Parameters: $SHA |
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
import UIKit | |
class BaseGrid { | |
init() { | |
initGrid() | |
} | |
// Subclasses override this function | |
func initGrid() { | |
println("Superclass") |
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 | |
require 'colorize' | |
PROJECT_NAME = 'provide' | |
PROJECT_BUILD_COMMAND = "xcodebuild -workspace #{PROJECT_NAME}.xcworkspace -scheme #{PROJECT_NAME} > /dev/null" | |
ALL_SWIFT_FILES = Dir["#{PROJECT_NAME}/**/*.swift"] | |
def main | |
# checks_to_perform = [ |
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
SCRIPT_LOCATION='/usr/local/bin/swiftlint' | |
VIOLATIONS_TO_IGNORE="\ | |
Length|\ | |
Force Cast|\ | |
Name Format|\ | |
TODO or FIXME" | |
if [ -e $SCRIPT_LOCATION ] ; then | |
$SCRIPT_LOCATION | grep -Ev "($VIOLATIONS_TO_IGNORE) Violation" |
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
import Foundation | |
let session = NSURLSession.sharedSession() | |
let requestIsBeingHandledKey = "RequestIsBeingHandledKey" | |
class CustomNSURLProtocol: NSURLProtocol { | |
override class func canInitWithRequest(request: NSURLRequest) -> Bool { | |
if NSURLProtocol.propertyForKey(requestIsBeingHandledKey, inRequest: request) != nil { | |
return false // Prevent recursize loop |
OlderNewer