This file contains hidden or 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
Process: Xcode [37635] | |
Path: /Applications/Xcode.app/Contents/MacOS/Xcode | |
Identifier: com.apple.dt.Xcode | |
Version: 8.3 (12169) | |
Build Info: IDEFrameworks-12169000000000000~2 | |
App Item ID: 497799835 | |
App External ID: 821487965 | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: Xcode [37635] |
This file contains hidden or 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 XCTest | |
import Foundation | |
let iterationCount = 10_000_000 | |
class BenchmarksTests: XCTestCase { | |
func testRecursiveLock_NoRecursion() { | |
self.measure { | |
invoke(RecursiveLock<Int>(), times: iterationCount) |
This file contains hidden or 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 ReactiveCocoa | |
let a: MutableProperty<[Int]> = MutableProperty([]) | |
a.signal.observeNext { array in | |
print("Array did change: \(array)") | |
} | |
a.value.append(1) | |
a.value.append(2) |
This file contains hidden or 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> | |
typedef void (^SomeBlock)(NSString * _Nonnull someParameter); | |
_Nonnull SomeBlock defaultBlock(); | |
@interface SomeObject : NSObject | |
@property (nonatomic, copy, nullable) SomeBlock someBlock; |
This file contains hidden or 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 A { | |
var value: Int | |
init(value: Int) { | |
self.value = value | |
} | |
} |
This file contains hidden or 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 | |
import CoreData | |
class SomeClass: NSManagedObject {} | |
class MyManagedObjectContext: NSManagedObjectContext { | |
override func executeFetchRequest(request: NSFetchRequest) throws -> [AnyObject] { | |
return [SomeClass()] | |
} |
This file contains hidden or 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
- (NSProgress *)overallProgress { | |
return objc_getAssociatedObject(self, @selector(overallProgress)) | |
?: (NSProgress *){self.overallProgress = [NSProgress progressWithTotalUnitCount:0]}; | |
} |
This file contains hidden or 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
# Environment | |
# | |
# OS: Mac OS X 10.9 | |
# Vagrant: 1.5.1 | |
# Box: precise64 | |
# Error | |
# | |
# Failed to mount folders in Linux guest. This is usually because |
This file contains hidden or 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
ssh-keygen -lf $1 # ex: ~/.ssh/id_rsa.pub |
This file contains hidden or 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+DeviceHardware.h | |
// | |
// Used to determine EXACT version of device software is running on. | |
#import <Foundation/Foundation.h> | |
#include <sys/types.h> | |
#include <sys/sysctl.h> | |
typedef enum { |
NewerOlder