Skip to main content

Develop Environment

MacOS Legacy Rsync Hangs

·270 words·2 mins
A few months ago, I encountered an issue while using rsync to back up data from my MacBook to a NAS. rsync would appear to be running normally for a while and then suddenly hang indefinitely. The terminal output showed it syncing files as usual, and then it just… stopped. There were no error messages, and rsync didn’t exit. Initially, I thought it might be a large file transfer or an unstable network connection. However, I discovered that if I killed the process and ran the rsync command again, it would resume smoothly from the file where it had previously stuck. This happened several times in a row!

Managing Pre-existing Global NPM Packages After Installing NVM

·244 words·2 mins
Today I encountered a problem: After installing nvm, the path for installing global packages changed, making it impossible to directly remove previously installed global packages using npm uninstall -g. How did I discover this? A long time ago, I installed a global package that could be executed directly from the terminal using a command. But because it was so long ago, when I tried to upgrade that package, I found it wasn’t listed in npm list -g.

Pyenv Notes

·348 words·2 mins
Functions and Reasons for Using pyenv # pyenv is a tool used to install various versions of Python on a system, and to conveniently switch between Python versions. When you need to develop or maintain projects that require different Python versions simultaneously, you will need to use pyenv to help switch Python versions. New Python versions usually include syntax updates or new features.

Pipenv Notes

·400 words·2 mins
Why Pipenv # When maintaining many Python projects, different projects might use different versions of the same Python libraries. Not using a virtual environment and installing all Python modules directly on your machine will lead to version conflicts. In the past, the mechanism of virtualenv + requirements.txt allowed different projects to use different versions of the same package, and also enabled new developers or production environments to quickly install the packages required by the project.

WSL 2 on Windows Part 2 - Terminal Interface Settings

·347 words·2 mins
Bringing the terminal settings from Linux and Mac to Windows for easier operation. Windows Terminal Features # With Windows Terminal, you can: Enable multiple tabs (quickly switch between multiple Linux CLIs, Windows CLIs, PowerShell, etc.) Customize key bindings (shortcuts for opening/closing tabs, copy/paste, etc.) Use search functionality Customize themes These features offer much more than native WSL support, and allow for a setup similar to my Linux or Mac development environments, which is why I decided to use Windows Terminal.

WSL 2 on Windows Part 1 - Installation and Activation

·411 words·2 mins
I’m used to using Linux or Mac terminals for work. I took some time to set up the WSL environment on my home PC to easily switch work environments. Differences between WSL 2 and WSL 1 # WSL 2 is based on Hyper-V and runs a full Linux kernel in a virtual machine. WSL 1 is a simulation of Linux functionalities on the Windows system. Therefore, WSL 2 supports more native Linux features and system calls than WSL 1.