One question that may be frequently asked during an interview is that how you ensure data consistence between cache and database in an application. In this post, I will introduce some possible solutions and their drawbacks. While some of them… Read More
an introduction to channels in golang
Channels are commonly used to communicate messages among goroutines in golang. In this post, I will briefly introduce the channels in golang. Goroutines are light-weight threads in golang. When a goroutine wants to communicate with another goroutine, it can use… Read More
introduce curl command
Recently I used curl command a lot in several Continuous Integration projects. I wrote this post to summarize a few commonly-used options. -s This option enables silent mode, in which progress bar and error messages will not shown -S This… Read More
two useful clients about ssh and vnc in ubuntu
I used Ubuntu Linux as development environment heavily in my daily work. It took me some time to find some useful tools. In this post, I record two of them as below: 1) vnc client Vinagre is the default remote… Read More
variable indirect expansion in bash
Usually in Bash scripting, we define a variable by giving it a name. and reference it later by using that name in the form of ‘${variable_name}’. This is the usual use case. However, there is another unusual use case. The… Read More
a few tips for apt configuration
apt or apt-get is widely used as the package manager in Debian Linux and its downstream Linux distribution, such as Ubuntu. There are a lot configuration parameters. In this post, I will mainly describe two of them. 1. Acquire::https::Verify-Peer Due… Read More
use ip command to show statistics about transferred and received packages
The traditional ifconfig command can show the statistics about transferred and received packages on any network interface card in Linux. However, ifconfig command has been deprecated. ip command is the successor. The -s option can be used in ip command… Read More
2022 is a new start point
2022 Chinese Spring Festival starts a new year for Chinese people. Recalling the life in 2021, I made a important decision in my lifetime. I moved from one city to another city, which is far from my hometown. This change… Read More
pitfall when using docker file mount
A few days ago I mounted a file in the docker host to a file in a docker container when starting a docker container. However, when I edited the file in the docker host, the file change was not reflected… Read More
a good book about iptables
iptables is widely used in Linux to manipulate network packets. There are a lot of blog posts about its usage. I also recommend one here: https://www.frozentux.net/documents/iptables-tutorial/ This book contains many use cases and command parameter explanation about iptables. It alos… Read More