Skip to content

Instantly share code, notes, and snippets.

Cody Carse ccarse

Block or report user

Report or block ccarse

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

Keybase proof

I hereby claim:

  • I am ccarse on github.
  • I am ccarse ( on keybase.
  • I have a public key ASChlOIrcWj1NwePYSwYnrX5mJUmu6gfrVktV82mh9Nh6go

To claim this, I am signing this object:

ccarse / .block
Created Sep 12, 2016 — forked from mbostock/.block
Snowden’s Route
View .block
license: gpl-3.0
View MapBox.podspec do |m| = 'MapBox'
m.version = '1.0.3'
m.summary = 'Open source alternative to MapKit.'
m.description = 'Open source alternative to MapKit supporting custom tile sources, offline use, and complete cache control.'
m.homepage = ''
m.license = 'BSD' = { 'MapBox' => '' }

Setup and Test Mapnik iOS SDK v2.2.0

First set up a project directory to hold your work:

cd ~/projects
mkdir mapnik-ios-test
cd mapnik-ios-test
ccarse / patch.m
Created Sep 5, 2012
kvcMagic: for more than just strings....
View patch.m
- (void)enhancedKvcMagic:(id)object {
int columnCount = sqlite3_column_count([_statement statement]);
int columnIdx = 0;
for (columnIdx = 0; columnIdx < columnCount; columnIdx++) {
id c = [self objectForColumnIndex:columnIdx];
// check for a null row
ccarse / gist:3343783
Created Aug 13, 2012
Core data xml before
View gist:3343783
<entity name="MillHierarchy" representedClassName="MillHierarchy" syncable="YES">
<attribute name="BaseObjectID" attributeType="String" syncable="YES"/>
<attribute name="Description" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="HierarchyTypeID" attributeType="String" syncable="YES"/>
<attribute name="IsActive" attributeType="Boolean" syncable="YES"/>
<attribute name="MillHierarchyID" attributeType="String" syncable="YES"/>
<attribute name="MillID" attributeType="String" syncable="YES"/>
<attribute name="Name" attributeType="String" syncable="YES"/>
<attribute name="ParentMillHierarchyID" optional="YES" attributeType="String" syncable="YES"/>
View gist:3343514
<entity name="MillHierarchy" representedClassName="MillHierarchy" syncable="YES">
<attribute name="baseObjectID" attributeType="String" syncable="YES"/>
<attribute name="description" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="hierarchyTypeID" attributeType="String" syncable="YES"/>
<attribute name="isActive" attributeType="Boolean" syncable="YES"/>
<attribute name="millHierarchyID" attributeType="String" syncable="YES"/>
<attribute name="millID" attributeType="String" syncable="YES"/>
<attribute name="name" attributeType="String" syncable="YES"/>
<attribute name="parentMillHierarchyID" optional="YES" attributeType="String" syncable="YES"/>
ccarse / gist:3230017
Created Aug 1, 2012
Obj-C new literal types example.
View gist:3230017
// Before
NSMutableDictionary *mainDict = [[NSMutableDictionary alloc] init];
[mainDict setObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithBool:false], serverBlob, nil]
forKeys:[NSArray arrayWithObjects:@"moreChangesAvailable", @"serverBlob", nil]], changes, nil]
forKeys:[NSArray arrayWithObjects:@"__sync", @"results", nil]]
// After
NSDictionary *mainDict = @{@"d":@{@"__sync":@{@"moreChangesAvailable":@0, @"serverBlob":serverBlob}, @"results":changes}};
You can’t perform that action at this time.