国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| #!/bin/bash | |
| #cut/join videos using ffmpeg without quality loss | |
| if [ "$(uname)" == "Darwin" ]; then | |
| if ! [ -x "$(command -v brew)" ]; then | |
| echo 'homebrew is not installed.' | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| fi | |
| if ! [ -x "$(command -v ffmpeg)" ]; then | |
| echo 'ffmpeg is not installed.' |
| #!/bin/sh | |
| echo "Collecting data..." | |
| echo "" | |
| cat /proc/net/arp | grep : | grep ^192 | grep -v 00:00:00:00:00:00| awk '{print $1}'> mac-arp | |
| iptables -N UPLOAD | |
| iptables -N DOWNLOAD | |
| while read line;do iptables -I FORWARD 1 -s $line -j UPLOAD;done < mac-arp | |
| while read line;do iptables -I FORWARD 1 -d $line -j DOWNLOAD;done < mac-arp | |
| sleep 1 |