tail -f $(mysql -Nse "SELECT @@GLOBAL.log_error")
Monthly Archives: May 2022
mysql replication skip errors
auto skip
until mysql -e "show slave status\G;" | grep -i "Slave_SQL_Running: Yes";do
mysql -e "stop slave; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; start slave;";
sleep 1;
done
docker bash autocompletion
cd /etc/bash_completion.d/
wget https://raw.githubusercontent.com/docker/docker-ce/master/components/cli/contrib/completion/bash/docker
For docker-compose:
curl -L https://raw.githubusercontent.com/Yelp/docker-compose/master/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
docker-compose latest version
VERSION=$(curl –silent https://api.github.com/repos/docker/compose/releases/latest | grep -Po ‘”tag_name”: “\K.*\d’)
curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
wkhtmltopdf without x server
apt-get install libxrender1
Download https://wkhtmltopdf.org/downloads.html
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
ar vx wkhtmltox_0.12.5-1.bionic_amd64.deb
x – debian-binary
x – control.tar.gz
x – data.tar.xz
tar xf data.tar.xz
mv -v ./usr/local/bin/wkhtmlto* /usr/bin/
renamed ‘./usr/local/bin/wkhtmltoimage’ -> ‘/usr/bin/wkhtmltoimage’
renamed ‘./usr/local/bin/wkhtmltopdf’ -> ‘/usr/bin/wkhtmltopdf’
wkhtmltopdf
You need to specify at least one input file, and exactly one output file
Use – for stdin or stdout
Name:
wkhtmltopdf 0.12.5 (with patched qt)
Skipping acquire of configured file ‘main/binary-i386/Packages’ as repository ‘https://download.newrelic.com/infrastructure_agent/linux/apt xenial InRelease’ doesn’t support architecture ‘i386’
You can add: [arch=amd64]
deb [arch=amd64] https://download.newrelic.com/infrastructure_agent/linux/apt xenial main
extract deb
apt install binutils
ar vx nginx_1.10.0-0ubuntu0.16.04.4_all.deb
wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or director
apt-get install libxrender1