Skip to content

Instantly share code, notes, and snippets.

View nevyn's full-sized avatar

Nevyn Bengtsson nevyn

View GitHub Profile
@nevyn
nevyn / oops.c
Last active August 29, 2015 13:56 — forked from davepeck/oops.c
static OSStatus
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams,
uint8_t *signature, UInt16 signatureLen)
{
SSLBuffer hashCtx;
OSStatus err = _SSLVerifySignedServerKeyExchangeWithHashCtx(ctx, isRsa, signedParams,
signature, signatureLen, &hashCtx);
SSLFreeBuffer(hashCtx);
return err;
}
@nevyn
nevyn / ExampleUsage.m
Created June 3, 2012 23:36 — forked from anonymous/ExampleUsage.m
Testing RAC by writing a socket abstraction on top of it with AsyncSocket
[[[TCRACSocket connectTo:@"localhost" port:1236] selectMany:^id<RACSubscribable>(id x) {
return [x lines];
}] subscribeNext:^(id x) {
self.text.text = x;
} error:^(NSError *error) {
NSLog(@"Failure: %@", error);
exit(0);
}];
@nevyn
nevyn / gist:2368290
Created April 12, 2012 15:37 — forked from iKenndac/gist:2368081
Waiting for multiple tiers to load in an object graph
// Assume that there is a -(TCTask*)load method on these objects
-(void)fillTrackPool {
[[SPSession sharedSession] load].then(^(SPSession *sess) {
return sess.userPlaylists.load;
}).then(^(SPPlaylistContainer *container) ^{
NSMutableArray *playlists = [NSMutableArray array];
[playlists addObject:sess.starredPlaylist];
[playlists addObject:sess.inboxPlaylist];
@echo off
color 04
title .app to .ipa
cd >nul
set /p h=what is the name of the .app file:
md Payload\%h%
copy %h% Payload\%h%
echo.
echo.
echo ***********************************************
@interface Base58Encoder : NSObject {
}
+ (NSString *)base58EncodedValue:(long long)num;
@end