Skip to content

Instantly share code, notes, and snippets.

View rodericj's full-sized avatar
🐔
chicken

Roderic Campbell rodericj

🐔
chicken
View GitHub Profile
@rodericj
rodericj / gistify428545.m
Created March 19, 2014 04:35
Localized String sample
"SEARCHRESULTSTHATMATCHYOURPINS" = "Search results that match your pins:";
"SEARCHRESULTSINTHISMAPAREA" = "Search results in this map area:";
"SEARCHADIFFERENTLOCATION" = "Search a different location?";
"SEARCHLIST" = "Search List";
"SEARCHBAR" = "Search Bar";
// General
"OKTEXT" = "Ok";
"CANCELTEXT" = "Cancel";
"EDITTEXT" = "Edit";
RKEntityMapping* listMapping = [RKEntityMapping mappingForEntityForName:[FOFSList entityName]
inManagedObjectStore:objectManager.managedObjectStore];
[listMapping addAttributeMappingsFromDictionary:@{
@"id": @"listID",
@"title": @"name",
@"description": @"desc",
@"user": @"user",
@"following": @"following",
@"collaborative": @"collaborative",
@"canonicalUrl": @"canonicalUrl",
[UIView animateKeyframesWithDuration:0.5 delay:0 options:UIViewKeyframeAnimationOptionCalculationModeLinear animations:^
{
CGRect newFrame = self.view.bounds;
newFrame.origin.y = newFrame.size.height;
[webView setFrame:newFrame];
}
completion:^(BOOL finished)
{
}];
(lldb) po [[[error userInfo] objectForKey:@"NSDetailedErrors"] objectAtIndex:0]
Error Domain=NSCocoaErrorDomain Code=1570 "The operation couldn’t be completed. (Cocoa error 1570.)" UserInfo=0x1201e290 {NSValidationErrorObject=<FOFSList: 0xf2357f0> (entity: FOFSList; id: 0x120939b0 <x-coredata://6D8CBDDD-DFD9-4463-9305-52EA03846EEE/FOFSList/p5> ; data: {
canonicalUrl = nil;
collaborative = nil;
collaborators = (
);
desc = nil;
editable = nil;
followers = (
);
RKObjectManager* objectManager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"https://api.foursquare.com/"]];
objectManager.managedObjectStore = [self managedObjectStore];
RKEntityMapping* listMapping = [RKEntityMapping mappingForEntityForName:[FOFSList entityName] inManagedObjectStore:objectManager.managedObjectStore];
[listMapping addAttributeMappingsFromDictionary:@{
@"id": @"listID",
@"title": @"name",
@"description": @"desc",
@"user": @"user",
@"following": @"following",
RKEntityMapping* listMapping = [RKEntityMapping mappingForEntityForName:[FOFSList entityName] inManagedObjectStore:objectManager.managedObjectStore];
[listMapping addAttributeMappingsFromDictionary:@{
@"id": @"listID",
@"title": @"name",
@"description": @"desc",
@"user": @"user",
@"following": @"following",
// @"editable": @"editable",
@"collaborative": @"collaborative",
@"canonicalUrl": @"canonicalUrl",
response.lists.groups.items
response.lists.groups.items

This is an adaptation of https://twitter.com/jasonneylon script.

In the terminal window, you can open your current repo (at the current branch) in your default browser.

My adaptation was adding options to view the commits, branches, pull requests or issues for the repo using one of the additional options (added support for wiki, settings, pulse, graphs, network):

[-h]  => View help
[-c]  => View commits
[-b]  => View branches
[-pr] => View pull requests
(lldb) po self.event.venue
<JotoVenue: 0xcd7f5c0> (entity: Venue; id: 0xceb7100 <x-coredata://8989600D-16D9-4504-BC35-CB682F478C9A/Venue/p6> ; data: {
address = "";
city = Tampa;
event = "0xceb0370 <x-coredata://8989600D-16D9-4504-BC35-CB682F478C9A/Event/p12>";
id = 189;
lat = 0;
lng = 0;
name = "St. Petersburg College Music Center";
"resource_uri" = "/api/v1/venue/189/";