拯救因开启刘海屏模拟而黑屏的手机

危险
不当操作可能对您的设备和数据造成不可逆的损害。

某日心血来潮,拿着刚刷入 Android12 的 OnePlus 5T,在 开发者选项->刘海屏 中随便点了一个,想着体验一下所谓“刘海屏”到底有多么的丑陋。手机卡顿了一下,屏幕一黑,再就没有亮起。

配置 Visual Studio Code 作为 Git 默认合并工具和对比工具

将下列内容添加到 .gitconfig 中 # Comment: Start of "Extra Block" # Comment: To unlock Visual Studio Code as your Git diff and Git merge tool [merge] tool = vscode [mergetool "vscode"] cmd = code --wait $MERGED [diff] tool = vscode [difftool "vscode"] cmd = code --wait --diff $LOCAL $REMOTE # Comment: End of "Extra Block" 参考文献 How to use Visual Studio

使用 find + chmod 批量修改目录或文件的权限

使用 chmod -R 递归修改权限的时候会把文件和目录的权限都修改了,可有时候我们只想修改目录的权限,便不能直接用 chmod -R 修改。由于 chmod 命令不支持分别对文件或目录进行操作,因此我们需要借助 find 命令来分别筛选出待处理的文件或目录,并通过 xargs 将需要修改权限的对象传递给 chmod 进行修改。