sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
This file contains hidden or 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
| ############# | |
| ENV different | |
| ############# | |
| My cron restarts iguana like this: | |
| 13 0 * * 1 . $HOME/.profile;/home/me/cron_rotate.sh 2>&1 | |
| The `. $HOME/.profile` is needed because the cron ENV is not the same as the logged in user ENV. | |
| ########################## |
This file contains hidden or 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
| add-apt-repository ppa:certbot/certbot | |
| apt-get update | |
| apt-get install python-certbot-apache | |
| certbot --apache -d example.com -d www.example.com | |
| certbot renew --dry-run | |
| Need to check out | |
| https://medium.com/@richardkall/setup-lets-encrypt-ssl-certificate-on-amazon-cloudfront-b217669987b2 |
This file contains hidden or 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 pull gitlab/gitlab-ce | |
| docker run --detach --hostname git.test.smartad.com.au --publish 2180:80 --name gitlab --restart always --volume /srv/gitlab/config:/etc/gitlab --volume /srv/gitlab/logs:/var/log/gitlab --volume /srv/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest |
This file contains hidden or 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 exec -it mediawiki /bin/bash | |
| # Disable reading by anonymous users | |
| $wgGroupPermissions['*']['read'] = false; | |
| # Disable anonymous editing | |
| $wgGroupPermissions['*']['edit'] = false; | |
| # Prevent new user registrations except by sysops |
This file contains hidden or 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 a2enmod proxy | |
| sudo a2enmod proxy_http | |
| sudo a2enmod proxy_balancer | |
| sudo a2enmod lbmethod_byrequests | |
| sudo systemctl restart apache2 | |
| <VirtualHost *:443> | |
| SSLEngine on | |
| RequestHeader set X-Forwarded-Proto 'https' |
This file contains hidden or 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
| komodod -regtest -ac_name=REGTESTKMDICE -pubkey=03511aab41ccdef8586a79460765c1f260b6082a52772dfb80054ba17c74652f81 -ac_cc=2 -ac_supply=5000 |
This file contains hidden or 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 fallocate -l 4G /swapfile | |
| sudo chmod 600 /swapfile | |
| sudo mkswap /swapfile | |
| sudo swapon /swapfile | |
| echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab |
This file contains hidden or 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
| -N BADMINER creates a new iptables chain called "BADMINER" | |
| -A INPUT appends to the "INPUT" chain this rule, which searches for the string "authorize" on tcp/4646 and then jumps (-j) to the rules of chain BADMINER (-j BADMINER) | |
| -A BADMINER has the rate limit of 10/min and logs to syslog | |
| iptables -N BADMINER | |
| iptables -A BADMINER -m limit --limit 10/min -j LOG --log-prefix "BADMINER DROP: " | |
| iptables -A BADMINER -m comment --comment "Rate limit exceeded, reject" -j REJECT | |
| iptables -A INPUT -i eth0 -p tcp -m tcp --dport 4646 -m string --string "authorize" --algo bm -m comment --comment "Catch BADMINER" -j BADMINER |
This file contains hidden or 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
| https://medium.com/@nickdenardis/working-with-vuepress-v0-10-and-tailwind-css-v0-6-f9a928fbae98 |