windows环境准备

windows激活 https://github.com/TGSAN/CMWTAT_Digital_Edition https://github.com/massgravel/Microsoft-Activation-Scripts 官网下载 微信 https://pc.weixin.qq.com/ jetbrains toolbox工具箱 https://www.jetbrains.com/toolbox-app/ cursor 编辑器 https://www.cursor.com/ windows store商店下载 SnipDo 快捷工具 scoop 安装软件列表 scoop install main/7zip 解压软件 scoop install versions/googlechrome-dev 浏览器 scoop install extras/ditto 剪切板 scoop install versions/snipaste-beta 截图 scoop install extras/revouninstaller 软件卸载管理 scoop install extras/quickcpu 查看硬件温度 scoop install extras/coretemp 查看硬件温度 scoop install extras/qbittorrent-enhanced 种子下载管理器 scoop install nerd-fonts/JetBrainsMono-NF 字体文件 scoop install extras/fvm flutter版本管理工具 scoop install main/fnm node版本管理工具 scoop install extras/mitmproxy 抓包工具 scoop install extras/crystaldiskinfo 查看磁盘信息工具 scoop install extras/beyondcompare 文件比对 scoop install extras/revouninstaller 软件卸载管理 winget 软件列表 Pylogmon....

十二月 7, 2024

obsidian结合coding和github+vercel 实现自动部署

大概流程 本地仓库关联远程仓库为 coding(速度快),然后利用 coding的云构建自动同步到github中,然后 vercel 关联github中对应的仓库,为什么不直接用github,因为个人需要首先保证本地仓库能快速的同步到远程仓库,对网站的及时性要求不高, 所以同步使用的是国内仓库,网站使用的是 vercel 本地仓库默认使用dev分支,当想要更新网站时,手动将dev合并到master,此时将会触发 ci中的job,将代码同步到 github中对应的仓库的 master 分支,之后 vercel 将会自动部署更新网站 obsidian 所需插件 obsidian-git(同步代码所用) quickadd(新增hugo文章模板所用) QuickAdd 插件配置 在 obsidian 仓库根目录新建 _templates 文件夹并在其中新建 hugo.md 文件内容如下 我的环境$remote-branch仓库关联分支 为 dev分支 --- title: {{VALUE:title}} slug: {{VALUE:slug}} date: {{VALUE:date}} draft: true tags: comments: true ShowToc: true dateUpdated: {{VALUE:dateUpdated}} --- 继续在 obsidian 仓库根目录新建 _scripts 文件夹并在其中新建 create_new_post.js 内容如下 module.exports = async (params) => { QuickAdd = params; const title = await QuickAdd.quickAddApi.inputPrompt("Title"); QuickAdd.variables["title"] = title; QuickAdd....

八月 1, 2023

shell加载配置文件逻辑

参考 https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/ http://www.solipsys.co.uk/new/BashInitialisationFiles.html https://blog.csdn.net/kangkanglou/article/details/82698177

六月 29, 2023

NodeList 与 HTMLCollection

NodeList 与 HTMLCollection 可以是实时的也可以是静态的,除非特殊说明,不然都是实时的(querySelectorAll 返回的静态结果) 参考 https://dom.spec.whatwg.org/#old-style-collections

六月 25, 2023

git常用

常用命令 git config credential.helper store 保存账号密码到本地 git init 初始化仓库 git add . 添加所有文件到版本控制中 git commit -m "init" 提交文件,提交信息为 “init” git commit --amend 继上一次提交合并一起提交,提交信息为上一次提交信息 git remote add origin https://xxx.com 关联远程仓库地址 git push --set-upstream origin master 初次推送本地仓库至远程 git relog 查看 git 操作日志 git checkout -b commitId 已某个 commit 为基点创建 新分支 git apply commitId 应用某次提交的内容 git rebase git pull 常见场景 初始化仓库 git init 关联远程仓库 如果是更改远程仓库地址,需要先删除远程仓库关联 git remote remove origin,然后再关联到新的远程仓库git remote add $url 切换分支 git switch other-branch 或者 git checkout other-branch ,两个命令都表示切换到 other-branch 分支...

六月 5, 2023

HTTP 请求头大小写的问题

HTTP/1.x 大小写不敏感,但是在 HTTP2 中必须要小写 所以在设置请求头的时候要么全部大写,要么全部小写 避免发生请求头被覆盖的问题 参考地址 HTTP/2规范 https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2

六月 5, 2023