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
// | |
// EGOTitledTableViewCell.h | |
// EGOClasses | |
// | |
// Created by Shaun Harrison on 6/2/09. | |
// Copyright 2009 enormego. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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 -w | |
# | |
# This is a script to help view a patch file in the Changes.app[1] UI. It is | |
# pretty basic, but does the job. It simply creates 2 copies of the file, | |
# where in one (the "original") it strips all the lines starting with '+', and | |
# the other (the "modified") it strips all the lines starting with '-'. It | |
# also removes the first character of all lines starting with a space, +, or - | |
# Then it simply uses the chdiff command line too to view the differences. | |
# | |
# It takes input either from filename arguments (multiple files are ok, but it |
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
// | |
// Copyright (c) 2012 Cédric Luthi / @0xced. All rights reserved. | |
// | |
#if TARGET_IPHONE_SIMULATOR | |
static NSString * const FakeCarrier = @"AT&T"; | |
#import <objc/runtime.h> |
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
<?xml version="1.0"?> | |
<!DOCTYPE suppressions PUBLIC | |
"-//Puppy Crawl//DTD Suppressions 1.1//EN" | |
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> | |
<suppressions> | |
<!-- Turn off all checks for some libraries. --> | |
<suppress checks="." files="com[\\/]google[\\/]..*.java" /> | |
<!-- Turn off header checks for some libraries. --> | |
<suppress checks="Header" files=".*[\\/]android[\\/]fastroid[\\/].*\.java"/> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | |
<!-- | |
This configuration file was written by the eclipse-cs plugin configuration editor | |
--> | |
<!-- | |
Checkstyle-Configuration: Android Best Practise | |
Description: none | |
--> |
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/sh | |
# Takes a provisioning profile and installs it into the system path. | |
# This requires poking inside the provisioning profile and searching for the | |
# UUID present at the end of the file. | |
set -e | |
if [[ -z "$1" ]] | |
then |
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
# based on https://gist.github.com/3349345 | |
# Thanks, @alloy! | |
# | |
# To get your project ready for this, you'll have to create a scheme for your unit test project, make sure run is checked in | |
# the build step, and then delete the Test Host setting. | |
# Also, make sure you have the colored and open4 gems installed. | |
require 'rubygems' | |
require 'colored' | |
require 'pathname' |
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
<?php | |
use Behat\Behat\Event\StepEvent; | |
use Behat\Gherkin\Node\StepNode, | |
Behat\Gherkin\Node\ScenarioNode, | |
Behat\Gherkin\Node\FeatureNode; | |
use Behat\Mink\Driver\Selenium2Driver; | |
/** |
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)main { | |
__weak id obj; | |
// Wrong: | |
dispatch_async(queue, ^() { | |
[obj doSomething]; | |
[obj doSomethingElse]; // can turn to nil at any point, should store in strong at beggining of block | |
[obj doSomethingElse2]; | |
}); | |
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
UIDevice *device = [UIDevice currentDevice]; | |
SEL selector = NSSelectorFromString([device.systemVersion hasPrefix:@"7"] ? @"_deviceInfoForKey:" : @"deviceInfoForKey:"); | |
NSLog(@"DeviceColor: %@ DeviceEnclosureColor: %@", [device performSelector:selector withObject:@"DeviceColor"], [device performSelector:selector withObject:@"DeviceEnclosureColor"]); |
OlderNewer