Skip to content

Instantly share code, notes, and snippets.

alexiscounsell firecall

Block or report user

Report or block firecall

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@firecall
firecall / gist:6492454
Created Sep 9, 2013
Create a UIActionSheet from an NSArray
View gist:6492454
self.myActionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Something" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil, nil];
//self.myArray could be an array of CoreData objects
for (id myObject in self.myArray) {
[self.myActionSheet addButtonWithTitle:myObject.aString];
}
[self.myActionSheet addButtonWithTitle:@"Cancel"];
self.myActionSheet.cancelButtonIndex = [self.myActionSheet count];
@firecall
firecall / MYSQL Dump
Created Mar 20, 2011
MYSQL Dump from the command line
View MYSQL Dump
mkdir /Users/alex/Desktop/Dropbox/mysql_backup/client/$(date +%Y%m%d_%H%M%S); /usr/local/mysql/bin/mysqldump -h database_host -u username —password=mypassword clients_database > $_/clients_database.sql
You can’t perform that action at this time.