Skip to content

Instantly share code, notes, and snippets.

Repeat a command until success

while true
do
    docker pull gcr.io/google-containers/cluster-proportional-autoscaler-amd64:1.6.0 && break
done
@flybirdd
flybirdd / gist:889a2991ad5f33a2e928d42a27962110
Last active September 4, 2019 02:30
将Sqlite中的数据以insert语法结构导出

# 导出表结构

sqlite3 [sqlite.db] .schema > schema.sql

# Dump出所有的数据

sqlite3 [sqlite.db] .dump > dump.sql
@flybirdd
flybirdd / latency.md
Last active September 4, 2019 10:23
Show ssh config hosts
alias ssh-hosts='grep -n "^Host" ~/.ssh/config'
@flybirdd
flybirdd / latency.markdown
Created April 10, 2018 14:44 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs