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’

idea plugin

idea plugin java 编码规范检查 Alibaba Java Coding Guidelines idea 中统计代码行数 plugin: Statistic https://blog.csdn.net/liuchaoxuan/article/details/81270341

chromeos nfs, SMB

chromeos nfs, SMB Since Chrome 71, SMB is now natively supported by Chrome OS and this Chrome extension/app is deprecated. The new implementation is an order magnitude or two faster and much more reliable. On Chrome 71 or higher you can: Open the files app Click the “three dot menu” in the top right Choose “Add New Service” Choose “SMB file share” https://chrome.google.com/webstore/detail/network-file-share-for-ch/ndjpildffkeodjdaeebdhnncfhopkajk

监控一个 APP 的 HTTPS 流量

监控一个 APP 的 HTTPS 流量 在家里的电视上安装了 Plex 但是因为众所周知的原因, 登录 Plex 账号的过程或者登录之后的网络请求遇到了些问题, 路由器上配置的透明代理配

Turn On or Off Network Discovery in Windows 10

Turn On or Off Network Discovery in Windows 10 https://www.tenforums.com/tutorials/49652-turn-off-network-discovery-windows-10-a.html?cf_chl_jschl_tk=7e5927d7ceeff33af2e19733866ca589a4bc180d-1585367318-0-ATPawPfoOVJN7e3AvKtip7DRsrphy31i2BYZqBjNp4sAiFvtZDLUiNlRSC5jO-NIaXjwLfdMPLirZw3ZpJlK7Zp_sTimiHDPY-SbitbDuO9dJoix_zQy_D-LvLIVXNoCdYDOznNGV51hYsxdlJoo9_BetbBL-PBp3TtlF86LuoZnwZ7Fz55qGkDJ646AtovSmzMna8vlV1Dy6xMW3aZQ6If7ogrpS7TGCe9sjKJ4IXM4SZAl_Sqh5DGOQuT_E3v7sdp0xDazqrbw9rATqu2pEZtpCKqY1JO8W5LayTCAlPLO85_P6U2V33Wy-lXmRntOZrNqwEGtF77S2ncamjIFzK6Z3quUqxJ3qKqVuqCSgSzK

shell 进制转换

shell 进制转换 16进制转换成10进制 1 2 printf %d 0xF echo $((16#F)) 10进制转换成16进制 1 2 printf %x 15 echo "obase=16;15"|bc 三、10进制转换成8进制 printf %o 9 11 四、8进制转换成10进制 echo

jenkins api token

jenkins api token Jenkins REST API提供了API token,使得可以在程序中使用API token进行认证 (而不是使用你真实的密码) 。 API token可以在用户个人设

dpkg

dpkg Ubuntu 查看软件包是否安装 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 # 显示包含此软件包的所有位置 dpkg -S softwarename # -s status, 查看软件包状态 dpkg -s <package-name> # 可以加通配符* dpkg-query -l <package-name>

maven输出版本到文件

maven输出版本到文件 https://stackoverflow.com/questions/3532135/using-maven-to-output-the-version-number-to-a-text-file Create a text file somewhere in src/main/resources, call it version.txt (or whatever) File content: ${project.version} now in your pom.xml, inside the build element, put this block: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 <build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>**/version.txt</include> </includes> </resource> <resource> <directory>src/main/resources</directory> <filtering>false</filtering>

字节序 大端 小端

‘字节序 大端 小端’ 大端字节序 (big endian) 和小端字节序 (little endian) 。 什么会有小端字节序? 答案是,计算机电路先处理低位字节,效率比较高,