Skip to content

Instantly share code, notes, and snippets.

JHumphreyJr

Block or report user

Report or block JHumphreyJr

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
@JHumphreyJr
JHumphreyJr / gist.txt
Created Nov 19, 2014
hello extension!
View gist.txt
Tools:
Xcode plugins:
chisel
@JHumphreyJr
JHumphreyJr / AppDelegateSnippet.m
Created Nov 7, 2012
Core Data Migration Scenario
View AppDelegateSnippet.m
//Delayed method to prevent core
- (void)delayedMagicalRecordSetup
{
[MagicalRecord setupAutoMigratingDefaultCoreDataStack];
//Now core data can be used and the windows root view controller
// can be changed to a view controller that may need access to MagicRecord
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
@JHumphreyJr
JHumphreyJr / gist:3133238
Created Jul 18, 2012 — forked from jonleighton/base64ArrayBuffer.js
Encode an ArrayBuffer as a base64 string
View gist:3133238
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then
// use window.btoa' step. According to my tests, this appears to be a faster approach:
// http://jsperf.com/encoding-xhr-image-data/5
function base64ArrayBuffer(arrayBuffer) {
var base64 = ''
var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
var bytes = new Uint8Array(arrayBuffer)
var byteLength = bytes.byteLength
You can’t perform that action at this time.