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
LBNotificationBanner *banner = [LBNotificationBanner new]; | |
[overlay addSubview:banner]; | |
banner.translatesAutoresizingMaskIntoConstraints = NO; | |
LBInstallConstraint(banner, Top, Equal, overlay, Top, 1, margin); | |
LBInstallConstraint(banner, Left, Equal, overlay, Left, 1, margin); | |
LBInstallConstraint(banner, Right, Equal, overlay, Right, 1, margin); |
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
#define LBGuard(cond, ...) \ | |
BOOL __COND_SUCCESSFUL_AT ## __LINE__ = (cond); \ | |
if(!__COND_SUCCESSFUL_AT ## __LINE__) {\ | |
NSString *failureReason = [NSString stringWithFormat:__VA_ARGS__]; \ | |
NSAssert(NO, @"Guard failed: %@: %@", @#cond, failureReason); \ | |
NSLog(@"Guard failed: %@: %@", @#cond, failureReason);\ | |
} \ | |
if(__COND_SUCCESSFUL_AT ## __LINE__) {} | |
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)appendEncodedSampleBuffer:(CMSampleBufferRef)encodedSampleBuffer addTrimAtStart:(int)trimDuration fromSource:(id)source | |
{ | |
if(!_hasWrittenTrim) { | |
GFLog(GFDebug, @"Adding trim to sample buffer from %@", source); | |
const AudioStreamBasicDescription *asbd = CMAudioFormatDescriptionGetStreamBasicDescription(CMSampleBufferGetFormatDescription(encodedSampleBuffer)); | |
CMSetAttachment(encodedSampleBuffer, kCMSampleBufferAttachmentKey_TrimDurationAtStart, (id)CFAutorelease( | |
CMTimeCopyAsDictionary( | |
CMTimeMake(trimDuration, asbd->mSampleRate), | |
kCFAllocatorDefault |
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) po _webView | |
<WKWebView: 0x6080001a24c0> | |
(lldb) po [_webView subviews] | |
<__NSArrayM 0x6000002426a0>( | |
<WKView: 0x608000140bb0> | |
) | |
(lldb) po [[[_webView subviews] firstObject] subviews] |
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> | |
/// Retrieve version number of this library, roughly as outputted by git describe | |
extern NSString *GFGetVersion(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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Filter</key> | |
<dict> | |
<key>Bundles</key> | |
<array> | |
<string>com.apple.springboard</string> | |
</array> |
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
// Buttom of the stack. and it just keeps going like this until stack runs out of memory. | |
frame #11034: 0x00201c7b CoinPurse`std::__1::function<void (std::__1::error_code const&, std::__1::array<unsigned char, 16ul> const&)>::function<std::__1::__bind<std::__1::function<void (std::__1::error_code const&)>&, std::__1::placeholders::__ph<1>&> >(std::__1::__bind<std::__1::function<void (std::__1::error_code const&)>&, std::__1::placeholders::__ph<1>&>, std::__1::enable_if<__callable<std::__1::__bind<std::__1::function<void (std::__1::error_code const&)>&, std::__1::placeholders::__ph<1>&> >::value, void>::type*) [inlined] std::__1::__function::__func<std::__1::__bind<std::__1::function<void (this=0x0981a5a0, __f=0xbfffc738, __a=0xbfffc170)>&, std::__1::placeholders::__ph<1>&>, std::__1::allocator<std::__1::__bind<std::__1::function<void (std::__1::error_code const&)>&, std::__1::placeholders::__ph<1>&> >, void (std::__1::error_code const&, std::__1::array<unsigned char, 16ul> const&)>::__func(std::__1::__bin |
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> | |
/** @category TCInputStream | |
@abstract Reads Big Endian data in convenient sizes | |
*/ | |
@interface NSInputStream (TCInputStream) | |
- (int8_t)readByte; | |
- (uint16_t)readShort; | |
- (uint32_t)readInt; | |
- (uint64_t)readLongLong; |
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
@implementation MeteorClient (GFTask) | |
- (SPTask*)gf_sendMethod:(NSString*)method parameters:(NSArray*)params | |
{ | |
SPTaskCompletionSource *source = [SPTaskCompletionSource new]; | |
[self sendWithMethodName:method parameters:params responseCallback:^(NSDictionary *response, NSError *error) { | |
if(error) { | |
[source failWithError:error]; | |
} else { | |
[source completeWithValue:response]; |
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
// Wait for logout, then re-login | |
[[[loginController waitForLogoutCompletion] chain:^SPTask *(id value) { | |
return [loginController waitForLoginCompletion]; | |
}] addCallback:^(id value) { | |
self.view.window.userInteractionEnabled = YES; | |
[self.introDelegate introFlow:self finishedSuccessfully:YES didMerge:YES]; | |
self.introDelegate = nil; | |
}]; | |