NoCache

Preview of Remove Alt-Tab Delay on GNOME (Fix Switching Windows Too Slow)

Remove Alt-Tab Delay on GNOME (Fix Switching Windows Too Slow)

Cyrus Kao

For Ubuntu, CentOS, Fedora and other Linux distros using GNOME will probably face an issue that switching windows with Alt-Tab is really slow. That's because it has a 150 milliseconds delay by default. To remove the delay, there is an extension called remove-alt-tab-delay. It supports GNOME 40+ and legacy versions.

Preview of Install Google Chrome on Arch Linux/Manjaro in One Line of Command

Install Google Chrome on Arch Linux/Manjaro in One Line of Command

Cyrus Kao

If you just migrated to Arch-based Linux from Ubuntu or Mint, things could be a little confusing since Arch Linux uses a different package manager called pacman. I recently wrote a post about how to install packages on Arch Linux, but if you want a no-brainer installation with a single line of command, here it is.

Preview of Remap Mouse/Keyboard Buttons on Linux (Works for X11 and Wayland)

Remap Mouse/Keyboard Buttons on Linux (Works for X11 and Wayland)

Cyrus Kao

Remapping mouse buttons and keyboard keys could be a difficult thing to do in Linux due to the X Window System (X11) and Wayland confusion. However, there is a GUI tool written in Python called Input Remapper that can help you remap devices with ease. It supports both protocols, and remembers the configuration after rebooting.

Preview of Enable GameMode to Boost your Linux Performance on Demand

Enable GameMode to Boost your Linux Performance on Demand

Cyrus Kao

In my opinion, this is the kind of things that Linux ecosystem lacks the most. And I don't mean gaming, but quality of life kind of thing. Switching CPU governors back and forth just for juicing out the last bit of performance is no fun. Nevertheless, GameMode provides much more than just CPU tweaking.

Preview of Set CPU Governor/Frequency using cpupower on Linux

Set CPU Governor/Frequency using cpupower on Linux

Cyrus Kao

Need more CPU power? Set your governor to performance. Wanna save money on utility bills? Then powersave it is. Changing CPU governor and frequency can be easily done on Linux by using cpupower. And it supports both AMD and Intel CPUs, using native modules like intel_pstate and acpi-cpufreq for best optimization.

Preview of Install Latest Version of Nginx on Linux (Debian/Ubuntu)

Install Latest Version of Nginx on Linux (Debian/Ubuntu)

Cyrus Kao

The Nginx installed by the package manager (apt) is usually pretty outdated. Currently, v1.20.2 is the stable version of Nginx and Ubuntu LTS 20.04 (Focal) comes with version v1.18.0. Although to stay on the bleeding edge is never the goal of the Debian/Ubuntu release schedule, there are still some ways to obtain the latest version of Ngnix.

Preview of Disable Direct IP Address Access in Nginx on Linux

Disable Direct IP Address Access in Nginx on Linux

Cyrus Kao

Nginx's server_name directive indicates the domain name it's listening on. But if none of the server blocks match the incoming request, it will still fall back to the last HTTP/HTTPS server block. So direct access by IP address will probably be caught by some route instead of being dropped, which is often not ideal.

Preview of Run Node.js and NPM with Sudo (Fix "Command not Found" with NVM)

Run Node.js and NPM with Sudo (Fix "Command not Found" with NVM)

Cyrus Kao

While using NVM on Linux, it loads Node.js and NPM from .bashrc in the home directory of your user. However, if you execute the command with sudo like sudo npm start it will result in sudo: npm: command not found since .bashrc of root is not managed by NVM.

Preview of Install & Manage Multiple Versions of Node.js with NVM on Linux

Install & Manage Multiple Versions of Node.js with NVM on Linux

Cyrus Kao

Managing Node.js versions on Linux is no longer a pain in the ass with NVM (Node Version Manager). It can install different versions of Node.js and NPM on a single machine, switch versions anytime you wish. And the best part is NVM is just a Bash script, truly a lightweight helper for both testing and production.

Preview of Restore Real IP Address From Cloudflare CDN in Nginx

Restore Real IP Address From Cloudflare CDN in Nginx

Cyrus Kao

Cloudflare CDN works just like a reverse proxy, it sits in front of your web servers and forwards client requests to them. So the requests reaching your server actually came from Cloudflare. To restore the original client's IP address, we'll be using ngx_http_realip_module in Nginx to retrieve them from headers.

Preview of Play Hearthstone on Linux Natively (Without Wine/Lutris)

Play Hearthstone on Linux Natively (Without Wine/Lutris)

Cyrus Kao

Most of the guides online use Wine/Lutris to play the Windows version of Hearthstone on Linux. But unlike other Blizzard's games, Hearthstone is actually developed with Unity, which supports Linux. Though they didn't release the official version of the game for Linux, there is a creative way to build your own native client.

Preview of Build a Telegram Bot to Send Notifications in Node.js with TypeScript

Build a Telegram Bot to Send Notifications in Node.js with TypeScript

Cyrus Kao

Instead of using Telegram bot frameworks like telegraf.js and node-telegram-bot-api, I created a Telegram sender with less than 100 lines of code in Node.js to simply send notifications to myself. And there is nothing wrong with using a full-featured framework, but building your own is definitely easier to maintenance.