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
// | |
// 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
// 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
// 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
// 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
// Technical Q&A QA1361 | |
// Detecting the Debugger | |
// Source: http://developer.apple.com/mac/library/qa/qa2004/qa1361.html | |
#include <assert.h> | |
#include <stdbool.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <sys/sysctl.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
// | |
// DebuggingUtilities.h | |
// BreakingIntoGDB | |
// | |
// Created by Alexandre Colucci on 23/08/08. | |
// Source: http://blog.timac.org/?p=190 | |
// | |
#import <Foundation/Foundation.h> | |
#import <ApplicationServices/ApplicationServices.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
/* | |
* ctrl-f1 | |
* ------- | |
* Query or toggle the "Full Keyboard Access" hotkey, Ctrl-F1 | |
* | |
* make CC=clang CFLAGS="-framework Carbon" ctrl-f1 | |
*/ | |
#include <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 | |
# Bail out if anything goes wrong | |
set -e | |
# Make sure Homebrew and DocBook are present | |
which -s brew | |
docbook="$(brew --prefix docbook)" | |
test -d "$docbook" |