pip使用国内源

pip install <package_name> -i https://pypi.tuna.tsinghua.edu.cn/simple

trx trx Published on 2025-02-19

CURL查询URL返回时间

curl -o /dev/null -s -w "响应时间: %{time_total} 秒\n" https://192.168.1.1

trx trx Published on 2025-01-20

powershell常用命令

# 获取本机IP地址,以网卡+IP的方式显示 Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.InterfaceAlias -notlike "*Loopback*" } | Select-Object InterfaceAlias,

trx trx Published on 2025-01-15

常见漏洞修复(持续更新)

CORS跨域漏洞 通过nginx结合lua脚本实现 # 在server块中指定lua脚本路径 access_by_lua_file '/opt/lua/cors.lua'; -- lua脚&#

trx trx Published on 2025-01-10

夜莺监控嵌入grafana配置

Grafana配置 root_url = https://x.x.x.x:8443 # nginx代理的新地址 cookie_secure = true cookie_samesite = none allow_embedding = true Nginx配置 server {

trx trx Published on 2025-01-10

定时删除日志文件

# 每周日0点删除5天前并且大于50M的日志文件 0 0 * * 0 find /var/log/ -type f -mtime +5 -size +50M -printf "%TY-%Tm-%Td %TH:%TM:%TS - 删除%p日志文件\n" -delete >> /var/log/del

trx trx Published on 2024-12-23

prometheus配置URL拨测

编辑blackbox.yml配置文件,增加跳过ssl认证 modules: http_2xx: prober: http http: preferred_ip_protocol: "ip4" http_post_2xx: prober: http

trx trx Published on 2024-12-10
trx trx Published on 2024-11-14

docker命令table补全

安装docker-ce-cli包即可

trx trx Published on 2024-11-08

go学习记录

第一天 go语言优势,兼顾运行性能和开发效率,高并发优势明显。 go优势领域,k8s、docker、prometheus、grafana等。

trx trx Published on 2024-11-08
Previous Next