Skip to content

Instantly share code, notes, and snippets.

@jkhowland
jkhowland / gist:89e24b5fb6e1b5048eb5
Last active August 29, 2015 14:02
Creating a task controller singleton for a task controller
// This goes in the header file
+ (EntryController *)sharedInstance;
// This goes in the implementation file
+ (EntryController *)sharedInstance {
static EntryController *sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [[EntryController alloc] init];
- (NSArray *)gitCommands {
return @[@{Command: @"git status", Reference: @": shows changed files"},
@{Command: @"git diff", Reference: @": shows actual changes"},
@{Command: @"git add .", Reference: @": adds changed files to the commit"},
@{Command: @"git commit -m \"notes\"", Reference: @": commits the changes"},
@{Command: @"git push origin _branch_", Reference: @": pushes commits to branch named _branch_"},
@{Command: @"git log", Reference: @": displays progress log"},
@{Command: @"git comment --amend", Reference: @": re-enter last commit message"}