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 | |
# Change Xcode build specs by merging OSX's specs in iPhone Simulator's specs | |
# This allows to build dynamic libraries for the simulator | |
PLISTBUDDY="/usr/libexec/PlistBuddy" | |
ROOT=`xcode-select -print-path` | |
SIM_SPECS_DIR="$ROOT/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications" | |
OSX_SPECS_DIR="$ROOT/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications" |
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
// http://gcc.gnu.org/onlinedocs/cpp/Stringification.html | |
#define xstr(s) str(s) | |
#define str(s) #s |
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
// source: https://www.mikeash.com/pyblog/friday-qa-2010-01-29-method-replacement-for-fun-and-profit.html | |
#import <objc/runtime.h> | |
void __attribute__((weak)) MethodSwizzle(Class c, SEL origSEL, SEL overrideSEL) { | |
Method origMethod = class_getInstanceMethod(c, origSEL); | |
Method overrideMethod = class_getInstanceMethod(c, overrideSEL); | |
if (class_addMethod(c, origSEL, method_getImplementation(overrideMethod), method_getTypeEncoding(overrideMethod))) { | |
class_replaceMethod(c, overrideSEL, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)); | |
} else { |
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
# 360 script | |
# This script (re)login automatically on the wifi of CapitalOne 360 cafe in San Francisco | |
# created by: unknown | |
# adapted by: acoomans | |
require 'net/http' | |
require 'uri' | |
puts "<" * 80 |
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
/** FBUIKit */ | |
@interface UIImageView (FBUIKit) | |
+ (id)imageViewWithImageNamed:(id)arg1; | |
@end | |
@interface UITableView (FBUIKit) | |
- (id)indexPathForLastRowInSection:(int)arg1; | |
- (id)indexPathForLastRow; | |
@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
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
#define SYSTEM_VERSION_EQUAL_OR_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
#define SYSTEM_VERSION_EQUAL_OR_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) | |
// pragmas |
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
//__attribute__((noinline)) | |
void sub_1b1638_i(char *v) { | |
int r11 = 0x37; | |
int r6 = 0x65; | |
int r3 = 0x35; | |
int r2 = 0x38; | |
int r4 = 0x31; | |
int r9 = 0x34; | |
int r12 = 0x61; | |
int lr = 0x39; |
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
var target = UIATarget.localTarget(); | |
// Bundle ID, ie "com.domain.myapp" | |
UIALogger.logDebug("bundleID: " + target.frontMostApp().bundleID()); | |
// Name, ie "iPhone Simulator" | |
UIALogger.logDebug("name : " + target.name()); | |
// Model, ie "iPhone Simulator" | |
UIALogger.logDebug("model: " + target.model()); |
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
#pragma mark - delegate proxying | |
- (BOOL)respondsToSelector:(SEL)selector { | |
return ( | |
[super respondsToSelector:selector] || | |
[self.delegate respondsToSelector:selector] | |
); | |
} | |
- (id)forwardingTargetForSelector:(SEL)selector { |
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
/Applications/VLC-unstable.app/Contents/MacOS/VLC -I rc screen:// --noaudio --sout "#transcode{vcodec=h264,venc=x264, vb=800,acodec=none,scale=1.0}:std{access=file,mux=mp4,dst=my_first_transcoded_movie.mp4}" |