Quick Notes

Written by Eddie ZhangatDecember 27, 2024
quick notes

just some quick notes in my coding, if there is enough content, I will create a new blog for it.

fix the eol issue

make a .gitattributes

* text=auto eol=lf # default LF
*.{cmd,[cC][mM][dD]} text eol=crlf # CRLF for cmd
*.{bat,[bB][aA][tT]} text eol=crlf # CRLF for bat
# replace all the files with LF in old files
git rm --cached -r .
git reset --hard

fix the revalidate issue

[❌] export const revalidate = 15*60; //error
[✅] export const revalidate = 900; //success

set git proxy

git config --global http.proxy '<http|socks5>://<hostname>:<port>'
# cannot set https proxy because git doesn't have this option
 
# see the config is set or not
git config --global --get http.proxy