This file contains 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
@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; |
This file contains 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
NSURL *someURL = [NSURL URLWithBuilderBlock:^(NSURLComponents *builder) { | |
builder.scheme = @"http"; | |
builder.host = @"joris.kluivers.nl"; | |
builder.path = @"/blog/2013/10/17/nsurlcomponents/"; | |
}]; | |
// url now equals: | |
// http://joris.kluivers.nl/blog/2013/10/17/nsurlcomponents/ |
This file contains 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
# .gitignore in use by Joris Kluivers | |
# | |
# Latest version: | |
# https://gist.github.com/gists/1923197 | |
*.DS_Store | |
# Xcode | |
*.pbxuser | |
*.mode1v3 |
This file contains 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
+ (id) sharedInstance { | |
static dispatch_once_t predicate = 0; | |
__strong static id shared = nil; | |
dispatch_once(&predicate, ^{ | |
shared = [[self alloc] init]; | |
}); | |
return shared; | |
} |
This file contains 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
<target name="test" depends="build" | |
description="Builds the project, runs the unit tests, generates a report"> | |
<exec executable="xcodebuild" dir="zip-framework" failonerror="false" outputproperty="xcodebuild.out"> | |
<arg line="-target Test -configuration release build" /> | |
</exec> | |
<mkdir dir="reports" /> | |
<mkdir dir="reports/raw" /> | |
<exec executable="OCUnitReport" errorproperty="report-error.out" inputstring="${xcodebuild.out}" searchpath="true" resolveexecutable="true"> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadContent</key> | |
<array> | |
<dict> | |
<key>PayloadDescription</key> | |
<string>Disables the home button.</string> | |
<key>PayloadDisplayName</key> |
This file contains 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
# Template file with replacement tag: ${BODY} | |
TEMPLATE="${SRCROOT}/ShapeDemo/Template.html" | |
# generate and clean HTML | |
HTML_CONTENTS=`/usr/local/bin/markdown "${INPUT_FILE_PATH}"` | |
HTML_CONTENTS=`echo $HTML_CONTENTS | sed -e 's/[\/&]/\\\&/g'` | |
# replace into template and write to Resources | |
cat "$TEMPLATE" | sed "s/\${BODY}/${HTML_CONTENTS}/" > "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${INPUT_FILE_BASE}.html" |
This file contains 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
NSArray *fileURLs = [NSArray arrayWithObjects:fileURL1, /* ... */ nil]; | |
[[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:fileURLs]; |
This file contains 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
uuidgen | tr -d '\n' | pbcopy |
This file contains 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
ssh host.com 'cd /var/www/; git pull' |
OlderNewer