[轉]bestpractices.slide

https://talks.golang.org/2013/bestpractices.slide#19

2017-07-29 · 1 min · word · Me

[轉]Standard Package Layout

https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1

2017-07-29 · 1 min · word · Me

[轉]Go best practices, six years in

https://peter.bourgon.org/go-best-practices-2016/

2017-07-29 · 1 min · word · Me

go control docker

https://blog.kowalczyk.info/article/w4re/using-mysql-in-docker-for-local-testing-in-go.html https://github.com/kjk/go-cookbook/tree/master/start-mysql-in-docker-go

2017-07-29 · 1 min · 2 words · Me

[轉]谁吃了我的Linux内存?

http://colobu.com/2017/03/07/what-is-in-linux-cached/#more slabtop -s c ====================== pcstat https://github.com/tobert/pcstat #!/bin/bash #you have to install pcstat if \[ ! \-f /data0/brokerproxy/pcstat \] then echo "You haven't installed pcstat yet" echo "run \\"go get github.com/tobert/pcstat\\" to install" exit fi #find the top 10 processs' cache file ps \-e -o pid,rss|sort -nk2 -r|head -10 |awk '{print $1}'\>/tmp/cache.pids #find all the processs' cache file #ps -e -o pid>/tmp/cache.pids if \[ \-f /tmp/cache.files \] then echo "the cache.files is exist, removing now " rm \-f /tmp/cache.files fi while read line do lsof -p $line 2\>/dev/null|awk '{print $9}' >>/tmp/cache.files done</tmp/cache.pids if \[ \-f /tmp/cache.pcstat \] then echo "the cache.pcstat is exist, removing now" rm \-f /tmp/cache.pcstat fi for i in \`cat /tmp/cache.files\` do if \[ \-f $i \] then echo $i >>/tmp/cache.pcstat fi done /data0/brokerproxy/pcstat \`cat /tmp/cache.pcstat\` rm \-f /tmp/cache.{pids,files,pcstat}

2017-07-27 · 1 min · 132 words · Me