As we known, standard httprouter func has 3 parameters like below: func ViewIndex(w http.ResponseWriter, r *http.Request, ps httprouter.Params){} Sometimes, we need pass addit…
Delete all images $ for i in `docker images | awk 'NR>1{print $1":"$2}'`;do docker rmi $i;done Aliyun docker accelerator(/etc/docker/daemon.json) {"registry-mirrors": ["ht…
Obtain node join token$ kubeadm token list | awk 'NR==2{print $1}' Get master hostname$ kubectl get nodes -l node-role.kubernetes.io/master -o jsonpath="{.items[*].metadata.na…
If you using Dockerfile, you should know about caching for faster builds. Sometimes, you need to rebuild without cache. you can run docker build with --no-cache option that wi…
There is a monitor.py can be used in Apache + mod_wsgi deployment, which can be used to auto reload wsgi processes when there is any change under Django project directory. I s…
(1) Background To fix following issue: Add "contains" operator in where function to support list pages in nested subdir I implemented a new contains operator in Hugo…
Here we will create a cloud based virtual server from scratch, following things need to be done to prepare develop and deployment env for django1.7+. Background Personally I p…
When using putty connect to ssh server, it always get connection lost when idle for sometime, and it reports "server unexpectedly closed network connection", there are two way…
It is very important to check the vmcore file when the server gets hang there or crash for unknown reason, following tips give some help on how to check the vmcore, hope it he…
How to write customized error with optional error struct passed type Y2HError struct { errMsg string errDetail error } func (e *Y2HError) Error() string { if e.errDetail != ni…