Skip to content

Instantly share code, notes, and snippets.

@sibljon
sibljon / UIImageView+HTUIImageCategoryNamespaceConflictResolver.h
Created July 9, 2013 14:43
A solution to resolve a namespace collision between UIImageView categories in SDWebImage and AFNetworking
//
// UIImageView+HTUIImageCategoryNamespaceConflictResolver.h
// HotelTonight
//
// Created by Jonathan Sibley on 7/9/13.
// Copyright (c) 2013 Hotel Tonight. All rights reserved.
//
@interface UIImageView (HTUIImageCategoryNamespaceConflictResolver)
@sibljon
sibljon / load.m
Created November 19, 2012 00:20
Storing data to a file
// Fetch NSDictionary containing possible saved state
NSString *errorDesc = nil;
NSPropertyListFormat format;
NSString *plistPath;
NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES) objectAtIndex:0];
plistPath = [rootPath stringByAppendingPathComponent:@"SavedState.plist"];
NSData *plistXML = [[NSFileManager defaultManager] contentsAtPath:plistPath];
NSDictionary *unarchivedData = (NSDictionary *)[NSPropertyListSerialization
propertyListFromData:plistXML
@sibljon
sibljon / .bash_profile
Last active February 13, 2017 15:14
Bash Settings
# Add `~/bin` to the `$PATH`
export PATH="$HOME/bin:$PATH"
# Python 3.5 packages
export PATH="$PATH:~/Library/Python/3.5/bin"
# Sublime Text - http://stackoverflow.com/a/16495202
export EDITOR='subl -w'
# Load the shell dotfiles, and then some: