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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <limits.h> | |
#include <sys/stat.h> | |
static const char *gameName = "GameName"; | |
/* Gets the ideal save directory for the target platform. | |
* @param output A character array, ideally PATH_MAX characters long. |
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
# Modified from http://stackoverflow.com/questions/12619124/how-to-support-both-armv6-and-armv7s-for-release-build-in-xcode-4-5/12678077#12678077 | |
# Thanks Mike, Jerome, Max_B for their contributions | |
################# | |
# Configuration # | |
################# | |
# Find the common base directory for both build | |
XCODE_BUILD=${BUILD_ROOT%%/Build*} | |
# Change this to the full path where Xcode 4.4 (or below) puts your armv6 output | |
export ARMV6_OUTPUT_PATH="$XCODE_BUILD/Build/Products/Release-armv6-iphoneos/" |
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
#!/bin/sh | |
# applesource.sh | |
# Downloads Mac OS X, iOS released source code from http://www.opensource.apple.com/ | |
# | |
# Created by Guanshan Liu on 22/07/2012. | |
# | |
if [ $# != 2 ] | |
then |
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 Slice : NSObject | |
@property NSInteger from; | |
@property NSInteger to; | |
@property NSInteger step; | |
@end | |
@implementation Slice | |
@end |
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
#include <objc/runtime.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "SwizzleMyNizzleProtocol.h" | |
BOOL SwizzleMethod(Class _class, SEL origSel, IMP altImp, char *prefix) { | |
if (_class == NULL || origSel == NULL || altImp == NULL) { | |
fprintf(stderr, "[Error] Class, SEL or IMP is NULL"); | |
return NO; |
NewerOlder