一组匹配中国大陆手机号码的正则表达式。
This file contains hidden or 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 hidden or 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 hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>downloadables</key> | |
| <array> | |
| <dict> | |
| <key>fileSize</key> | |
| <integer>1171440164</integer> | |
| <key>identifier</key> |
This file contains hidden or 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 hidden or 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
| #coding=utf-8 | |
| import os | |
| import sys | |
| import shlex | |
| import requests | |
| from bs4 import BeautifulSoup | |
| # 前置 | |
| # 安装 you-get |
This file contains hidden or 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 hidden or 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; |
This file contains hidden or 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
| - (NSURLSessionUploadTask *)uploadData:(NSData *)data completionHandler:(HXFStringCompletionBlock)completionHandler { | |
| NSParameterAssert(data); | |
| NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" | |
| URLString:@"http://upload.qiniu.com" | |
| parameters:@{@"token": self.uploadToken} | |
| constructingBodyWithBlock:^(id<AFMultipartFormData> formData) { | |
| [formData appendPartWithFileData:data name:@"file" fileName:@"?" mimeType:@"image/jpeg"]; | |
| } error:nil]; | |
This file contains hidden or 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
| #include <netinet/in.h> | |
| #include <sys/socket.h> | |
| #include <unistd.h> | |
| #include <arpa/inet.h> | |
| - (void)sendBroadcastPacket { | |
| // Open a socket | |
| int sd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); | |
| if (sd<=0) { | |
| NSLog(@"Error: Could not open socket"); |