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/bash | |
if [ ! -f $1 ]; then touch $1; fi | |
open -b com.barebones.textwrangler $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
## Uses theos. | |
include theos/makefiles/common.mk | |
TOOL_NAME = uiduid2 | |
uiduid2_FILES = main.mm | |
uiduid2_LDFLAGS = -llockdown | |
include $(THEOS_MAKE_PATH)/tool.mk |
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
// Heavily based on http://compileyouidontevenknowyou.blogspot.com.br/2010/12/change-colors-of-uiimage-using-uicolor.html by Dan Rosenstark | |
// Fix for monochrome model on the comment on the same post by Ben Cunningham | |
// Removal of unneeded code by Daniel Ferreira (theiostream). | |
static UIImage *UIImageChangeColor(UIImage *image, UIColor *color_) { | |
CGColorRef color = [color_ CGColor]; | |
CGRect contextRect = (CGRect){CGPointZero, [image size]}; | |
UIGraphicsBeginImageContext(contextRect.size); | |
CGContextRef ctx = UIGraphicsGetCurrentContext(); |
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
// cachecopier.m | |
// Copy the dyld_shared_cache into /var/tmp. | |
// Credits to planetbeing for the ASLR trick and theiostream for implementation. | |
// COMPILATION: | |
// arm-apple-darwin10-llvm-gcc-4.2 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -framework Foundation -mdynamic-no-pic -o cachecopier cachecopier.m | |
#import <Foundation/Foundation.h> | |
int main() { |
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/bash | |
###### | |
## Installs an sdk from a dyld decache plus some goodies. | |
## Slightly based on BigBoss's installsdk3. | |
## Created by theiostream. Public Domain. | |
## ADVANTAGES: | |
## - Uses the latest on-device frameworks/libraries | |
## - Is completely legal |
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
// From Cocoanetics (s/&/&) | |
static NSString *NSStringURLEncode(NSString *string) { | |
return [(NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)string, NULL, CFSTR("!*'();:@&;=+$,/?%#[]"), kCFStringEncodingUTF8) autorelease]; | |
} | |
static NSString *NSDictionaryURLEncode(NSDictionary *dict) { | |
NSMutableString *ret = [NSMutableString string]; | |
NSArray *allKeys = [dict allKeys]; | |
for (NSString *key in allKeys) { |
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
// CountryCode.h | |
// (c) 2013 Bacon Coding Company, LLC. | |
// Licensed under the MIT License. | |
// I lost my time scripting this dictionary in Python than I'd have writing it. | |
// Regardless, it was some fun. | |
#import <Foundation/Foundation.h> | |
// Reference: http://www.apple.com/itunes/affiliates/resources/documentation/linking-to-the-itunes-music-store.html#appendix |
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
@interface Pair : NSObject { | |
@public | |
id obj1; | |
id obj2; | |
} | |
- (id)initWithObjects:(id)object, ...; | |
@end | |
@implementation Pair | |
- (id)initWithObjects:(id)object, ... { |
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 java.util.Scanner; | |
public class SmartTTT { | |
private static int[][] t; | |
private static int lx, ly; | |
public static final int INFINITY = 2; // this is sad. | |
private static char ti(int i) { | |
char ret; |
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/perl | |
# Copyright (C) 2007, 2008 Simon Josefsson <[email protected]> | |
# Copyright (C) 2007 Luis Mondesi <[email protected]> | |
# * calls git directly. To use it just: | |
# cd ~/Project/my_git_repo; git2cl > ChangeLog | |
# * implements strptime() | |
# * fixes bugs in $comment parsing | |
# - copy input before we remove leading spaces | |
# - skip "merge branch" statements as they don't |
OlderNewer