Skip to content

Instantly share code, notes, and snippets.

View jbrennan's full-sized avatar
😅
bestie please let me merge

Jason Brennan jbrennan

😅
bestie please let me merge
View GitHub Profile
@ccgus
ccgus / gist:4961749
Created February 15, 2013 17:03
replacing NSImage reps
NSImage *iRep = [NSImage imageNamed:[fileName stringByDeletingPathExtension]];
if (iRep) {
NSImage *ni = [[NSImage alloc] initByReferencingFile:output];
for (NSImageRep *r in [[iRep representations] copy]) {
[iRep removeRepresentation:r];
}
@lilyball
lilyball / gist:785500
Created January 19, 2011 01:12
.gitignore
# ignore all files in an xcodeproj except for the project itself
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
# unfortunately, this doesn't handle projects in nested dirs. Repeat this pattern as deep as you want
*/*.xcodeproj/*
!*/*.xcodeproj/project.pbxproj
"""
Script to convert a Xcode3 Color theme into a Xcode4 one.
Example:
bash# python xcode3_theme_to_xcode4.py Twilight.xcolortheme
It will write a new file: Twilight.dvtcolortheme into the same folder as the script is residing in.
"""
import plistlib,sys
""" Define boilerplate of the color theme """
defaultConfig = {
@kluivers
kluivers / gist:9808519
Created March 27, 2014 14:16
Responder forwarding
@implementation UIResponder (ResponderForwarding)
- (BOOL) tryToPerformAction:(SEL)action withObject:(id)object
@end
@implementation UIResponder (ResponderForwarding)
- (BOOL) tryToPerformAction:(SEL)action withObject:(id)object
{
if (!action) {
return NO;