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
<?php | |
/** | |
* Class FacadePHPDocs | |
* | |
* @author Ardhana <[email protected]> | |
*/ | |
class FacadePHPDocs{ | |
/** | |
* @var ReflectionClass |
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 | |
# Read either the first argument or from stdin (http://stackoverflow.com/questions/6980090/bash-read-from-file-or-stdin) | |
cat "${1:-/dev/stdin}" | \ | |
# Convert binary to hex using xxd in plain hexdump style | |
xxd -ps | \ | |
# Put spaces between each pair of hex characters | |
sed -E 's/(..)/\1 /g' | \ | |
# Merge lines | |
tr -d '\n' |
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 | |
MyDir="/data/projects/iOS/iOS-Runtime-Headers" | |
UpstreamDir="/data/projects/github/iOS/iOS-Runtime-Headers" | |
TAGS=(10.0 10.1 10.2 10.3 11.4) | |
DIRS=(Frameworks lib PrivateFrameworks protocols) | |
_task() | |
{ |
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 | |
remote=origin ; for brname in `git branch -r | grep $remote | grep -v /master | grep -v /HEAD | awk '{gsub(/^[^\/]+\//,"",$1); print $1}'`; do git branch --track $brname $remote/$brname || true; done 2>/dev/null |
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
// https://developer.apple.com/documentation/avfoundation/avassettrack/1386694-formatdescriptions?language=objc | |
static NSString * FourCCString(FourCharCode code) { | |
NSString *result = [NSString stringWithFormat:@"%c%c%c%c", | |
(code >> 24) & 0xff, | |
(code >> 16) & 0xff, | |
(code >> 8) & 0xff, | |
code & 0xff]; | |
NSCharacterSet *characterSet = [NSCharacterSet whitespaceCharacterSet]; | |
return [result stringByTrimmingCharactersInSet:characterSet]; | |
} |
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/sh | |
# | |
# Check TXLiteAVSDK_UGC pod source | |
# | |
# $ pod spec which TXLiteAVSDK_UGC | |
# ~/.cocoapods/repos/trunk/Specs/a/3/e/TXLiteAVSDK_UGC/6.7.7754/TXLiteAVSDK_UGC.podspec.json | |
## Existing version from CocoaPods Specs: | |
# 4.2.3427 Free |
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
{ | |
"AppleTV2,1": "Apple TV 2", | |
"AppleTV3,1": "Apple TV 3", | |
"AppleTV3,2": "Apple TV 3", | |
"AppleTV5,3": "Apple TV 4", | |
"AppleTV6,2": "Apple TV 4K", | |
"iPad1,1": "iPad", | |
"iPad2,1": "iPad 2", | |
"iPad2,2": "iPad 2", | |
"iPad2,3": "iPad 2", |
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
<?php | |
/** | |
* | |
* 中文转换为拼音 | |
* | |
*/ | |
function cn2pinyin($_String, $_Code='gb2312') { | |
$_DataKey = "a|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao|ce|ceng|cha" . | |
"|chai|chan|chang|chao|che|chen|cheng|chi|chong|chou|chu|chuai|chuan|chuang|chui|chun|chuo|ci|cong|cou|cu|" . | |
"cuan|cui|cun|cuo|da|dai|dan|dang|dao|de|deng|di|dian|diao|die|ding|diu|dong|dou|du|duan|dui|dun|duo|e|en|er" . |