linux清空journals空间 十二月 31, 2019 journalctl --vacuum-size=200M 设置 /etc/systemd/journald.conf 修改 SystemMaxUse=50M 然后 systemctl restart systemd-journald 阅读全文
linux弱网络模拟 十二月 30, 2019 tc qdisc add dev eth1 root netem delay 100ms duplicate 50% loss 50% reorder 25% 50% tc qdisc show dev eth1 tc qdisc del dev eth1 root 阅读全文
golang项目打包docker精简大小方法 十二月 26, 2019 RUN go get -u github.com/esrrhs/pingtunnel RUN go get -u github.com/esrrhs/pingtunnel/... RUN go install github.com/esrrhs/pingtunnel FROM debian COPY --from=build-env /go/bin/pingtunnel . WORKDIR ./ FROM golang AS build-env 阅读全文
golang pprof 工具 十二月 26, 2019 go tool pprof http://your.com/debug/pprof/heap go tool pprof http://your.com/debug/pprof/profile 阅读全文
x509: certificate signed by unknown authority 十二月 23, 2019 tr := &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify : true}, } client := &http.Client{Transport: tr} 阅读全文
nginx实现aaa.com到www.aaa.com的跳转 十二月 08, 2019 server { listen 80; server_name aaa.com; return 301 http://www.aaa.com$request_uri; } 阅读全文