一组匹配中国大陆手机号码的正则表达式。
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
set appName to "Xcode" | |
tell application appName | |
if it is not running then | |
activate | |
else | |
tell application "System Events" | |
set activeApp to name of first application process whose frontmost is true | |
if visible of application process appName is false or (not (exists (window 1 of process appName))) or (appName is not in activeApp) then | |
tell process "Dock" |
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 | |
if [ $# -ne 4 ] | |
then | |
echo "Usage: $0 <host> <port> <pattern> <seconds>" | |
exit 1 | |
fi | |
cursor=-1 | |
keys="" |
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 | |
# 当前系统 | |
HOST_TAG=darwin-x86_64 | |
# 支持的 Android 最低系统版本 | |
MIN=21 | |
# NDK 根目录 | |
NDK=$ANDROID_NDK_HOME |
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
enum X509Error: Error { | |
case certificateError(message: String) | |
case publicKeyError(message: String) | |
} | |
class X509 { | |
// A DER (Distinguished Encoding Rules) representation of an X.509 certificate. | |
let publicKey: SecKey |
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 arr = new Array(); | |
$('.thank').each(function() { | |
var str = $(this).attr('onclick'); | |
if (str.indexOf("铜币") >= 0) { | |
var substr = str.match(/thankReply.*;/); | |
arr.push(substr.toString()); | |
} | |
}); | |
for (i = 0; i < arr.length; i++) { | |
eval(arr[i]); |
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
@protocol AutoHook <NSObject> | |
@required | |
+ (NSArray <NSString *> *)targetClasses; | |
@end |
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
post_install do |installer| | |
installer.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
if config.name == 'Debug' | |
config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone' | |
else | |
config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Owholemodule' | |
end | |
change_directly = false |
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
// | |
// Obfuscator.swift | |
// | |
// Created by Dejan Atanasov on 2017-05-31. | |
// | |
import Foundation | |
class Obfuscator: AnyObject { | |
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
@implementation UIFont (PSPDFAdditions) | |
// https://gist.github.com/nuthatch/7594460 | |
static CGFloat PSPDFMultiplicatorForPreferredContentSize(void) { | |
CGFloat multiplicator = 1.f; | |
NSString *preferredTextStyle = UIApplication.sharedApplication.preferredContentSizeCategory; | |
if ([preferredTextStyle isEqualToString:UIContentSizeCategoryExtraSmall]) { | |
multiplicator = 0.9f; | |
}else if ([preferredTextStyle isEqualToString:UIContentSizeCategorySmall]) { | |
multiplicator = 0.95f; |