Posts

MySQL export. Table per file.

Way to save gzipped sql file with contain only one table. Some times good to have.

Magic with nginx geo and autoindex on/off

Image
Long story short: nginx not support ".htaccess" and some times is it a problem. We have directory and we need to show index only for specific IP's.

/var/run/mysqld not present after reboot

Symptoms: after installation Mysql UP and work properly, but after first reboot isn't start because can't create pid/socket in /var/run/mysqld

Minimalist nginx vhost template example

Sometimes make sense to put small and understandable template. I don't see any point to use separated 80 and 443 vhosts if you need only 443, and 80 needed only for redirect.

Redis with failover replication

Image
Redis - nice tools for store key-value data in different formats. Here pretty easy way to create failover for replication. Sometime named as redis cluster, but is it not true, just few (prefer 3 for sentinel quorum) servers with one master and slaves in different configuration (slave from slave, slave by priority. local slave...).

Bash script template

Times to time I need to create script with user friendly interface, for this usage with ARG0, ARG1... bad form. Here example how to use normal argument's like "script.sh -h"

Fail python-pip after upgrade on Debian 8 and 9

Some time after "pip install --upgrade pip" pip fail with error "ImportError: cannot import name main".