Skip to content

Instantly share code, notes, and snippets.

View youngshook's full-sized avatar
🐝
Working

YoungShook youngshook

🐝
Working
View GitHub Profile
@6david9
6david9 / parse_ipa.py
Created March 25, 2015 07:12
parse ipa
# -*- coding: UTF-8 -*-
import zipfile
import biplist
import tempfile
import shutil
import re
import os
@tony0x59
tony0x59 / PSPDFUIKitMainThreadGuard.m
Last active October 28, 2019 11:15 — forked from steipete/PSPDFUIKitMainThreadGuard.m
iOS,在DEBUG模式自动探测非主线程视图更新操作,将.m加入项目即可生效。
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
#ifdef DEBUG //only use this in debug builds
#import <objc/runtime.h>
#import <objc/message.h>
# Basic Strongswan ikev2 server setup
* paltform: atlantic.net ubuntu 14.04 x64
* the commands below are run with root account
## Strongswan
```
apt-get install strongswan
apt-get install iptables iptables-persistent
```
@chaitanyagupta
chaitanyagupta / re-sign-ios-app.md
Last active November 5, 2024 10:25
How to re-sign an iOS app with another developer account

WARNING These steps are probably out dated and will not work.

To re-sign an iOS app with another developer account, ensure that the following are in place first.

  1. Distribution certificate of the other developer account
  2. A provisioning profile from the other developer account

Note that the Apple requires bundle IDs to be globally unique, even across accounts. So a bundle ID i.e. CFBundleIdentifier from one account can't be used in a different account, even though the team id/prefix would be different.

Ensure that the new distribution certificate is in your keychain and the new provisioning profile on your disk.

@mindbrix
mindbrix / gist:710707d3dec311196e5e
Last active August 29, 2015 14:03
Unicode char to NSString
NSString *hexString = @"1F0A7";
unsigned int character;
NSScanner* scanner = [NSScanner scannerWithString:hexString ];
[ scanner scanHexInt:&character ];
UTF32Char inputChar = NSSwapHostIntToLittle(character); // swap to little-endian if necessary
NSString *str = [[NSString alloc] initWithBytes:&inputChar length:4 encoding:NSUTF32LittleEndianStringEncoding];
@aa65535
aa65535 / aria2.bat
Last active April 18, 2025 09:41
Aria2的配置文件 & 启动脚本
:: 启动后需要保留窗口, 关闭窗口则结束进程
aria2c --conf-path=aria2.conf -D
/**
Provides the ability to verify key paths at compile time.
If "keyPath" does not exist, a compile-time error will be generated.
Example:
// Verifies "isFinished" exists on "operation".
NSString *key = SQKeyPath(operation, isFinished);
// Verifies "isFinished" exists on self.
@xdream86
xdream86 / HUD.h
Created December 21, 2013 07:56
使用MBProgressHUD的便利方法
#import <Foundation/Foundation.h>
#import "MBProgressHUD.h"
@interface HUD : NSObject
+(MBProgressHUD*)showUIBlockingIndicator;
+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str;
+(MBProgressHUD*)showUIBlockingIndicatorWithText:(NSString*)str withTimeout:(int)seconds;
+(MBProgressHUD*)showUIBlockingProgressIndicatorWithText:(NSString*)str andProgress:(float)progress;
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (nonatomic, strong) CABasicAnimation *animationCopy;
@end
@delebedev
delebedev / gist:7265957
Created November 1, 2013 14:09
Bind RAC to AFNetworking
- (RACSignal *)enqueueRequestWithMethod:(NSString *)method path:(NSString *)path parameters:(NSDictionary *)parameters cacheTime:(NSTimeInterval)expirationTime {
NSAssert(self.cluster, @"cluster should be set before request.");
NSAssert(self.applicationID.length != 0, @"applicationID should be set before request.");
NSMutableURLRequest *request = [self requestWithMethod:method path:path parameters:parameters];
RACSignal *signal = [RACSignal createSignal:^(id<RACSubscriber> subscriber) {
AFHTTPRequestOperation *operation;
operation = [self HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *op, id JSON) {
NSDictionary *errorDictionary = JSON[@"error"];