Skip to content

Instantly share code, notes, and snippets.

@bhoomesh
bhoomesh / introrx.md
Created September 18, 2018 18:26 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@bhoomesh
bhoomesh / StringArraySort
Created April 2, 2012 14:55
Sort Array with list of strings
NSMutableArray *strings = [[NSMutableArray alloc]init];
[string addObject:@"string1"];
[string addObject:@"string2"];
[string addObject:@"string3"];
[string addObject:@"string4"];
NSArray *sortedStrings = [strings sortedArrayUsingSelector:@selector(compare:)];
@bhoomesh
bhoomesh / Class Lister
Created March 30, 2012 17:48
Need a good list of every UIView subclass use class lister?
extern "C" {
int objc_getClassList(Class*, int);
Class class_getSuperclass(Class cls);
const char * class_getName(Class cls);
}
- (void)viewDidLoad {
int numClasses = objc_getClassList(NULL, 0);
Class *classes = NULL;
@bhoomesh
bhoomesh / Keep your iPhone awake
Created March 30, 2012 16:16
iphone-insomnia
Insomnia for iPhone
Insomnia is an iPhone native application that, when enabled, will prevent the iPhone from sleeping, thus overriding its default behaviour. This allows background applications to continue to run and WiFi to work long after the screen has been switched off.
(The iPhone's default behaviour is to sleep 30 seconds after the screen has gone off, when not docked and charging that is).
Uses
Insomnia is useful if you are running a logging application that you would want to keep working while your phone is locked and the display is off.
If you are using an IM or IRC client that you wish to stay connected to receive messages while the screen is off.