Skip to content

Instantly share code, notes, and snippets.

@0xc010d
0xc010d / ADVUserInterfaceIdiom.h
Created September 10, 2012 09:13 — forked from advantis/ADVUserInterfaceIdiom.h
Easy user interface idiom detection
//
// Copyright © 2012 Yuri Kotov
//
extern BOOL ADVUserInterfaceIdiomIsPhone;
@0xc010d
0xc010d / recodesign.sh
Created June 20, 2012 15:31 — forked from xslim/recodesign.sh
Recodesign ipa
#!/bin/sh
SAVEDIR=`pwd`
WORKDIR=/tmp/ipa_$RANDOM$RANDOM
WORKIPA=/tmp/ipa_$RANDOM$RANDOM.ipa
echo unpacking $1
mkdir -p $WORKDIR
unzip "$1" -d $WORKDIR > /dev/null || exit
cd $WORKDIR
oldIFS=$IFS
IFS=$'\n'
cd $BUILT_PRODUCTS_DIR
for file in `find . -type f -name *.png`
do
filename=$(basename $file)
filename=${filename%.*}
dirname=$(dirname $file)
if [ "${filename: -3}" == "@2x" ]
#!/bin/sh
OLD_PWD="$(pwd)";
#get script parameters
APP_BUNDLE_DIR=$1;
IPA_URL=$2;
MANIFEST_NAME=$3;
if [ ! -d "$APP_BUNDLE_DIR" -o ! "$IPA_URL" ]; then
-(id)[FacebookAccountConfigurationPlugin publishPlugin]
+0 00002d70 55 pushl %ebp
+1 00002d71 89e5 movl %esp,%ebp
+3 00002d73 83ec18 subl $0x18,%esp
+6 00002d76 e800000000 calll 0x00002d7b
+11 00002d7b 58 popl %eax
+12 00002d7c 8b4d08 movl 0x08(%ebp),%ecx
+15 00002d7f 894df8 movl %ecx,0xf8(%ebp)
+18 00002d82 8b8805240000 movl 0x00002405(%eax),%ecx
+24 00002d88 894dfc movl %ecx,0xfc(%ebp)
@0xc010d
0xc010d / Masks.h
Created March 30, 2012 09:23
Masks
//
// Masks.h
//
// Created by Eugene Solodovnykov on 2/23/12.
//
#import <Foundation/Foundation.h>
NSInteger setBits(NSInteger mask, NSInteger bitMask);
NSInteger clearBits(NSInteger mask, NSInteger bitMask);
//
// Flipper.h
// FlipLib
//
// Created by Eugene Solodovnykov on 11/30/10.
// Copyright 2010 . All rights reserved.
//
#import <Foundation/Foundation.h>
#import "FLMultiStepAnimation.h"
@interface BaseNavigationController : UINavigationController
- (id)initWithRootViewController:(UIViewController *)rootViewController navigationBarBackgroundImage:(UIImage *)backgroundImage;
@end
@0xc010d
0xc010d / Performer.m
Created March 16, 2012 17:27
NSURLConnection with dispatch_async
- (id)perform:(NSURL *)url data:(id)data error:(NSError **)error {
static NSString * const kXRegionHeaderField = @"X-Region";
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request addValue:@"application/json" forHTTPHeaderField:@"Assept"];
[request addValue:[UserDataKeeper sharedDataKeeper].countryCode forHTTPHeaderField:kXRegionHeaderField];
[request setHTTPMethod:data ? @"POST" : @"GET"];
@0xc010d
0xc010d / TVRemote.m
Created March 15, 2012 15:41 — forked from xslim/TVRemote.m
TVRemote
@interface TVRemote : NSObject
@property (nonatomic, retain) TVRemoteAbstract *currentRemote;
- (void)createSocketRemote;
@end
@implementation TVRemote
- (void)createSocketRemote {
self.currentRemote = [[TVRemoteSocket alloc] init];
}