一些有用的命令记录
chrome开启跨域
1 | open -n /Applications/Google\ Chrome.app/ --args --disable-web-security --user-data-dir=/Users/cc/MyChromeDevUserData |
Mac修改hosts
1 | cd /etc |
Mac查看端口
1 | lsof -i tcp:8080 |
git统计代码量
1 | git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --since=2023-09-22 --until=2023-09-28 --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done; |
导出vuepress文档为pdf
1 | npx mr-pdf --initialDocURLs="https://tcd.zeekrlife.com/doc/authcenter/" --contentSelector="main" --paginationSelector=".page-nav .next a" --excludeSelectors="header.navbar,aside.sidebar,footer.page-edit .edit-link,.global-ui,.page-nav" --coverImage="https://vuepress.vuejs.org/hero.png" --coverTitle=“我是test文档” --coverSub=“我是文档的副标题” |