Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Install Python in macOS

There are a few ways to install Python in Mac.

  1. Install system-wide via the official Python installation package.

  2. Install a Anaconda Python distribution locally.

  3. Install locally using Homebrew (recommended).

A few comments about different ways of installation.

  1. Avoid installing multiple versions of Python in your system. It usually brings more …

Docker in WSL 2

Tips and Traps

  1. Docker on WSL 2 works great. However, the performance of IO is extremely bad if it access the Windows filesystem. For more discussions, please refer to WSL 2 Filesystem .

  2. Docker containers launched from a WSL (e.g., Ubuntu) shell will continue to run after the WSL shell …

Convert PDF to EPS

There are tons of tools for converting PDF pictures to EPS pictures in Linux. The pdf2ps command is a good one. It produces EPS pictures without losing much resolution. The general purpose tools convert (from the ImageMagick package) does not produce as good quality EPS figures.

Schedule Cron Tasks in a Docker Container

Cron tasks work in a Docker container. However, you have to manually start the cron deamon (root or sudo required) using cron or sudo cron if it is not configured (via the Docker entrypoint) to start on the start of the Docker container. For tutorials on crontab, please refer to …

Synchronize Files Using Dropbox

  1. Dropbox won't sync files that you don't have read permissions.

  2. You'd better not merge an old Dropbox folder while installing/configuring Dropbox.

  3. You'd better not store symbolic links in the Dropbox folder, because the symbolic links will be replaced by the real files/folders when synchronized to other computers.

  4. It …