Ben Chuanlong Du's Blog

It is never too late to learn.

Enable and Disable Key Repeating in macOS

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Run the following command in terminal and then restart your Mac to enable key repeating by pressing and holding.

    defaults write -g ApplePressAndHoldEnabled -bool false
    
  2. Run the following command in terminal …

Manage Python Projects Using uv

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Installation

curl -LsSf https://astral.sh/uv/install.sh | sh

curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/usr/local/bin" sh

curl -LsSf https://astral.sh/uv/install …

Async in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Minimizing usage of async Rust. Refactor coded as much as possible to be in sync functions, and have async just be little "router wrappers" for waiting on stuff and feeding it …

Tips on GitHub Actions

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tips and Traps

  1. You can use sudo without password in Linux and macOS when running GitHub Actions.

  2. GitHub Actions supports manual triggers with workflow_dispatch. Workflow parameters are supported in manually triggers …

Powershell on Windows for GitHub Actions

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

PowerShell on Windows

Set PATH

echo "::add-path::./swigwin-4.0.1"

echo %programfiles% echo ::set-env name=ProgramFilesPath::%programfiles%

https://stackoverflow.com/questions/60169752/how-to-update-the-path-in-a-github-action-workflow-file-for-a-windows-latest-hos

https://docs.github.com/en/free-pro-team@latest/actions …