Use Bun for Shell Scripts
I’ve moved most of my small scripts to Bun. It sidesteps Windows’ lack of shebang support and the Git-for-Windows/WSL bash dance, and gives you one runtime for both ad-hoc shell-style commands and full scripts.
I’ve moved most of my small scripts to Bun. It sidesteps Windows’ lack of shebang support and the Git-for-Windows/WSL bash dance, and gives you one runtime for both ad-hoc shell-style commands and full scripts.
This post introduces a solution for automatically setting up and tearing down shell environments for PowerShell in Windows. It is proposed as a potential alternative to the bash-based tool direnv, which, while effective at loading .envrc files in the current or nearest ancestor directory, has limited compatibility with PowerShell in Windows.
As mentioned in ♯ Yubico for Windows, I used PuTTY/Plink instead of the OpenSSH client together with YubiKey because the OpenSSH Client does not support the socket file created by GnuPG. Plink does not work well in Windows Terminal. The Visual Studio Code SSH Remote does not support Plink as well, because it will pass some command line arguments that are not supported by Plink. So I decide to switch back to the OpenSSH client. Fortunately, the utility wsl-ssh-pageant can create a tunnel between a Windows pipe and the pageant socket, and the OpenSSH client can use the Windows pipe as SSH_AUTH_SOCK. This article is a tutorial to set up wsl-ssh-pageant.
This post records how I set up Yubico Key in Windows, so I’ll not delve into too much details. I have the model YubiKey 5 NFC. I frequently use 2 GPG keys stored in the key, one for encryption, another for SSH authentication. The GPG encryption part is simple, GnuPG just works. Using the stored GPG key for SSH is a bit complex, because it requires collaboration between GnuPG and the SSH client. After experiment many different solutions, I decide to use the simplest one, using putty/plink as the SSH client and enabling thepageant support in GnuPG. See ♯ SSH Authentication Using a YubiKey on Windows And the OpenSSH Client how to use OpenSSH client with YubiKey.
The article mainly refers Exercise 2 - Track User Mode Process Allocations | Microsoft Docs. 1. Install Windows Performance Recorder and Analyzer Download and install ADK from here. The windows build version can be checked by running “winver” via Win+r.
Following example moves the Ubuntu distribution to disk D:\WSL\Ubuntu.
I prefer using a dedicated WSL instance to run containers. So I’ll install a minimal distribution, Alpine, to run podman. Install the tool LxRunOffline first via scoop scoop bucket add extras scoop install lxrunoffline Download Alpine root package from https://lxrunoffline.apphb.com/download/Alpine. See more distributions in LxRunOffline Wiki.
There are two apps both work for me in scoop extras bucket. scoop bucket add extras scoop install rbtray traymond They both require running their background process first. Rbtray minimizes a window into system tray by right clicking the window minimization button, while traymond us shortcuts Win + Shift + Z。
I used to use Visual Studio Code in Windows as mentioned in a previous post, ♯ My Windows Environment Setup. But its startup time is terrible on Surface Go, so I decide to give vim another try.
I have only one Windows device, the Surface Go. I work on it occasionally, especially on short trips. I prefer Surface Go because of handwriting. I have a simple setup to meet my work requirements.