One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
mkdir -p $GOPATH/src/github.com/someone_or_organization/ | |
cd $GOPATH/src/github.com/someone_or_organization/ | |
git clone git@github.com:$YOUR_GITHUB_USERNAME/the_repo_name.git | |
cd the_repo_name | |
git remote add upstream git@github.com:someone_or_organization/the_repo_name.git | |
git remote set-url --push upstream no_push |
### Testing if the client is a mobile or a desktop. | |
### The selection is based on the usual UA strings for desktop browsers. | |
## Testing a user agent using a method that reverts the logic of the | |
## UA detection. Inspired by notnotmobile.appspot.com. | |
map $http_user_agent $is_desktop { | |
default 0; | |
~*linux.*android|windows\s+(?:ce|phone) 0; # exceptions to the rule | |
~*spider|crawl|slurp|bot 1; # bots | |
~*windows|linux|os\s+x\s*[\d\._]+|solaris|bsd 1; # OSes |
前几天无意间看到 Go2 有一个关于语言修改的提案,增加 sum types 或者叫 union types,与 Protobuffer 中的 oneof 语义很像,基本概念是定义一个新的类型,为其他类型之和,用|
分割不同的类型,组合起来的类型 type 只能是各个类型的其中一个。比如
type maybeInt nil | int
本文是对 TLS 1.3 相关内容的一些整理和看法,包括 TLS 1.3 解决了哪些问题,带来了哪些提升,一些细节的探究,和 QUIC 的比较以及对 TLS 1.3 的看好。
HTTPS 已经是互联网通信的主流协议,它是互联网安全通信的保障,但是也存在一些性能问题和不少安全漏洞,从 90 年代诞生到 2018 年 TLS 1.3 出现之前的二三十年里,TLS 的握手流程都没有结构性变化,建立一个 TLS 链接需要消耗两个 RTT(round-trip time),这导致 TLS 链接会比较慢,假设你 ping 服务器的延迟是 100ms,两个 RTT 就是 200ms,再加上 DNS 请求和 TCP 三次握手和最终的 HTTP 链接进行数据通信,你看到网站主页面开始响应的延迟起码是 400ms 以上,而人类的对 100ms 以上的延迟是有感的,根据 Amazon 的统计首页打开时间每增加 100 毫秒,网站销售量会减少 1%。伴随着 TLS 的发展,越来越多的针对性攻击也开始出现,包括 Heartbleed , BERserk , goto fail; ,这些是由于 TLS 实现的缺乏测试导致的,都属于代码 BUG 的范围,但是 POODLE、ROBOT 这种就是属于协议设计上的漏洞了。