This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Restart your Cocoa application using Sparkle | |
// Author: Marc Charbonneau | |
// Source: http://blog.mbcharbonneau.com/2010/06/03/restart-your-cocoa-application-using-sparkle/ | |
NSString *launcherSource = [[NSBundle bundleForClass:[SUUpdater class]] pathForResource:@"relaunch" ofType:@""]; | |
NSString *launcherTarget = [NSTemporaryDirectory() stringByAppendingPathComponent:[launcherSource lastPathComponent]]; | |
NSString *appPath = [[NSBundle mainBundle] bundlePath]; | |
NSString *processID = [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]]; | |
[[NSFileManager defaultManager] removeItemAtPath:launcherTarget error:NULL]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: http://ignorethecode.net/blog/2010/04/20/footnotes/ | |
// Author: Lukas Mathis | |
// this script requires jQuery | |
$(document).ready(function() { | |
Footnotes.setup(); | |
}); | |
var Footnotes = { | |
footnotetimeout: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author: Pierre Bernard | |
// Source: http://www.bernard-web.com/pierre/blog/index.php?id=2624434753771423706 | |
// Caveat: Consider using http://github.com/andrep/RMModelObject instead. | |
@implementation NSObject (PropertyDealloc) | |
- (void)deallocProperties | |
{ | |
Class class = [self class]; | |
unsigned int pCount; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSObject+BlockObservation.h | |
// Version 1.0 | |
// | |
// Andy Matuschak | |
// [email protected] | |
// Public domain because I love you. Let me know how you use it. | |
// | |
#import <Cocoa/Cocoa.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSApplication+DockIcon.m | |
// Hyperspaces | |
// | |
// Created by Tony Arnold on 30/06/09. | |
// Licensed under Creative Commons Attribution 2.5 - http://creativecommons.org/licenses/by/2.5/ | |
#import <Cocoa/Cocoa.h> | |
#import <Carbon/Carbon.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
VOLUME=Tigh | |
function die { | |
echo "`basename -- "$0"`:" "$@" 1>&2 | |
exit 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Print messages when a method is replaced. | |
# Source: http://blog.clickablebliss.com/2010/01/19/finding-colliding-category-methods/ | |
OBJC_PRINT_REPLACED_METHODS=YES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSLog(@"Something happened in %@ at line %d", NSStringFromSelector(_cmd), __LINE__); | |
// Even more logging: http://developer.apple.com/mac/library/qa/qa2009/qa1669.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Xcode defaults to comply with the Google ObjC style guide | |
com.apple.Xcode: | |
IndentWidth: 2 | |
TabWidth: 2 | |
PBXUsesTabs: NO | |
XCCodeSenseFormattingOptions: | |
PreMethodTypeSpacing: ' ' | |
PreMethodDeclSpacing: '' | |
PreColonSpacing: '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
require_cmd gitx | |
gitx | |
# Input: None | |
# Output: Show as Tool Tip | |
# Key Equivalent: ⌃⇧G |