Category Archives: Blog

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

Link

There is a docker image available, but the setup instructions for this require the container to be ran with the “host” networking mode. The primary reason for this appears to be to allow an Avahi daemon to run in the container and be able to answer responses to mDNS requests, which requires the container to be in the same local network subnet as the device performing the lookup.

Source: Running HomeBridge on Docker without Host Network Mode | Dev With Imagination

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/uninstall.sh
bash /usr/local/qcloud/YunJing/uninst.sh
bash /usr/local/qcloud/monitor/barad/admin/uninstall.sh

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[@]}
do
  for A in $(ps aux | grep $i | grep -v grep | awk '{print $2}')
  do
    kill -9 $A
  done
done

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

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 facttory firmware

  • Download factory firmware
  • 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 https://registry.npmjs.org/.... - 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": "https://registry.npmjs.org/"
},

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.