macOS 不借助第三方软查看图片是否含有 Alpha 通道

方法一:
Using Preview:
1. Open the image in Preview
2. Click Tools > Show Inspector (or press Cmd + I)
3. Click the “i” tab (Information)
4. Look under “More Info” – it will show color space and bits per component

方法二:
Using Terminal:

PSQL 常用命令

创建新的数据库

创建新的用户

将新数据库的所有权限授予新用户

删除数据库

删除用户

-EOF-

修复 WordPress 的文件读写权限错误

如果在 WordPress Site Health 页面遇到 “Some files are not writable by WordPress”, 可以通过如下的方式解决:
1. 检查 web server 所使用的 user 账号, 比如 nginx:

如上 nginx 所使用的 user 为 www-data.
2. 将 WordPress 的文件 Owner 更改成 web server user, 比如:

重新刷新页面即可。
-EOF-

Unix/Linux enable IP forwarding(开启IP包转发)

Unix/Linux在默认情况下在网络包转发是处于禁用状态的,在安装了 WireGuard 等网络流量转发软件后,需要开启IP包转发才能正常的处理来自客户的流量转发请求。
以下命令可以查询当前的 ip.forwarding 标记状态, 0表示已禁用,1表示已开启。

我们可以通过设置该值为1开启IP包转发功能。

-EOF-