Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Schedule Task Using Cron in Linux

Note: Cron is great for simple scheduling requests. For complicated scheduling with many dependencies you probably want to go with AirFlow .

Installation

Cron is usually installed by default. It not (e.g., if you are using a Docker image), you can install it using the following command (on Ubuntu).

wajig …

Change Shell in Mac

You can check the current shell in use by running the following command.

echo $SHELL

However, notice that echo $SHELL does not report the right shell sometimes. A more robust way is to use echo $0.

The default shell can be changed using thee comamnd chsh. For example, thee following …

Install GNU Utils Using Homebrew

Installing GNU tools is a way to try to get Linux command experience in macOS. However, not every Linux command has an identical-experience version in macOS. ** It is suggested that you use a Linux virtual machine if you really want to have Linux experience in macOS. ** Notice that some hardwares …

Parse TOML Files in Python

  1. There are 2 popular Python libraries tomlkit and toml for parsing TOML formatted files in Python. tomlkit is preferred to toml as it is more flexible and style-preserving.

  2. A TOML file always interpret a key (even a bare ASCII integer) as string. For this reason, a dict with numerical keys …

Things to Do After Installing Linux

Note: The tips here are for Debian-based Linux distributions (Debian, Ubuntu, LinuxMint, Pop!_OS, AntiX, etc.).

Debian Specific

  1. If you installed Debian without a desktop environment, and wants to install a customized desktop environment now, make sure to install a DE manager (e.g., gdm, lightdm, etc.) as well. without …