Background
We still have quite a few projects that depends windows platform. I met Set-ItemProperty: Cannot find drive. A drive with the name 'IIS' does not exist.
issue when I was running a powershell script, and I couldn't find an answer until I asked my colleague Matthew.
The ANSWER
Powershell 7 is supposed to support all platforms, so it removed those windows specific features.You should use Powershell for windows instead.
Yes, this solved the issue. Thanks!
I keep my config files on github, and I use hard-link for most of the config files. It's convenient, as I can check the new changes easily and submit some of the changes when necessary. However, the default behavior of vim troubles me. It always changed the inode when I save the config file!
tldr; the solution is: put the following line in your .vimrc
set backupcopy=yes
PS
Though this way fixed Vim's behavior, I sadly found that git pull
will change the config file's inode as well. So there is actually no feasible solution. I have abandoned this hard link approach. If you have better solutions to maintain all your config files in one repository, please let me know!
Sometimes we need to delete all the bin/obj folders in a solution to resolve issues in Rider or Visual Studio. I assume you already have your preferred method for this task, but I would like to share my approach here in case someone else is unaware of how to do it in GitBash or MSys terminal:
cat ~/bin/delBinObj
set -e
find . -iname "bin" -print0 | xargs -0 echo
find . -iname "obj" -print0 | xargs -0 echo
read -p "The above folders are going to be deleted, are you sure? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
find . -iname "bin" -print0 | xargs -0 rm -rfv
find . -iname "obj" -print0 | xargs -0 rm -rfv
echo done
else
echo no
exit 1
fi
毕竟自己和父母都会老去,老年痴呆症离我们并不是很遥远。
读《最初的爱,最后的故事》时读到:
在老年痴呆症的早期,特别是对于素食主义者,检查他们血液中的维生素B12的水平,若发现大幅低于正常范围,
注射维生素B12看看效果。若有效果可适当加大剂量并定期补充维生素B12,有病例从痴呆状态复原,智力恢复正常,又健康的活了好几年。