日常中会使用到很多好用的命令,在这里记录一下
迁移仓库时保留部分commit历史
repo a -> repo b
想要将a仓库的部分代码迁移到b仓库中,并保留commit
pip3 install git-filter-repo
workspace a
git clone a
cd a
git filter-repo --path src/xxx
git remote add remote_b
git checkout -b add_xxx-tmp
git push --set-upstream remote_b add-xxx-tmp
workspace b
git pull
git checkout -b add-xxx
git merge origin/add-xxx-tmp --allow-unrelated-histories
git push --set-upstream origin add-xxx
模拟http 0.9 server
http0.9没有请求体,没有响应头,请求头也很简单,现在简单的http server都默认是1.0及以上的了
GET /1.html
使用socat进行server的模拟
socat TCP-LISTEN:7778,fork EXEC:'echo "Hello, HTTP/0.9!"'
使用nc发送http 0.9的流量
http0.9.http
GET /
cat http0.9.http | nc 127.0.0.1 7778
关闭chrome默认的hdr显示
hdr好像被玩坏了,好多亮瞎眼的头像啊
将chrome://flags/#force-color-profile
设置为sRGB,可以关闭chrome的hdr显示
https://v2ex.com/t/1136737
windows使用代理时uwp软件无法联网
# 解除全部uwp应用的网络隔离
FOR /F "tokens=11 delims=\" %p IN ('REG QUERY "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings"') DO CheckNetIsolation.exe LoopbackExempt -a -p=%p
https://github.com/2dust/v2rayN/issues/1083
win11安装跳过邮箱登录
windows安装时,如果使用邮箱登录,user文件夹就会是邮箱前几位,对于使用qq邮箱的很不友好,win11安装没有明显的跳过登录按钮。
在知乎发现可以使用no@thankyou.com
登录,密码随便输,就可以跳过邮箱登录,使用本地账号。
https://www.zhihu.com/question/533867947/answer/3569380757