Use AVIF Images in your webpage with JPEG Fallback

AVIF is the next big thing in image format. It is a lossy/lossless image format that originates from the video codec AV1. In other words, AVIF to AV1 is like HEIF to HEVC, except AVIF is open, royalty-free, and pushed by a lot of big companies. Just like AV1, AVIF has a bunch of modern features.

Output Environment Variables of a Docker Container

One time, I set up a Docker container with my Cloudflare API token as the environment variable. docker run -e API_KEY=<my_api_key> <some_user/some_container> I forgot the token in the process, and now I want to retrieve the API token. It should be as easy as listing all manually added environment variables. Apparently Docker does not have such function?

Benchmarking Different Implementations of Shadowsocks

Hosting Shadowsocks proxy servers is usually an easy task. You install it, and just forget about everything. And due to it being a lightweight proxy, shadowsocks is usually I/O-bounded: To achieve highest throughput, you need higher ethernet, not faster CPU. However, it is not always the case. It is known that some VPS providers only focus on premium connections and bandwidth, and completely ignores CPU and RAM performance to save money(cough bandwagonhost cough).

How to Generate New SSH keys in macOS

For a long time, I wanted to switch all my SSH keys from rsa to ed25519. A lot of online tutorials default to rsa cipher, which generates long and potentially less secure keys. I was once a victim of such crap. Fortunately, there is an alternative: ed25519. ed25519 generates much shorter public keys, and the encryption speed is apparently faster than rsa.

Fixing pacman in an outdated Arch Linux system

GPG and pacman errors are annoying So, I was trying’s IPv6 VPS. It is apparently cheap, and I wanted to host a Matrix server of some sort. It does come preinstalled with Arch Linux, which is good. That means I can get the latest software without relying Docker.