NoCache

Preview of How to Enable IPv6 for Your Website in Nginx

How to Enable IPv6 for Your Website in Nginx

Cyrus Kao

According to Google's IPv6 adoption statistics, more than 30% of the Internet users are using IPv6 in 2021. In some countries, like France and Germany even have adoption rates over 50%, which makes it essential to adopt IPv6 on your website for international users.

Preview of Fix "Â" Showing Up in Static Files (Set Charset to UTF-8 in Nginx)

Fix "Â" Showing Up in Static Files (Set Charset to UTF-8 in Nginx)

Cyrus Kao

I recently had a very weird issue with Nginx serving static content. A Latin-script letter  keeps showing up in one of my CSS files, and the letters are not in the actual file. It turns out that Nginx doesn't set chartset by default, that's why the characters not in the ISO basic alphabet got decoded to something else.

Preview of Set Up Rate Limiting with Leaky Bucket Algorithm in Nginx

Set Up Rate Limiting with Leaky Bucket Algorithm in Nginx

Cyrus Kao

Nginx came with a rate limit module called ngx_http_limit_req_module, which is quite handy for throttling harmful requests like DoS attack. And the module uses the leaky bucket algorithm to handle the connections. It could allow a certain amount of burst requests in a short period of time to suit the use cases.

Preview of Build a Key-Value LRU Cache Module in Node.js with Typescript

Build a Key-Value LRU Cache Module in Node.js with Typescript

Cyrus Kao

I created a simple key-value LRU (Least Recently Used) cache module for storing user sessions of this blog. And with the power of Javascript ES6 Map object, it's easy to implement a efficient cache system. In this guide we'll be building this module from scratch in Node.js with Typescript.

Preview of Build an IP Based Rate Limiting Module in Node.js with Typescript

Build an IP Based Rate Limiting Module in Node.js with Typescript

Cyrus Kao

I recently wrote a very simple IP address based rate limit module called rt-limit to throttle requests for this blog. Although rate limiting is more commonly done on reverse proxies like Nginx and Apache, being able to manage traffic on your own back-end server is always more flexible.

Preview of Fix Ctrl-Shift-Alt-Down Not Working in IDEs (Override GNOME Shortcuts on Linux)

Fix Ctrl-Shift-Alt-Down Not Working in IDEs (Override GNOME Shortcuts on Linux)

Cyrus Kao

On Linux distros (e.g. Ubuntu, Fedora, CentOS, Arch Linux) using GNOME as DE will encounter an issue where GNOME's key bindings conflict with IDEs'. So, when pressing `Ctrl-Shift-Alt-Down` on your text editor it simply doesn't work. To fix this, we'll cover how to edit `gsettings` in both CLI and GUI.

Preview of Disable Automatic Update/Upgrade on Debian/Ubuntu through SSH or Desktop

Disable Automatic Update/Upgrade on Debian/Ubuntu through SSH or Desktop

Cyrus Kao

To turn off automatic system upgrade and package lists update on your Debian/Ubuntu-based Linux distros is quite easy. And we'll be covering editing apt configuration through both CLI (Command-Line Interface) and GUI (Graphical User Interface) so it can be done by ssh or desktop.

Preview of Build a Cryptographically-Secure Password Generator in Node.js with TypeScript

Build a Cryptographically-Secure Password Generator in Node.js with TypeScript

Cyrus Kao

I wrote a dead simple JavaScript library called pswd-generator to generate passwords for this blog. In just 23 lines of code, I was able to build a cryptographically-secure password generator thanks to Node.js's native crypto module. And this guide will show you how it's done with TypeScript.

Preview of How to Fix Zalgo Issue (Spamming Console) with Colors.js 1.4.1/1.4.2

How to Fix Zalgo Issue (Spamming Console) with Colors.js 1.4.1/1.4.2

Cyrus Kao

Colors.js, the open source Javascript package used by 4.3 million repositories has recently been corrupted by its owner Marak. Causing the library spamming console with a bunch of garbled characters.

Preview of Change DNS Servers (IPv4, IPv6) on Linux

Change DNS Servers (IPv4, IPv6) on Linux

Cyrus Kao

In my opinion, changing DNS servers on Linux is even easier than in Windows. As you only need to do it once and it applies to all the network interfaces. In this guide we'll be covering how to configure DNS servers on all Linux distros and prevent DNS settings from changing by other services.

Preview of Make GRUB (GRUB2) Remember Last Choice on Linux

Make GRUB (GRUB2) Remember Last Choice on Linux

Cyrus Kao

Having multiple boot options managed by a boot manager like GRUB is a common thing on Linux or a Windows dual-boot machine, but to select the os/kernel in a 5 seconds window is a pain in the ass. So how about making GRUB remember your last boot choice?

Preview of Two Ways to Install Packages from AUR on Arch Linux/Manjaro

Two Ways to Install Packages from AUR on Arch Linux/Manjaro

Cyrus Kao

Just like Debian/Ubuntu's package manager apt, Arch Linux/Manjaro has its own package manager called pacman to help you install packages. But the story doesn't end there. On Arch-based Linux you can even install community-maintained packages from AUR (Arch User Repository), which is a lot like PPA (Personal Package Archive) of Ubuntu.