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
#!/usr/bin/env ruby -wKU -rubygems | |
# http://www.stompy.org/2008/08/14/xcode-and-git-another-build-script/ | |
# I saw the script from the above URL and thought it was unnecessarily complicated. | |
# So I uncomplicated it. | |
require 'osx/plist' | |
File.open(File.join(ENV['BUILT_PRODUCTS_DIR'], ENV['INFOPLIST_PATH']), 'r+') do |io| | |
plist, format = OSX::PropertyList.load(io, true) |
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
// Replace triple dots with proper ellipses. | |
// Source: http://www.mikeabdullah.net/ellipses_and_sheepkit.html | |
- (BOOL)textView:(EweEyeTextView *)textView | |
shouldChangeTextInRange:(NSRange)range | |
replacementText:(NSString *)text | |
{ | |
BOOL result = YES; | |
if ([text hasSuffix:@"."]) // Accounts for somehow entering ".." | |
{ |
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
PROJECT=foo | |
SOURCES=bar.c baz.c | |
LIBRARY=nope | |
INCPATHS=../some_other_project/ | |
LIBPATHS=../yet_another_project/ | |
LDFLAGS=-ldosomething | |
CFLAGS=-c -Wall | |
CC=gcc | |
# ------------ MAGIC BEGINS HERE ------------- |
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
// Cocoa UI Unit Testing | |
// Source: http://eschatologist.net/blog/?p=205 | |
@interface MyTestCase : SenTestCase | |
@end | |
@implementation MyTestCase | |
/*! Tells whether the control sends the action to the target. */ | |
- (BOOL)checkControl:(NSControl *)control |
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
// ==UserScript== | |
// @name Chroma-Hash password visualization | |
// @namespace http://purl.org/net/mkhl | |
// @description Add Chroma-Hash visualization to all password field inputs. Compatible with Greasemonkey and GreaseKit. | |
// @include * | |
// ==/UserScript== | |
// Many thanks to Henrik Nyh and Mattt Thompson for doing all the hard work! | |
(function() { |
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 |
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
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
# 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
#!/bin/bash | |
set -e | |
VOLUME=Tigh | |
function die { | |
echo "`basename -- "$0"`:" "$@" 1>&2 | |
exit 1 | |
} |