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
| /* | |
| Copyright (c) 2009 Remy Demarest | |
| Permission is hereby granted, free of charge, to any person | |
| obtaining a copy of this software and associated documentation | |
| files (the "Software"), to deal in the Software without | |
| restriction, including without limitation the rights to use, | |
| copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the | |
| Software is furnished to do so, subject to the following |
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
| #import <Foundation/Foundation.h> | |
| @interface NSString (UUID) | |
| + (NSString*)stringWithUUID; | |
| @end |
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/zsh | |
| # Borrowed from http://files.iconfactory.net/craig/twitter/checkdevsite.txt | |
| # Thanks @Chockenberry! | |
| URL="http://store.apple.com/uk" | |
| while :; do | |
| curl -s $URL | grep -i "we'll be back soon" > /dev/null | |
| if [[ $? == 0 ]]; then |
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
| /* | |
| You can use this to call deprecated methods without warnings (supporting old sdk's for example) | |
| or, you can use it in place of performSelector: where you need non-object params, or multiple | |
| params. | |
| ie: ... | |
| int result = 0; | |
| int index = 12; | |
| NSArray *array = myArray; |
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
| https://phobos.apple.com/WebObjects/MZFinance.woa/wa/freeProductCodeWizard?code=%fill:code% |
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
| /* | |
| * Adds the serialNumber property to the UIDevice class | |
| * | |
| * The implementation uses undocumented (for iOS) IOKit functions, | |
| * so handle with caution and be prepared for nil. | |
| */ | |
| #import <UIKit/UIDevice.h> | |
| @interface UIDevice (serialNumber) |
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
| - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { | |
| if ([[[request URL] scheme] isEqualToString:@"mailto"]) { | |
| MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init]; | |
| mailViewController.mailComposeDelegate = self; | |
| NSArray *rawURLparts = [[[request URL] resourceSpecifier] componentsSeparatedByString:@"?"]; | |
| if (rawURLparts.count > 2) { | |
| return NO; // invalid URL | |
| } |
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/sh | |
| INFO=$( echo $PWD )/MyApp-Info | |
| TAG=$( git describe --tags `git rev-list --tags --max-count=1` ) | |
| COMMIT= | |
| GITPATH=/usr/bin:/usr/local/bin:/usr/local/git/bin | |
| PATH=$PATH:$GITPATH; export PATH | |
| if [ -z $( which git ) ]; then | |
| echo "Unable to find git binary in \$GITPATH" |
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 python -tt | |
| """Xcode4 installs and expects to find a git installation at /usr/bin. | |
| This is a pain if you want to control your own installation of git that | |
| might be installed elsewhere. This script replaces the git files in | |
| /usr/bin with symlinks to the preferred installation. | |
| Update the 'src_directory' to the location of your preferred git installation. | |
| """ | |
| import sys |
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
| /* | |
| Our favorite new tool: http://tilemill.com/ | |
| See the results here: http://media.apps.chicagotribune.com/census-2010/population-change/index.html | |
| */ | |
| @sans-bold:"Arial Bold"; | |
| #tracts[name = "Census Tract 9900"] { | |
| polygon-opacity:0; | |
| } |
OlderNewer