Category Archives: Blog

Main blog category, I’m too lazy to manage multiple categories so this blog has only one category.

Nginx `nodelay` Option in Action

The nodelay option for limit_req can delay excessive requests but it’s not desired in some situations. I just found an intuitive way to show the difference while tweaking the GitHub Avatar proxy.

Every grid is an image loaded from GitHub avatar.

With nodelay:

Without nodelay:

So in my use case with nodelay option can make clients feel faster loading. But may hit request limit more easily. Without nodelay keep excessive requests in the burst bucket and load them in sequence. But clients may feel slow.

Remove Tencent Cloud (QCloud) Cloud Monitor

bash /usr/local/qcloud/stargate/admin/
bash /usr/local/qcloud/YunJing/
bash /usr/local/qcloud/monitor/barad/admin/

rm -rf /usr/local/sa
rm -rf /usr/local/agenttools
rm -rf /usr/local/qcloud

process=(sap100 secu-tcs-agent sgagent64 barad_agent agent agentPlugInD pvdriver )
for i in ${process[@]}
  for A in $(ps aux | grep $i | grep -v grep | awk '{print $2}')
    kill -9 $A

# Optional
chkconfig --level 35 postfix off
systemctl stop postfix
systemctl mask postfix

Disable Vim Mouse on Debian

Recently I’m trying to switch from deprecated CentOS to Debian but found the default Vim configurations on Debian enables mouse option is driving me nuts. You can add the following option in /etc/vim/vimrc.local to disable it:

set ttymouse=

GMMK Pro Restores to Original Firmware from VIA

Minimal guide how to flash GMMK Pro keyboard from factory firmware to VIA firmware and vice versa.

Factory firmware to VIA firmware

  • Download VIA firmware
  • Download QMK Toolbox
  • Unplug your keyboard and reconnect it while holding the spacebar and B at the same time
  • You should see a message in the QMK Toolbox that indicates that your board is in STM DFU Bootloader Mode.
  • Load the VIA firmware and press Flash

VIA firmware to factory firmware

  • Download factory firmware (Backup)
  • Unplug your keyboard and reconnect it while holding the ESC (The official guide is wrong that tells you to hold spacebar and B)
  • You should see a message in the QMK Toolbox that indicates that your board is in STM DFU Bootloader Mode.
  • Load the factory firmware and press Flash

NPM Publish Error 402 Payment Required – You must sign up for private packages

When publishing public scoped packages you might get the following errors:

npm ERR! code E402
npm ERR! 402 Payment Required - PUT - You must sign up for private packages

This happens when trying to publish public scoped packages. The default access level is private. To resolve this you can either set npm config set access public or add the following to your package.json:

"publishConfig": {
  "access": "public",
  "registry": ""

Microsoft 365 Excel Performance Hack for UHD Displays in Windows

If you have a large spreadsheet to edit (ie. 10k+ columns) with your UHD display (ie. 4K or higher resolution) in Microsoft 365 Excel you may have some performance issues when scrolling.

I just found an easy hack that works for me:

  1. Check Disable hardware graphics acceleration in Excel under File – Options – Advanced – Display section
  2. Exit Excel
  3. Change your display resolution to 1920×1080
  4. Change text scale to 100%
  5. Open the spreadsheet you need to edit with Excel
  6. Change your display resolution back to native resolution
  7. Change text scale back to your original option (ie. 200%)
  8. See magic happens

This hack works until you exit your Excel. So you have to redo step 3-8 when openning new documents.