Skip to content

Instantly share code, notes, and snippets.

# This file is sourced by /etc/init.d/sabnzbdplus
#
# When SABnzbd+ is started using the init script, the
# --daemon option is always used, and the program is
# started under the account of $USER, as set below.
#
# Each setting is marked either "required" or "optional";
# leaving any required setting unconfigured will cause
# the service to not start.
@stuwilli
stuwilli / NSLogCheatSheet.m
Created August 21, 2012 19:24
NSLog Cheat Sheet
NSLog(@"%@", songTitle);
NSLog(@"%@", songDuration);
NSLog(@"%f", [songDuration floatValue]);
NSLog(@"%d", [songDuration integerValue]);
@stuwilli
stuwilli / AppDelegate.m
Created August 19, 2012 20:45
Core Data App Delegate sample config
@implementation WSAppDelegate
@synthesize persistentStoreCoordinator = _persistentStoreCoordinator;
@synthesize managedObjectModel = _managedObjectModel;
@synthesize managedObjectContext = _managedObjectContext;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSManagedObjectContext *context = [self managedObjectContext];
Names *name = [NSEntityDescription insertNewObjectForEntityForName:@"Names" inManagedObjectContext:context];
@stuwilli
stuwilli / gist:3395000
Created August 19, 2012 13:58 — forked from happy-coding/gist:3363334
Core Data AppDelegate Code
#pragma mark - Core Data stack
- (NSManagedObjectContext *)managedObjectContext
{
if (_managedObjectContext != nil) {
return _managedObjectContext;
}
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
if (coordinator != nil) {