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
static int32_t __CFRunLoopRun(CFRunLoopRef rl, CFRunLoopModeRef rlm, CFTimeInterval seconds, Boolean stopAfterHandle, CFRunLoopModeRef previousMode) { | |
//通知Observer:即将处理Timers事件 | |
__CFRunLoopDoObservers(rl, rlm, kCFRunLoopBeforeTimers); | |
//通知Observer:即将处理Sources事件 | |
__CFRunLoopDoObservers(rl, rlm, kCFRunLoopBeforeSources); | |
//处理Blocks | |
__CFRunLoopDoBlocks(rl, rlm); | |
//处理Sources0 通过处理结果来判断是否需要再次执行Blocks | |
Boolean sourceHandledThisLoop = __CFRunLoopDoSources0(rl, rlm, stopAfterHandle); | |
if (sourceHandledThisLoop) { |
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://www.moerats.com/archives/404/ | |
安装 | |
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh | |
#备用地址 | |
wget -N --no-check-certificate https://www.moerats.com/usr/shell/Caddy/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh | |
卸载 | |
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/caddy_install.sh && bash caddy_install.sh uninstall | |
#备用地址 |
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
一键脚本 | |
执行下面的代码下载再运行管理脚本 | |
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/status.sh && chmod +x status.sh | |
管理菜单 | |
根据需要安装客户端或者服务端 | |
# 显示客户端管理菜单 | |
bash status.sh c |
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
首先安装 Docker | |
curl -sSL https://get.docker.com/ | sh | |
systemctl start docker | |
systemctl enable docker | |
安装HTML5 Speedtest | |
docker run -d -p 6688:80 ilemonrain/html5-speedtest:alpine | |
参数详解: |
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
乐赢尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更有个性化的服务,乐赢会按照本隐私权政策的规定使用和披露您的个人信息。但乐赢将以高度的勤勉、审慎义务对待这些信息。除本隐私权政策另有规定外,在未征得您事先许可的情况下,乐赢不会将这些信息对外披露或向第三方提供。乐赢会不时更新本隐私权政策。 您在同意乐赢服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于乐赢服务使用协议不可分割的一部分。 | |
1. 适用范围 | |
(a) 在您注册乐赢帐号时,您根据乐赢要求提供的个人注册信息; | |
(b) 在您使用乐赢手应用,或访问乐赢平台网页时,乐赢自动接收并记录的您的浏览器和计算机上的信息,包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据; | |
(c) 乐赢通过合法途径从商业伙伴处取得的用户个人数据。 | |
您了解并同意,以下信息不适用本隐私权政策: | |
(a) 您在使用乐赢平台提供的搜索服务时输入的关键字信息; | |
(b) 乐赢收集到的您在乐赢发布的有关信息数据,包括但不限于参与活动、成交信息及评价详情; | |
(c) 违反法律规定或违反乐赢规则行为及乐赢已对您采取的措施。 | |
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
// Create a shared URL cache | |
let memoryCapacity = 500 * 1024 * 1024; // 500 MB | |
let diskCapacity = 500 * 1024 * 1024; // 500 MB | |
let cache = NSURLCache(memoryCapacity: memoryCapacity, diskCapacity: diskCapacity, diskPath: "shared_cache") | |
// Create a custom configuration | |
let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() | |
var defaultHeaders = Alamofire.Manager.sharedInstance.session.configuration.HTTPAdditionalHeaders | |
configuration.HTTPAdditionalHeaders = defaultHeaders | |
configuration.requestCachePolicy = .UseProtocolCachePolicy // this is the default |
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
/** | |
* 在发送请求之前,决定是否跳转 | |
* | |
* @param webView 实现该代理的webview | |
* @param navigationAction 当前navigation | |
* @param decisionHandler 是否调转block | |
*/ | |
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { | |
if (navigationAction.navigationType==WKNavigationTypeBackForward) { //判断是返回类型 |
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
/** | |
* 在发送请求之前,决定是否跳转 | |
* | |
* @param webView 实现该代理的webview | |
* @param navigationAction 当前navigation | |
* @param decisionHandler 是否调转block | |
*/ | |
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { | |
if (navigationAction.navigationType==WKNavigationTypeBackForward) { //判断是返回类型 |
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
GitHub 多人协作开发 三种方式: | |
一、Fork 方式 网上介绍比较多的方式(比较大型的开源项目,比如cocos2d-x) | |
开发者 fork 自己生成一个独立的分支,跟主分支完全独立,pull代码后,项目维护者可根据代码质量决定是否merge代码 | |
此方式网上方法比较多,这里不详细描述 | |
有两种常用的方法在GitHub上建立团队合作: | |
二、组织 – 组织的所有者可以针对不同的代码仓库建立不同访问权限的团队。 | |
Accounts Settings => Organizations =>Create new Organizations 新建一个组织 然后添加项目成员,根据提示设置完毕即可。 | |
新建一个Repository 新建完毕后 进入Repository的Settings =>Collaborators 在Teams下面点击刚创建的组织 比如eveloper-51/owners |
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
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID` |
NewerOlder