Skip to content

Instantly share code, notes, and snippets.

View darkcl's full-sized avatar

darkcl darkcl

  • Hong Kong
View GitHub Profile
@darkcl
darkcl / gist:0e3844f759cdea1ce8c83f4edeba6775
Created March 9, 2018 05:49 — forked from adamgit/gist:3705459
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
##########################################
#
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.82
#
# Latest Change:
# - MORE tweaks to get the iOS 10+ and 9- working
# - Support iOS 10+
# - Corrected typo for iOS 1-10+ (thanks @stuikomma)
@darkcl
darkcl / default.custom.yaml
Created August 12, 2016 14:20 — forked from lotem/default.custom.yaml
在Rime輸入方案選單中添加五筆、雙拼、粵拼、注音,保留你需要的
# default.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
schema_list:
- schema: luna_pinyin # 朙月拼音
- schema: luna_pinyin_simp # 朙月拼音 简化字模式
crontab -e
0 10 * * * rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport
crontab -l
@darkcl
darkcl / example.m
Last active March 16, 2016 16:37
AFNetworking example
AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"https://maps.googleapis.com"]];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
NSDictionary *param = @{@"address": @"str"};
[manager GET:@"/maps/api/geocode/json"
parameters:param
success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) {
// Map your model objects with responseObject
gem install snapshot; snapshot reset_simulators