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 AnotherClass { | |
var someVar = 1 | |
let someConst = 2 | |
func somePrivateFunc() -> Bool { | |
return true | |
} |
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 | |
## | |
# Copyright 2008 Apple Inc. | |
# All rights reserved. | |
# | |
# iPhoneSimulator platform | |
# This script runs all of the unit tests for the target test bundle specified by the passed-in environment. | |
# This script is generally intended to be invoked by ${DEVELOPER_TOOLS_DIR}/RunUnitTests. The interface or location of this script may change in future releases. | |
## | |
# |
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/Foundation.h> | |
#import <objc/message.h> | |
extern id fake_msgSend(id, SEL, int) __attribute__((noinline)); | |
@interface Foo : NSObject | |
- (id)foo:(int)n; | |
@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
// Here we'll use Swift's IDE-supporting reflect() | |
// function to build a basic JSON serializer. | |
// Per the fine engineers at WWDC, Swift's reflection support | |
// exists purely to support the IDE and the Playground. But | |
// we can have some fun with it anyway. ;) | |
class SerializerBase { | |
} |
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
typealias Closure = (Int) -> (Bool) | |
class MyFilterArrayView: SequenceType, GeneratorType { | |
var _array: [Int]? | |
var _lazyFilter: MyFilterArrayView? | |
var _closure: Closure | |
var _currentIndex: Int = 0 | |
var array: [Int] { | |
get { |
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
// | |
// main.swift | |
// church | |
// | |
// Created by Dan Kogai on 6/15/14. | |
// Copyright (c) 2014 Dan Kogai. All rights reserved. | |
// | |
/* Operators */ |
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
# install class-dump | |
brew install class-dump | |
# dump the frameworks you're interested in | |
class-dump -H -o UIKit /Applications/Xcode5-DP.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework | |
class-dump -H -o SpringBoardUI /Applications/Xcode5-DP.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/PrivateFrameworks/SpringBoardUI.framework |
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/Foundation.h> | |
@interface TestClass : NSObject | |
@end | |
@interface TestClass () | |
@property NSString *name; |
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
template<typename Left, typename Right> | |
struct Intersect | |
{ | |
// This will fail to compile if there's no specialization for Intersect<Right, Left>, | |
// thereby verifying that we've handled all combinations. | |
typename Intersect<Right, Left>::Result operator() (const Left &lhs, const Right &rhs) const | |
{ | |
return Intersect<Right, Left>()(rhs, lhs); | |
} | |
}; |
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 | |
pbpaste | pygmentize -O"style=tango, fontface=Menlo" -f rtf -l $1 | pbcopy |
OlderNewer