start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/sh | |
| ## tmbo.sh -- my attempt at posting from the command line | |
| ## tmbo: lnk, twitter: @oogali | |
| ## | |
| BASE_URL=thismight.be/offensive | |
| TMBO_CONFIG=${HOME}/.tmbo | |
| TMPPATH=/tmp | |
| usage() { | |
| echo "$0 <options> <image to upload> [filename]" |
| #define MIN_PASTE(A,B) A##B | |
| #define MIN_IMPL(A,B,L) ({ __typeof__(A) MIN_PASTE(__a,L) = (A); __typeof__(B) MIN_PASTE(__b,L) = (B); MIN_PASTE(__a,L) < MIN_PASTE(__b,L) ? MIN_PASTE(__a,L) : MIN_PASTE(__b,L); }) | |
| #define MIN(A,B) MIN_IMPL(A,B,__COUNTER__) |
| #import <objc/runtime.h> | |
| #import <stdlib.h> | |
| // declare some of the Objective-C runtime's private parts where we can see them | |
| typedef struct _NXMapTable NXMapTable; | |
| extern NXMapTable *gdb_objc_realized_classes; | |
| extern void *NXMapInsert(NXMapTable *table, const void *key, const void *value); | |
| @implementation NSObject (Poser) |
| #import <Foundation/Foundation.h> | |
| @interface A: NSObject | |
| @end | |
| @implementation A | |
| void pileOfPoo(id self, SEL _cmd) { | |
| NSLog(@"💩"); | |
| } |
| - (BOOL)isNetworkActivityIndicatorVisible { | |
| return _activityCount > 0; | |
| } | |
| - (void)incrementActivityCount { | |
| [self willChangeValueForKey:@"activityCount"]; | |
| OSAtomicIncrement32((int32_t*)&_activityCount); | |
| [self didChangeValueForKey:@"activityCount"]; | |
| } |
| i386 : iPhone Simulator | |
| x86_64 : iPhone Simulator | |
| arm64 : iPhone Simulator | |
| iPhone1,1 : iPhone | |
| iPhone1,2 : iPhone 3G | |
| iPhone2,1 : iPhone 3GS | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 GSM Rev A | |
| iPhone3,3 : iPhone 4 CDMA | |
| iPhone4,1 : iPhone 4S |
| // Smart little helper to find main thread hangs. Enable in appDidFinishLaunching. | |
| // Only available with source code in DEBUG mode. | |
| @interface PSPDFHangDetector : NSObject | |
| + (void)startHangDetector; | |
| @end | |
| @implementation PSPDFHangDetector | |
| + (void)startHangDetector { | |
| #ifdef DEBUG |
| // Convert an EXIF image orientation to an iOS one. | |
| // reference see here: http://sylvana.net/jpegcrop/exif_orientation.html | |
| + (UIImageOrientation) exifOrientationToiOSOrientation:(int)exifOrientation { | |
| UIImageOrientation o = UIImageOrientationUp; | |
| switch (exifOrientation) { | |
| case 1: o = UIImageOrientationUp; break; | |
| case 3: o = UIImageOrientationDown; break; | |
| case 8: o = UIImageOrientationLeft; break; | |
| case 6: o = UIImageOrientationRight; break; |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \