This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AEAD Provider: CommonCrypto (Hadrware acceleration) | |
Generating random data (100.00MB) | |
Start benchmark rc4 | |
Encrypt data in 0.215s | |
Decrypt data in 0.257s | |
Data integrity check completed | |
Start benchmark rc4-md5 | |
Encrypt data in 0.176s | |
Decrypt data in 0.256s | |
Data integrity check completed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function replaceAll(str, find, replace) { | |
return str.replace(new RegExp(find, 'g'), replace); | |
} | |
function dec2hex(dec, padding){ | |
return parseInt(dec, 10).toString(16).padStart(padding, '0'); | |
} | |
function utf8StringToUtf16String(str) { | |
var utf16 = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --tcp-fastopen 'http://weibo.com/aj/v6/comment/small?ajwvr=6&act=list&mid=4098409747599691&uid=1639149771&isMain=true&dissDataFromFeed=%5Bobject%20Object%5D&ouid=1748075785&location=v6_content_home&group_source=group_all&rid=7_0_8_2670172861507489838&_t=0&__rnd=1492655539756' -H 'Host: weibo.com' -H 'Accept: */*' -H 'X-Requested-With: XMLHttpRequest' -H 'Accept-Language: en-us' -H 'Accept-Encoding: gzip, deflate' -H 'Content-Type: application/x-www-form-urlencoded' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.1 Safari/603.1.30' -H 'Connection: keep-alive' -H 'Referer: http://weibo.com/blankwonder/home?wvr=5' -H 'DNT: 1' -H 'Cookie: A=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
die () { | |
echo >&2 "$@" | |
exit 1 | |
} | |
[ "$#" -eq 1 ] || die "1 argument (UUID) required, $# provided" | |
MDFIND=/usr/bin/mdfind | |
UUID=`echo ${1} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Proxy] | |
WIFI = direct, interface=en2 | |
VPN = direct, interface=utun0 | |
[Rule] | |
DOMAIN-SUFFIX,yach.me,WIFI | |
FINAL,VPN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var redis = require('redis'); | |
redis.debug_mode = true; | |
var db = redis.createClient(process.env.NODE_ENV === 'development' ? '6379' : '6392'); | |
var apns = require('apn'); | |
var util = require('util'); | |
var errorCallback = function(errcode, err) { | |
console.log(errcode, err); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; | |
CGFloat textWidth = [button.currentTitle sizeWithFont:button.titleLabel.font].width; | |
CGFloat imageWidth = button.currentImage.size.width; | |
CGFloat buttonWidth = button.frame.size.width; | |
CGFloat contentWidth = textWidth + 5 + imageWidth; | |
[button setTitleEdgeInsets:UIEdgeInsetsMake(0, - imageWidth + (buttonWidth - contentWidth) / 2.0f, 0, 0)]; | |
[button setImageEdgeInsets:UIEdgeInsetsMake(2, contentWidth / 2.0f + buttonWidth / 2.0f - imageWidth, 0, 0)]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cocoapods | |
/Podfile.lock | |
/Pods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@protocol GEStaticTableViewDataSource, GEStaticTableViewDelegate; | |
@interface GEStaticTableView : UIView { | |
UIView *_selectMaskView; | |
} | |
@property (readonly, nonatomic) NSInteger numberOfRow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) imagePickerController: (UIImagePickerController *) picker | |
didFinishPickingMediaWithInfo: (NSDictionary *) info { | |
UIImage *image = (UIImage *) [info objectForKey: | |
UIImagePickerControllerOriginalImage]; | |
NSArray *imageArray = [NSArray arrayWithObject:image]; | |
NSMutableDictionary *sendSessionInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys: | |
@"ItemType", @"Photo", @"ImageArray", imageArray, nil]; | |
[[picker parentViewController] dismissModalViewControllerAnimated: YES]; | |
[picker release]; |
NewerOlder