Home

用 Node.js 实现 Windows RDP 自动登录

一台 Windows 机器上有多个账号,其中一个需要在后台保持登录来跑依赖桌面会话的定时任务。手动用远程桌面连一下太原始,改注册表 AutoAdminLogon 也只能设默认登录账号,无法在 A 账号已登录的情况下让 B 账号也在后台上线。最终方案:用 Node.js 在本地跑一个 RDP 客户端,连本机 3389 端口把目标账号登上去。

Read more

本地部署 Overleaf + VS Code 打通 + Copilot / Gemini / Claude 辅助写 LaTeX

上文(本地化部署 Overleaf):https://caritasem.github.io/2024/08/latex-on-premise-overleaf-template/ 本文记录两件事: 用 VS Code(Overleaf Workshop 插件)把项目同步到本地编辑,并用 Copilot 做润色/改写等 AI 协作。 1. VS Code 打通 Overleaf(Overleaf Workshop) step 1:安装插件 在 VS Code 扩展里搜索并安装:Overleaf Workshop。 类 VS Code 编辑器一般也可用(例如 Antigravity),步骤基本一致。 step 2:用 Cookie 登录(相当于以 co-autho...

Read more

免费申请域名 SSL 证书, 无限续期,基于 Let’s Encrypt

说明 本文记录单域名(A/普通域名)使用 Certbot 自动签发并自动续期的实施过程,着重讲述基于 --nginx 的常见流程与注意事项。泛域名(Wildcard)证书需要 DNS-01 验证(DNS API 或手动添加 TXT 记录),不在本文讨论范围。 安装 Certbot 以Ubuntu 系统为例: sudo apt update sudo apt install certbot python3-certbot-nginx 更多安装方式请参考 Certbot 官方文档。 单域名证书:申请流程 假设要为 test.example.com 申请证书,并且 Nginx 已经配置好对应的 server_name 并能通过 80 端口被外网访问。 使用 nginx...

Read more

Installing LightGBM on an M1 Macbook

Installing LightGBM on an M1 Mac While setting up LightGBM on my M1 Mac, I discovered that the default pip install lightgbm command does not work due to compatibility issues with Apple Silicon and libomp dependencies. After trying various fixes, including setting environment variables and reinstalling libomp via Homebrew, I still encountered i...

Read more

如何在Ubuntu系统上配置PostgreSql并且启用vector

虚拟机方式 1:安装 PostgreSQL 1.更新系统包列表 sudo apt update 虚拟机方式 1. 安装 PostgreSQL 更新系统包列表 sudo apt update 安装 PostgreSQL sudo apt install -y postgresql postgresql-contrib 启动并启用 PostgreSQL 服务 sudo systemctl start postgresql sudo systemctl enable postgresql 2. 切换到 postgres 用户并设置密码 PostgreSQL 安装后默认创建一个名为 postgr...

Read more

分布式系统中的CAP理论与事务

当把单体服务按功能领域拆分成多个微服务模块,每个模块为高可用又做多个副本部署,一个完整的事务流程就需要多个微服务组合完成。分布式系统的核心问题,就是各个节点的状态如何同步。CAP定理就是对这个问题的理论描述。 1998年,Eric Brewer 提出,分布式系统有C、A、P三个关键指标,并且不能同时满足。 Consistency:一致性 Availability:可用性 Partition tolerance:分区容错性 CAP Partition tolerance 分区容错性是分布式系统的一个关键特性,是系统遇到网络故障导致分区(即系统内的节点间通信因网络故障而被部分或完全切断)时,仍然能够继续服务的能力。由于网络本身的不稳定性,网络分区是一种可能出现的常...

Read more