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
find /Applications ~/Applications -maxdepth 3 -name "*.app" | while read a ; do echo; echo -n "$a ___ "; codesign -vd "${a}" 2>&1 | awk '/version/ {print $3}'; done | awk -F'___' '{print $2 " " $1}' | sort -u |
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
let é = "precomposed character!" | |
let é = "decomposed characters!" | |
println(é) // prints "precomposed character!" | |
println(é) // prints "decomposed characters!" |
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
#!/usr/bin/env python | |
# Nicolas Seriot | |
# 2011-01-06 | |
# https://gist.github.com/768457 | |
""" | |
Input: path of an Objective-C project | |
Output: import dependancies Graphviz format |
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
#import <Foundation/Foundation.h> | |
static void unsafe_signal_handler (int signo) { | |
signal(signo, SIG_DFL); | |
/* Attempt to use ObjC to fetch the backtrace. Will trigger deadlock. */ | |
[NSThread callStackSymbols]; | |
} | |
int main(int argc, char *argv[]) { |
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
// | |
// UIViewController+MBSensitiveInformationInScreenshotPrevention.h | |
// | |
// Created by Manuel Binna on 05.05.11. | |
// Copyright 2011 Manuel Binna. All rights reserved. | |
// | |
@interface UIViewController (MBSensitiveInformationInScreenshotPrevention) |
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
#import <Foundation/Foundation.h> | |
@interface A: NSObject | |
@end | |
@implementation A | |
void pileOfPoo(id self, SEL _cmd) { | |
NSLog(@"💩"); | |
} |
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
tail end of the results | |
2012-03-30 11:36:39.865 Untitled[78506:707] IsEqual: 1438 | isEqualToString 589 | |
2012-03-30 11:36:39.875 Untitled[78506:707] IsEqual: 1377 | isEqualToString 590 | |
2012-03-30 11:36:39.876 Untitled[78506:707] IsEqual: 956 | isEqualToString 560 | |
2012-03-30 11:36:39.877 Untitled[78506:707] IsEqual: 860 | isEqualToString 451 | |
2012-03-30 11:36:39.877 Untitled[78506:707] IsEqual: 824 | isEqualToString 433 | |
2012-03-30 11:36:39.878 Untitled[78506:707] IsEqual Average 1212 - IsEqualToString Average 619 |
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
#import <ApplicationServices/ApplicationServices.h> | |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc != 2) | |
return 0; | |
NSAutoreleasePool *pool = [NSAutoreleasePool new]; | |
CFStringRef name = (CFStringRef) [NSString stringWithUTF8String: argv[1]]; |
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
How the get the 512x512 icon for an app. | |
Look for this app on the itunes.apple.com website (Google is your friend) | |
For example, this excellent app. | |
http://itunes.apple.com/au/app/bancomap/id309009025?mt=8 | |
Look for the URL of the icon in the page (it's a 175x175 picture). | |
I use Safari, so right click on the icon and choose "Inspect Element" |
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
float screenResolution() { | |
struct utsname systemInfo; | |
uname(&systemInfo); | |
char *name = systemInfo.machine; | |
float ppi; | |
if ((strstr(name, "iPod") != NULL) && (strstr(name, "iPod4") == NULL)) { | |
// older ipod touches | |
ppi = 163; | |
} else if ((strstr(name, "iPhone") != NULL) && (strstr(name, "iPhone3") == NULL)) { |
OlderNewer