Git CLI kex_exchange_identification
简单记一个 bug,以后再遇到方便查到解决方法。
Git 使用 ssh 拉取 GitHub 仓库的时候报 kex_exchange_identification 错误:
1234kex_exchange_identification: Connection closed by remote hostConnection closed by x.x.x.x port 22fatal: Could not read from remote repository.Please make sure you have the correct access rights
我一开始以为是密钥配置过期,后来发现是 GitHub 的地址更新了。把 known_hosts 删掉让它自己重新生成一下就好了。
1rm ~/.ssh/known_hosts
台式电脑睡眠模式睡得不彻底
最近台式电脑的 Windows 系统自己更新以后,我发现有些地方变得和以前不一样。
开始菜单→电源按钮→睡眠 只能让电脑显示屏熄灭,鼠标、键盘和主板上的灯全都没有熄灭,我的电脑离床比较近,狗屎 RGB 闪的我睡不着,所以我花了点时间研究解决方法。
最后我采用的解决方法是:
进入注册表编辑器(Win+R → regedit)
进入路径 \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
找到 AwayModeEnabled,将其值设置为0
完事,现在点击睡眠以后电脑就会和以前一样获得婴儿般的睡眠(
将 WSL 迁移到另一个驱动器
Original from https://blog.iany.me/2020/06/move-wsl-to-another-drive/.I thought the article is absolutely wonderful, so I reprinted it (and translated it into Chinese). This article just saved my system disk, thank the original author Ian Yang~
下面这个例子会手把手带领你安装一个 Ubuntu 虚拟机,并将它的存储位置迁移到 D:\WSL\Ubuntu.
第一步 安装 Ubuntu 虚拟机这一步是可选的,因为您也许已经安装过虚拟机了。
在 Microsoft Store 中安装 Ubuntu。启动它以初始化默认实例。根据提示创建Ubuntu中使用的用户。
第二步 将虚拟机迁移到指定位置使用如下命令导出实例并导入目标目录:
1234567cd D:\mkdir WSLcd WSLwsl --export Ubuntu ubuntu.tarwsl ...
关于 prettier + pnpm 的最佳实践
在半年前就发现我很多项目里的 prettier 对 vue 内的 pug 不起效果了,我一直以为是我的问题,例如 VSCode 的扩展配置有问题啦、依赖安装不对啦之类的。
在我浪费了一个小时的人生去查找 GitHub 上的各种 issues 后,我发现这居然是个 prettier 的兼容性 bug:
[Bug?] Symlink’d plugins in node_modules are not auto detected. #8056
简单概括一下内容:使用 pnpm 时,prettier 的插件寻址机制未按预期那样起作用。
我正是在大约半年前由 yarn 转向了 pnpm,因此遇到了这个 bug。
关于这个 bug,官方摆烂了,因为这个 issue 最初是在 2020 年被提出的,至今没有进行修复。
最后还是万能的网友提出了解决方案:使用 js 配置文件显式的指定插件路径。
比如这样:
12345// .prettierrc.cjsmodule.exports = { plugins: [require.resolve('@prettier/plugin- ...
Netlify CMS Test
This article is published with netlify-cms
inlinebold italic code
block
quote
list
list
list
ordering list
list 2
12// code blockconsole.log('hello, world')
screenshot
将组织仓库绑定到 Vercel 个人账户
警告
这应该属于恶性 bug,请不要滥用,避免风险。
https://vercel.com/new/import-flow?s=https://github.com/OWNER/REPO
直接访问这个链接,可以导入任意类型的仓库到个人账户名下部署,带持续集成的那种……
这里的仓库是有一定限制的,源仓库需要安装过由你授权的 Vercel App,简单来说你得是 owner。
ASCII 字符画在线生成器
表演一个杂技:
pre#ascii {
font-size: 6px;
letter-spacing: 0.4em;
line-height: 1;
font-weight: bold;
text-align: center;
background-color: #171717;
}
ORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIG
INALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINAL
MAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAINORIGINALMAIN
ORIGINALMAINORIGINALMAI ...
沃里杰诺•梅因 表情包!
沃里杰诺•梅因是我笔下的原创角色,在网友的怂恿下,以梅因为主题描改了一些表情包。
[{"url":"https://i.loli.net/2021/04/22/pS9FgqDMC85Bjca.jpg","alt":"爪巴"},{"url":"https://i.loli.net/2021/04/22/A4rFxvhkzc6nQtm.jpg","alt":"早上好"},{"url":"https://i.loli.net/2021/04/22/9ie5US4vIrhwlJz.jpg","alt":"晚上好"},{"url":"https://i.loli.net/2021/04/22/8RkIDiKu3wrjFnL.jpg","alt":"嗷呜~"},{"url":"https://i.loli.net/2021/04/22/wYMPI2y13h6KAmr.jpg","alt":"麻了"},{"url":"https://i.loli.net/2021/04/22/INBbsXKLPGHiSUe.jpg","alt":"祈祷猫猫头"},{"url":"https://i.l ...
常用缩写
WIPWork In Progress 开发中(work in progress, do not merge yet)
PTALPlease Take A Look 帮我看下(请别人 review 自己的 PR)
LGTMLooks Good To Me 看起来不错, 没有问题(别人 review 完 PR 之后)
RFCRequest For Comments 请求评论
i.e. I think this is a good idea, lets discuss
AFAIK / AFAICTAs Far As I Know / Can Tell 据我所知
IMHOIn My Humble Opinion 以我的拙见(多用于邮件和网络)
FYIFor your information 供你参考
CCCarbon Copy 抄送(邮件)
AFKAway From the Keyboard 稍后回来
ACKACKnowledgement 同意
i.e. agreed/accepted change
NACK / NAKNegative ACKnowl ...