待整理的脚本(持续更新ing) 发表于 2023-11-26 更新于 2025-09-06 分类于 Linux 记录一些常用/重要,但容易忘记的命令 Python 注册全局变量以在所有代码中使用 1globals()["seed"] = 42 Python 动态修改源码 (Monkey Patching) 123456789# 在源码中class A: def forward(self): ...# 在项目中def new_forward(self): ...A.forward = new_forward wget 下载文件,保存为时间戳 1wget -O `date +%s`.jpg https://www.baidu.com/img/bd_logo1.png Nginx 端口转发 12345server { listen 4747; server_name localhost; proxy_pass http://x.x.x.x:4747;} 本文作者: wnma3mz 本文链接: https://wnma3mz.github.io/2023/11/26/待整理脚本/ 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!