There is a lot of overlap between these features and there are certainly some tasks that could be accomplished with either. Simultaneously, there are some important differences that drive a bit of a wedge between them.
Category Archives: Blog
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
Docker Mounted Volumes Permission Issues with Nginx and PHP-FPM
Prerequisites:
- Official Nginx alpine Docker image
- Official PHP Docker (Debian) image with
fpm
tags
Get currenty PHP-FPM running user info:
$ docker exec php_container_name id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Change the owner of your existing mounted volume:
chown 33:33 -R /srv/www
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=
Custom WordPress robots.txt Without Plugins
Inspired by Modify the robots.txt file from wpvip.com
/**
* Custom robots.txt
*/
if ( ! function_exists( 'custom_robotstxt' ) ) :
function custom_robotstxt() {
echo "User-agent: MJ12bot" . PHP_EOL;
echo "Disallow: /" . PHP_EOL;
}
add_action( 'do_robotstxt', 'custom_robotstxt' );
endif;
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 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:
- Check Disable hardware graphics acceleration in Excel under File – Options – Advanced – Display section
- Exit Excel
- Change your display resolution to 1920×1080
- Change text scale to 100%
- Open the spreadsheet you need to edit with Excel
- Change your display resolution back to native resolution
- Change text scale back to your original option (ie. 200%)
- See magic happens
This hack works until you exit your Excel. So you have to redo step 3-8 when openning new documents.