Skip to content

Instantly share code, notes, and snippets.

View dacaiguoguogmail's full-sized avatar
🤒
Out sick

dacaiguoguo dacaiguoguogmail

🤒
Out sick
View GitHub Profile
@dacaiguoguogmail
dacaiguoguogmail / fix_pod_1_1_1.sh
Last active June 2, 2017 04:03
fix cocoapods podfile.lock strange quotation marks
#!/bin/zsh
podpath=$(echo `which pod`)
poddir=$(dirname $podpath)
podcoregemdir="$poddir"/../gems/cocoapods-core-1.1.1/lib/cocoapods-core/
echo "$podcoregemdir"lockfile.rb
cd $podcoregemdir
curl -fsSL https://raw.githubusercontent.com/dacaiguoguogmail/Core/master/lib/cocoapods-core/lockfile.rb -O
@dacaiguoguogmail
dacaiguoguogmail / fix_pod_1_1_1_revert.sh
Last active June 2, 2017 04:03
revert fix cocoapods podfile.lock strange quotation marks
#!/bin/zsh
podpath=$(echo `which pod`)
poddir=$(dirname $podpath)
podcoregemdir="$poddir"/../gems/cocoapods-core-1.1.1/lib/cocoapods-core/
echo "$podcoregemdir"lockfile.rb
cd $podcoregemdir
curl -fsSL https://raw.githubusercontent.com/CocoaPods/Core/1.1.1/lib/cocoapods-core/lockfile.rb -O
@dacaiguoguogmail
dacaiguoguogmail / config_Xcode_Server_Bot.m
Created October 30, 2017 05:48
config Xcode Server Bot
NSURLSessionConfiguration *configr = [NSURLSessionConfiguration defaultSessionConfiguration];
self.sessionManager = [NSURLSession sessionWithConfiguration:configr];
NSString *urlString = [NSString stringWithFormat:@"https://%@:20343/api/bots/%@",hostIp, fixId];
NSMutableURLRequest *mutR = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString]];
[mutR setHTTPMethod:@"GET"];
NSURLSessionDataTask *task1 = [self.sessionManager dataTaskWithRequest:mutR completionHandler:^(NSData * _Nullable data1, NSURLResponse * _Nullable response1, NSError * _Nullable error1) {
NSLog(@"%@",error1);
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data1 options:(NSJSONReadingMutableContainers) error:nil];
NSLog(@"%@",responseObject);