Ben Chuanlong Du's Blog

And let it direct your passion with reason.

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 …

Cygwin Portable

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

Cygwin Portable

  1. The portable versions has some problems

    • Vim, edit mode, backspace doesn't work sometimes (identation related)
  2. Cygwin portable scroll doesn't work after Vim is opened and then closed. but if …

An IO Bug in R

I encountered an input/output bug in R in Linux system. The symptom is that input and output are not displayed in the terminal and the warning message "An unusual circumstance has arisen in the nesting of readline input. Please report using bug.report()" is shown. I found that though …