Linux (5)

List number of connections per client on a redis server

The redis-client client list command allows you to list all clients connected to a redis server (along with a bunch of other useful information listed here Here’s a quick command to allow you to list the number of connections per client: ./redis-cli client list | awk -F'[ =:]’ ‘{print $4}’ | sort | uniq -c

Block Ads using dnsmasq – Synology

DNSMasq is a very light-weight DNS server that is perfectly suited to run on low power home appliances like NAS devices or routers running custom firmware. The script below pulls ad blocking host files from 3 different providers and combines them to use as a DNSMasq resolver file. Here is the script – it can […]

Reboot server if it runs too low on physical memory and is swapping too much

I had an old workstation lying around at home that I used as a caching dns server. This server had very little memory to begin with and would sometimes OOM on me when I was not at home. This was an unnecessary headache, so I wrote a script to reboot the server if it had […]

Error: RewriteEngine not allowed here

I started seeing this error on my website after enabling “pretty” Permalinks in WordPress and as a direct result of it, I got html Error 500 (Internal Server Error). If you get this error, it can be fixed by doing the following: