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 -e | |
| # More information at http://0xced.blogspot.com/2010/07/using-sdk-313-with-iphone-sdk-4.html | |
| IPHONE_SDK_DMG="$HOME/Downloads/iphone_sdk_3.1.3_with_xcode_3.2.1__snow_leopard__10m2003a.dmg" | |
| DEVELOPER_DIR="/Developer" | |
| MOUNT_POINT="/Volumes/iPhone SDK" | |
| function cleanup | |
| { | |
| echo "" |
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 | |
| # 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 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
| # $ gcc --version | |
| # i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) | |
| # Copyright (C) 2007 Free Software Foundation, Inc. | |
| # This is free software; see the source for copying conditions. There is NO | |
| # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| # | |
| # $ clang --version | |
| # Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn) | |
| # Target: x86_64-apple-darwin10 | |
| # Thread model: posix |
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 | |
| import json, os, subprocess, sys, urllib2 | |
| from termcolor import cprint | |
| from xml.dom import minidom | |
| def abort(error): | |
| cprint(error, color='red', file=sys.stderr) | |
| exit(1) |
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
| all: chf | |
| chf: chf.m | |
| gcc chf.m -o chf -framework Foundation -std=c99 | |
| clean: | |
| rm -f chf |
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
| /* | |
| Licensed under the MIT License | |
| Copyright (c) 2011 Cédric Luthi | |
| 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 |
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 | |
| import datetime, httplib, os, sys | |
| if "DOCUMENT_ROOT" in os.environ: | |
| sys.path.append(os.environ["DOCUMENT_ROOT"] + "/python") | |
| from prowl import WWDCVIDEOS_PROWL_API_KEYS | |
| import pyrowl |
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 MyURL : NSURL | |
| @end | |
| @implementation MyURL | |
| @end | |
| void testURL(Class urlClass, NSString *string) | |
| { |
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
| { | |
| NSURL *baseURL = [NSURL URLWithString:@"http://duckduckgo.com/"]; | |
| NSDictionary *parameters = @{ @"q" : @"TWRequest -site:apple.com" }; | |
| // With TWRequest: 1 line with **correct percent escaping** | |
| NSURL *urlA = [[[[TWRequest alloc] initWithURL:baseURL parameters:parameters requestMethod:TWRequestMethodGET] signedURLRequest] URL]; | |
| // Without TWRequest: 10 lines with wrong percent escaping (http://www.openradar.me/6546984) | |
| NSMutableString *query = [NSMutableString string]; | |
| for (NSString *key in parameters) |
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
| // | |
| // Created by Cédric Luthi on 2012-02-24. | |
| // Copyright (c) 2012 Cédric Luthi. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> | |
| @interface NSData (Base64) | |
| + (id) dataWithBase64Encoding_xcd:(NSString *)base64String; |