单臂路由

单臂路由 openwrt设置 lan口设置 Network>interface>lan>physical settings: Lan口关闭桥接, Lan口取消桥接接口的勾选 接口选择网卡eth0 wan口设置 Network>interface>wan>physical settings: 接口选择网卡eth

podman in crostini

podman in crostini ERRO[0000] ‘overlay’ is not supported over btrfs at “/var/lib/containers/storage/overlay” https://bugs.chromium.org/p/chromium/issues/detail?id=938877&q=overlayfs&can=2 https://bugs.chromium.org/p/chromium/issues/detail?id=878034

vim 粘贴注释

vim 粘贴注释 vim在粘贴代码时会自动缩进,这样会把有注释的代码搞得一团糟,可能因为某行的一个注释造成后面的代码全部被注释掉,以前就是直接粘贴的

ssh Multiplexing,mux

ssh Multiplexing,mux 管理multiplexing 查看当前的状态 1 2 3 4 ssh -O check machine1 ssh -O check 192.168.50.169 -l root # Master running (pid=91057) 停止接受新的会话 1 2 3 4 ssh -O stop machine1 $ ssh -O stop root@47.91._._ # Stop listening request sent. 退出所

性能测试

性能测试 性能测试是什么: 性能测试就是通过特定的方式对被测试系统按照一定测试策略施加压力,获取该系统的响应时间、TPS、吞吐量、资源利用率等性

性能测试-响应时间

性能测试-响应时间 https://www.cnblogs.com/fnng/archive/2012/07/01/2571990.html 响应时间过程分析 我们需要对这个过程进行分解,才能得到你真正想要的响应时间。我把整个过程分三个部分,呈现时间,数据传输时间

cobra

cobra https://github.com/spf13/cobra-cli/blob/main/README.md go install github.com/spf13/cobra-cli@latest go mod init xxxxx cobra-cli init viper https://github.com/spf13/viper https://darjun.github.io/2020/01/17/godailylib/cobra/

json tool, jq command

json tool, jq command, json 格式化 install 1 apt install jq https://stedolan.github.io/jq/ https://stedolan.github.io/jq/download/ 1 2 3 jq ".[0]|.releases| .[0]|.downloads.linux.link" cat foo.txt|jq '.checklists|.[0]|.checkItems|.[].name' cat foo.txt|jq '.checklists|.[0]|.checkItems|.[]|if .state == "incomplete" then .name else "" end'|grep -v '""' jq 可以对 json 数据进行分片、过滤、映射和转换 jq 是用 C 编写,没有运行时依

docker 网络

docker 网络 安装 Docker 时,它会自动创建 3 个网络。可以使用 docker network ls 命令列出这些网络。 $ docker network ls NETWORK ID NAME DRIVER 7fca4eb8c647 bridge bridge 9f904ee27bf5 none null cf03ee007fb4 host host 运行一个容器时,可以使用 the -net 标志指定

goroutine pool

goroutine pool 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 type worker struct { Func func() } func main() { var wg sync.WaitGroup channels := make(chan worker, 10) for i := 0; i < 5; i++ { wg.Add(1) go func() { defer wg.Done() for ch := range channels { //reflect.

ssh client config

ssh config 1 2 3 4 5 6 7 host host0 hostname 192.168.1.10 port 22 user root # for openwrt ssh-rsa HostkeyAlgorithms +ssh-rsa PubkeyAcceptedKeyTypes +ssh-rsa https://daemon369.github.io/ssh/2015/03/21/using-ssh-config-file https://blog.csdn.net/XXY2083123843/article/details/128370472 1 2 3 4 5 6 7 8 vim ~/.ssh/config #--- Host * ControlMaster auto # ssh multiplexing ControlPath ~/.ssh/master-%r@%h:%p ControlPersist 10m ForwardAgent yes # ssh agent forward User root # 默认用户 使用通配符 (wildcard) 1 2

gor

gor 1 2 3 4 5 6 sudo ./gor --input-raw :8080 --output-stdout sudo ./gor --input-raw :8000 --output-http="http://localhost:8001" sudo ./gor --input-raw :8000 --output-file=requests.gor sudo ./gor --input-file requests.gor --output-http="http://localhost:8001" sudo ./gor --input-file requests.gor --output-stdout

tcp reset, rst

tcp reset, rst 在谈 RST 攻击前,必须先了解 TCP: 如何通过三次握手建立 TCP 连接、四次握手怎样把全双工的连接关闭掉、滑动窗口是怎么传输数据的、TCP 的 flag 标志位里 RST

go metrics

go metrics 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import "github.com/jregovic/go-metrics-influxdb" go influxdb.InfluxDB( metrics.DefaultRegistry, time.Duration(10)*time.Second, "http://192.168.50.244:8086", "database0", "measurement0", "", "", false, ) go metrics.Log( metrics.DefaultRegistry, time.Duration(metricsOutputDuration)*time.Second, logger.GetLogger(), ) meter := metrics.GetOrRegisterMeter("foo", nil) meter.Mark(1) https://github.com/rcrowley/go-metrics

fuchsia

fuchsia 1 2 3 curl -s "https://fuchsia.googlesource.com/fuchsia/+/master/scripts/bootstrap?format=TEXT" | base64 --decode | bash Recommended: export PATH="/root/projects/fuchsia/.jiri_root/bin:$PATH" https://fuchsia.dev/ fuchsia-china.com

ping command, fping

ping command, fping options -s<数据包大小>:设置数据包的大小; -M hint 设置MTU(最大传输单元)分片策略。 可设置为: ‘do’