Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jakeheis on github.
  • I am jakeheis (https://keybase.io/jakeheis) on keybase.
  • I have a public key ASDn-UoSxB1RF-EJ1suEiNQk4Z369GdJmrZnhRRIZwpwXgo

To claim this, I am signing this object:

@jakeheis
jakeheis / Unless.h
Last active December 17, 2015 18:39
Objective-C "unless"
#define unless(arg) if (!(arg))
@jakeheis
jakeheis / CKArgo.h
Last active December 15, 2015 01:59
CKArgo - Makes dealing with a variable amount of arguments easy
#define CKArgoStart(first) \
va_list __block obscureNameNoOneShouldPick99; \
va_start(obscureNameNoOneShouldPick99, (first)); \
#define CKArgoArray(first) \
[NSMutableArray arrayWithObjectBlock:^id(NSInteger index) { \
if (index == 0) \
return str; \
id obj = va_arg(obscureNameNoOneShouldPick99, id); \
if (obj == self || !obj) { \
@jakeheis
jakeheis / NSMutableArray+SKBlock.h
Created March 17, 2013 20:21
NSMutableArray+SKBlock - Initialize an array using a block
#import <Foundation/Foundation.h>
@interface NSMutableArray (SKBlock)
+(id)arrayWithObjectBlock:(id (^)(NSInteger index))block;
-(id)initWithObjectBlock:(id (^)(NSInteger index))block;
@end