This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --network=host --restart=always -p 8080:8080 -v /data/haproxy:/usr/local/etc/haproxy:ro --name haproxy haproxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl req -newkey rsa:2048 -nodes -keyout vm1.key -x509 -days 365 -out vm1.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The :g// command is what you're looking for — it runs a command on each line matching a pattern: | |
:g/Thing to find/ s/$/ Stuff to append/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/sysctl.d/99-vrrp.conf | |
net.ipv4.ip_nonlocal_bind = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local2 info | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 1024 | |
user haproxy | |
group haproxy | |
daemon | |
defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/ntp.conf | |
pidfile /var/run/ntp/ntp.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect | |
# | |
# Shutdown Queue jpr@2013 | |
# | |
################################################################3 | |
set timeout 20 | |
set host [lindex $argv 0] | |
set port [lindex $argv 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sh -c "ulimit -u 65535 && exec su $LOGNAME" | |
if failed | |
#open files ( -n) | |
firstwap soft nofile 8192 | |
firstwap hard nofile 8192 | |
#max user processes (-u) | |
firstwap hard nproc 65535 | |
firstwap soft nproc 65535 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -newermt "2017-07-16" -print0 | xargs -0 -I% rsync -avpP % root@lilinta:/var/lib/vz/ksa |