Code
Nginx: worker_connections are not enough, reusing connections
We meet an error log on nginx: worker_connections are not enough, reusing connections
. To resolve this issue, here is my working solution according to the references:
Code
PNPOLY: How do I find if a point lies within a polygon?
This is a python version to translate W. Randolph Franklin's work. And recorded for further usage.
Code
Python Mirror Configuration
Here are some scripts to initialize your python environment to mirror your repo.
Code
Best Practice to Remove a Git Submodule
When you need to remove a submodule from your Git repository, the most straightforward and recommended approach is to use the git rm
command followed by a commit and push to the remote repository.
Code
Ubuntu 18.04 LTS 及以上如何配置 NTP
Ubuntu 自 18.04 开始使用 timesyncd 作为默认的 ntp client。当然如果有必要也可以安装较多包来部署一个自己的 ntp server。
本文只介绍如何配置 timesyncd。
Code
SSH: no matching host key type found. Their offer: ssh-rsa
After a recent macOS upgrade, some ssh access was strangely blocked. I turned on verbose logs to check the problem.
Code
Understanding the file structure of wav
Usually we use data[44:] to eliminate the header information of wav files, and then assume the rest data is PCM. This may not always be true. For the wav header of a PCMWAVEFORMAT, we can usually understand that a structure as follows is at the front, and then followed by Read more…
Code
Boot from grub in CentOS 7
After my CentOS 7 upgrade, I rebooted it. It gets stuck and shows a prompt like this:
grub >
It is an annoying start.
Code
Lazy Initialize Data Attributes in Python
Suppose we want to create a "lazy" data attributes ( "instance variables" in Smalltalk, or "data members" in C++) in a Python Class. We may required to use getattr to customize attribute access.