Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Comparision of Linux Emulation Solutions on Windows

  1. Virtual machine based on Virtualbox, etc. is an overkill, generally speaking. It provides complete functionalities but is more CPU and memory hangry.

  2. WSL 2 is the currently the best solution comes with Windows 10+. It is essentially a virtual machine but based on Hyper-V.

  3. Cygwin, MobaXterm, etc. are outdated as …

Resolve the DNS Contamination Issue in Firefox

The local DNS you use in China is probably contaminated and popular sites like Google, Facebook, etc. are not interpreted correctly. So if you are in China and use Firefox with Proxy, make sure to set network.proxy.socks_remote_dns to be true (follow steps below).

  1. Open an empty tab in …

Synchronization and Backup Solutions

Tips and Traps

  1. Almost all sychronization tools have problems with symbolic links. Most of them just ignore symbolic links. This makes sense as following symbolic links can causes serious disk problems. If not followed then symbolic links are likely broken on other device. The simple suggestion is do not place …

Docker for Nvidia GPU

Instruction on Using Nvidia GPU (CUDA) for Computing in Docker

  1. Install Nvidia cuda-drivers (or equivalent) on your Linux machine following instructions at CUDA Downloads. Notice that instead of installing cuda (using sudo apt-get install cuda), it is suggested that you install cuda-drivers only (using sudo apt-get install cuda-drivers). This is …

Disable the Checkers Layer in SpaceVim

You can use the following command in SpaceVim to disable the checkers layer temporarily.

let g:spacevim_lint_on_save = 0

If you want to disable the checkers layer permanently, add the following lines into your init.toml file.

[[layers]]
name = "checkers"
enable = false

It is suggested that you disable the checkers layer …

Init for Docker Containers

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

Built-in Support

Docker has built-in support for init process (which is based on tini) now. In short, you just have to specify the option --init when you start a container using …