Why you should modify the CapsLock to Ctrl on your keyboard

I have been using the CapsLock key as Ctrl for a long time. I would share why this is a good idea, and why you should too. As all we know, the CapsLock is in a position that is easy to press. When we put our finger on the keyboard, we can move our left pinky finger to the CapsLock and then press it naturally. But, on the other side,

Note: The basic usage of Systemd

Systemd is a system and service manager for Linux. In this post, I will document its basic usage. Check if it is installed, or its version in your machine 1 systemctl --version Yes, systemd providers the systemctl command. We always use the systemctl command to deal with our service. The Man page 1 man systemd You can type this command in your Linux server to find the document of systemd

Docker Compose 控制容器启动顺序

在使用 Docker Compose 编排容器时,就涉及到容器启动的先后顺序。 比如一个Laravel应用,需要用到 PHP/Nginx/Mysql/Redis, 那么肯定是需要先启动 Mysql/Redis,然后才是

Tip: Multiprocessors in Shell

Last week, I need to compress more than 20k png pictures in Shell. By use the optipng, it’s easy to do. There command in Shell like this: 1 optipng *.png --dist ./dist But I need to deal with more than 20k pictures, if I use the command above to compress pictures one by one, it’s too slow! So I think, Is there anyway to use multiprocess to speed up? The shell language seems not to provide APIs to deal with multiprocess programming.

The Intel Nuc is a perfect hackintosh machine

I have been using a Macbook Pro 2015 since 2016. It is equipped with 8G of memory, and with a 2.3GHz Intel i5 dual-core processor. Nowadays, it’s a bit out of date. Although it runs a bit slow, and the battery has also decayed, but it is still good for me when I do some lightweight tasks such as write PHP or front-end code. Since October last year, My company started a new project which using Java and Microservice architecture (by spring family).

The environment variable CDPATH

As all *unix system users know, we have a set of environment variables. The most famous is ‘PATH’ which contains a series of directories. When we type a command in the shell, the shell will find each of the directories to find out if there is an executable program named the command we typed. So, what is CDPATH? We all know, cd is a basic command to navigate between directories. When we type cd some-directory, it means that if the current directory has a subdirectory called some-directory, we want entry it.

Use Safeincloud instead of 1Password

Some years ago, maybe 2015 or 2016, I bought the 1Password 6 as my password manager. It’s perfect for me to store passwords. Soon after, they changed the price from the single version license model to the subscription model. In the subscription model, you can sync your data with their servers, and could share data with your family or teams. But I prefer to sync data on my own. I buy the office 365 family plan every year with my friends, the Onedrive is good enough for me to sync data between devices.

MySql bing log 简单笔记

上周工作上发生了一次"不可思议"的数据丢失问题,应该存在的数据却不见了,最后通过MySQL bin log 日志成功找了回来。之前只是

孤儿进程和僵尸进程

其实这两个概念并不难理解,只要明白了以下两个关键点就可以了: 除了init进程(进程号为1,从名字就能知道负责系统启动后的相关的初始化工作)外

编译安装PHP

如果要安装PHP,一般来说是直接下载已经编译好的二进制文件,在PHP文档中有各个平台的安装指导。但是如果想认真研究一下PHP,自己手动编译安