vim 编辑文件后想保存却发现没有用 sudo 时
https://fxtwitter.com/aiandcloud/status/2064724187848257831
#Shell #TIL
只需要 :w !sudo tee % 就可以了https://fxtwitter.com/aiandcloud/status/2064724187848257831
#Shell #TIL
只需要 :w !sudo tee % 就可以了无需手动获取 WebSocket URL 即可直接通过 DevTools 协议(CDP)连接并操控现有的 Chrome 浏览器。
# 1. 查看最近一年内修改最多的 20 个文件
git log --format=format: --name-only --since="1 year ago" | sort | uniq -c | sort -nr | head -20
# 2. 按提交次数对项目提交者排名
git shortlog -sn --no-merges
# 3. 筛选特定提交信息(漏洞 / 补丁等),列出关联的最多的 20 个文件
git log -i -E --grep="fix|bug|broken" --name-only --format='' | sort | uniq -c | sort -nr | head -20
# 4. 查看代码库历史中每月的提交次数(活跃程度)
git log --format='%ad' --date=format:'%Y-%m' | sort | uniq -c
# 5. 查看最近一年内代码回滚和热修复的频次
git log --oneline --since="1 year ago" | grep -iE 'revert|hotfix|emergency|rollback'终端 session 运行在后台 daemon ,关掉应用或者崩溃重启,重新打开时会话都能恢复如初。