Ben Chuanlong Du's Blog

And let it direct your passion with reason.

List Running Jupyter Notebook Servers

You can list running Jupyter Notebook servers using the following command.

jupyter notebook list

It works well most of the time. However, if the servers are launched using the root account (e.g., in a Docker container), you might encounter issues. In this case, a better alternative is to list …

Tips for AWK

AWK Tutorial

  1. For small structured text files, it is suggested that you use the q command to manipulate it.

    For complicated logic, it is suggested that you use a scripting language (e.g., Python) instead. I personally discourage using of awk unless you have a large file (that q cannot …

Selectively Disable Vimperator on Webpages

You can press shift + esc to disable Vimperator on pages and insert to enable it again. This is not good solution as often times you wan to disable Vimperator on a few pages but still have it enabled on other pages. You can achieve this by configurating the ~/.vimperatorrc file …

Using Bash in Docker

If the docker container was started using /bin/bash (you can check using docker ps) command you can access it using attach.

docker attach container_name_or_id

If the docker container was started but not with /bin/bash, you have to create a bash instance inside the container using exec.

docker exec …

Start RStudio Server After Upgrading

It is quite often that the RStudio server cannot be start after upgrading. This is due to running R session in the background. A simple solution is to just restart the host machine. However, it is very risky to start servers (especially remote shared ones). An alternative way is to …