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
// GHDUserViewController.m in the | |
// Take 1 | |
- (id)initWithUserAccount:(GHGitHubUser *)user { | |
// .. snip .. | |
[[[RACSignal | |
merge:@[[self fetchUser], [self fetchRepos], [self fetchOrgs]]] | |
finally:^{ | |
@strongify(self); |
This file has been truncated, but you can view the full file.
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
(lldb) racbt | |
error: Trying to put the stack in unreadable memory at: 0x10f23ef80. | |
(lldb) bt | |
* thread #15: tid = 0x2cd18a, 0x00007fff90136fe6 libobjc.A.dylib`objc::DenseMap<objc_object*, unsigned long, true, objc::DenseMapInfo<objc_object*>, objc::DenseMapInfo<unsigned long> >::find(objc_object* const&) + 4, queue = 'com.apple.root.default-priority, stop reason = EXC_BAD_ACCESS (code=2, address=0x10f23eff8) | |
frame #0: 0x00007fff90136fe6 libobjc.A.dylib`objc::DenseMap<objc_object*, unsigned long, true, objc::DenseMapInfo<objc_object*>, objc::DenseMapInfo<unsigned long> >::find(objc_object* const&) + 4 | |
frame #1: 0x00007fff90136f5b libobjc.A.dylib`_objc_rootReleaseWasZero + 126 | |
frame #2: 0x00007fff9014f6f1 libobjc.A.dylib`-[NSObject release] + 17 | |
frame #3: 0x00000001001fbe53 ReactiveCocoa`-[RACBacktrace .cxx_destruct](self=0x0000000102188800, _cmd=0x00007fff8e87e360) + 51 at RACBacktrace.m:153 | |
frame #4: 0x00007fff9013dfcc libobjc.A.dylib`object_cxxDestructFromClass(objc_object*, objc_class*) + |
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
// Output on this particular Mac | |
// | |
// Exceptions took 5.054922 | |
// BOOL return + NSError took 0.251062 | |
// | |
#import <Foundation/Foundation.h> | |
#import <mach/mach_time.h> | |
static inline void TimeDuration(NSString *description, NSUInteger runs, dispatch_block_t block) |
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
// weak-strong dance by shadowing self | |
foo { [weak self] in | |
guard let `self` = self else { return } | |
self.bar() | |
} |
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
function current_git_branch | |
sh -c 'git branch --no-color 2> /dev/null' | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
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
func fetch1(where predicateFormat: String, _ args: CVarArg...) { | |
// using: public convenience init(format predicateFormat: String, _ args: CVarArg...) | |
let predicate = NSPredicate(format: predicateFormat, args) | |
print("fetch1 predicate: \(predicate)") | |
} | |
func fetch2(where predicateFormat: String, _ args: Any...) { | |
// Using: public init(format predicateFormat: String, argumentArray arguments: [Any]?) | |
let predicate = NSPredicate(format: predicateFormat, argumentArray: args) | |
print("fetch2 predicate: \(predicate)") |
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
enum Event<T> { | |
case next(T) | |
case error(Error) | |
case completed | |
} | |
final class AnyObservable<T> { | |
let handler: (@escaping (Event<T>) -> Void) -> Void | |
init(handler: @escaping (@escaping (Event<T>) -> Void) -> Void) { |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
struct Person { | |
var name = Observable("Bob") | |
} | |
enum Event<T> { | |
case next(T) |
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
:10000000FFFFFFFFFFFFFFFF012300230060FFFF53 | |
:1000100041F7F1A100000000000000000000000016 | |
:1000200000000000000000000000000000000000D0 | |
:1000300000000000000000000000000000000000C0 | |
:1000400000000000000000000000000000000000B0 | |
:100050000000291E1F20212223242526272D2E2A99 | |
:100060004C0000002B141A0815171C180C12132F23 | |
:1000700030314A00000039041607090A0B0D0E0F33 | |
:10008000333400284E000000E1641D1B06190511E1 | |
:1000900010363738E5524B000000C0E2E3000000A4 |
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 | |
git log --no-walk --date-order --oneline --decorate $(git rev-list --branches --no-walk) |
OlderNewer