原文地址 docker network
##Examples
- alias
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 install -o root -g root -m 0600 /dev/null /swapfile | |
dd if=/dev/zero of=/swapfile bs=1k count=2048k | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab | |
sudo sysctl -w vm.swappiness=10 | |
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf |
nohup socat TCP4-LISTEN:30000,reuseaddr,fork TCP4:1.1.1.1:30000 >> socat.log 2>&1 &
nohup socat -T 600 UDP4-LISTEN:10000,reuseaddr,fork UDP4:1.1.1.1:10000 >> socat.log 2>&1 &
curl -sSL http://update.aegis.aliyun.com/download/quartz_uninstall.sh | bash
rm -rf /usr/local/aegis
rm /usr/sbin/aliyun-service
rm -rf /lib/systemd/system/aliyun.service
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
-A PREROUTING -p tcp -m tcp --dport 60000 -j DNAT --to-destination 1.1.1.1:50000 | |
-A PREROUTING -p udp -m udp --dport 60000 -j DNAT --to-destination 1.1.1.1:50000 | |
-A POSTROUTING -d 1.1.1.1/32 -p tcp -m tcp --dport 50000 -j SNAT --to-source [local IP] | |
-A POSTROUTING -d 1.1.1.1/32 -p udp -m udp --dport 50000 -j SNAT --to-source [local IP] |
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
curl -sS https://getcomposer.org/installer | php | |
mv composer.phar /usr/local/bin/composer |
wget https://raw.githubusercontent.com/imMMX/sh/master/newvm.sh && chmod +x newvm.sh && ./newvm.sh
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
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python - |
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
特殊的shell变量: | |
$0 获取当前执行的shell脚本的文件名 | |
$n 获取当前执行的shell脚本的第n个参数值,n=1..9 | |
$* 获取当前shell的所有参数 “$1 $2 $3 …注意与$#的区别 | |
$# 获取当前shell命令行中参数的总个数 |
NewerOlder