测试 HTTPS 的 TCP 和 SSL 握手时间
curl -w "TCP handshake: %{time_connect}, SSL handshake: %{time_appconnect}\n" -so /dev/null https://www.baidu.com
输出
//: Playground - noun: a place where people can play | |
import Foundation | |
// Part 1. | |
// Generic and Protocol. | |
protocol DataTransform { | |
static func transform(from data: Any?) -> Any? | |
} |
{"lastUpload":"2018-06-14T13:11:03.423Z","extensionVersion":"v2.9.2"} |
{"lastUpload":"2020-08-09T02:37:24.032Z","extensionVersion":"v3.4.3"} |
#!/bin/sh | |
PRODUCT_NAME=$1 | |
FRAMEWORK_NAME=${PRODUCT_NAME/\-/\_} | |
BUILD_DIR="./.build" | |
rm -rf $BUILD_DIR | |
UNIVERSAL_OUTPUTFOLDER="$BUILD_DIR/$PRODUCT_NAME-universal" | |
mkdir -p $UNIVERSAL_OUTPUTFOLDER |
// | |
// WebServer.swift | |
// WebServerDemo | |
// | |
// Created by HyanCat on 25/02/2018. | |
// Copyright © 2018 HyanCat. All rights reserved. | |
// | |
import Foundation | |
import GCDWebServer |
import Foundation | |
/// Define a lockable protocol which contains an internal lock. | |
public protocol Lockable { | |
/// An internal lock | |
var internalLock: NSLock { get } | |
} | |
// MARK: - Make NSLock is a Lockable | |
extension NSLock: Lockable { |
测试 HTTPS 的 TCP 和 SSL 握手时间
curl -w "TCP handshake: %{time_connect}, SSL handshake: %{time_appconnect}\n" -so /dev/null https://www.baidu.com
输出
#!/bin/bash | |
# 清除早期的 Archives. | |
echo "====>> 开始检查过期的Archives..." | |
day=90 | |
dir=~/Library/Developer/Xcode/Archives | |
files=`find $dir -type d -name '*-*-*' -depth 1 -mtime +$day` | |
if [ -n "$files" ]; then |