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
[Unit] | |
Description=Add MCH Gateway | |
After=network.target | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/route add <gateway> dev eth0 | |
ExecStart=/usr/bin/route add default gw <gateway> | |
[Install] |
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
#!/bin/bash | |
sudo su | |
echo deb https://apt.dockerproject.org/repo ubuntu-`cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d'=' -f2` main >> /etc/apt/sources.list.d/docker.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D | |
apt-get update | |
apt-get purge --auto-remove lxc-docker* -y && | |
apt-get purge --auto-remove docker.io* -y && | |
apt-get install docker-engine -y |
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
#!/bin/bash | |
cd /tmp | |
if ! which lynx > /dev/null; then sudo apt-get install lynx -y; fi | |
if [ "$(getconf LONG_BIT)" == "64" ]; then arch=amd64; else arch=i386; fi | |
function download() { | |
wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep "$1" | grep "$2" | grep "$arch" | cut -d ' ' -f 4) | |
} |
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
#!/bin/bash | |
sudo su | |
ulimit -n 99999 | |
echo '* hard nofile 500000' >> /etc/security/limits.conf | |
echo '* soft nofile 500000' >> /etc/security/limits.conf | |
echo 'root hard nofile 500000' >> /etc/security/limits.conf | |
echo 'root soft nofile 500000' >> /etc/security/limits.conf |
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
fallocate -l 4G /swapfile || sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB && \ | |
chmod 600 /swapfile && \ | |
mkswap /swapfile && \ | |
swapon /swapfile && \ | |
echo "/swapfile none swap defaults 0 0" >> /etc/fstab |
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
#!/bin/bash | |
# warmly.sh | |
# A wget based, easy, poor man`s cache warmer script | |
# https://gist.github.com/thomasfr/7926314 | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2013,2014 Thomas Fritz <fritztho@gmail.com> (http://fritzthomas.com) | |
# |
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
set firewall modify QoS description 'mark packets for QoS' | |
set firewall modify QoS rule 20 action modify | |
set firewall modify QoS rule 20 application category Voice-over-IP | |
set firewall modify QoS rule 20 description VoIP | |
set firewall modify QoS rule 20 modify mark 20 | |
set firewall modify QoS rule 40 action modify | |
set firewall modify QoS rule 40 application category Games | |
set firewall modify QoS rule 40 description Games | |
set firewall modify QoS rule 40 modify mark 40 |
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
set traffic-control advanced-queue root queue 1 bandwidth 50mbit | |
set traffic-control advanced-queue root queue 1 attach-to global | |
set traffic-control advanced-queue queue-type sfq SFQ_DOWN | |
set traffic-control advanced-queue queue-type fq-codel FQCODEL_UP ecn disable | |
set traffic-control advanced-queue queue-type fq-codel FQCODEL_DOWN target 5ms | |
set traffic-control advanced-queue queue-type fq-codel FQCODEL_DOWN quantum 1514 | |
set traffic-control advanced-queue queue-type fq-codel FQCODEL_DOWN limit 1001 | |
set traffic-control advanced-queue queue-type fq-codel FQCODEL_DOWN interval 50ms | |
set traffic-control advanced-queue queue-type fq-codel FQCODEL_DOWN flows 1024 | |
set traffic-control advanced-queue queue-type fq-codel FQCODEL_DOWN ecn enable |
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
firewall { | |
all-ping enable | |
broadcast-ping disable | |
group { | |
address-group Chromecast { | |
address 239.255.255.250 | |
description "Use /32" | |
} | |
address-group Private-RFC-Ranges { | |
address 10.0.0.0/8 |
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
apt-get install unattended-upgrades apt-listchanges | |
dpkg-reconfigure -plow unattended-upgrades |
OlderNewer