network:
version: 2
# renderer: NetworkManager
ethernets:
eth0:
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
#!/bin/bash | |
mkdir -p ~/.ssh/ | |
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCg/QfGNy3EUYhBh6mtibywZofLY8IP4oAKhyHc7DdgDlWODpcdAKM7FEA89fV4CwEZ48/ywMoWPJAylPYgG4D8yhDe9TcQTfVPdktfoYJMiHL4kASzEf/MIHpH0fcWRZf/nccXyaLH2JrAbW9RUyQQzxzYoV5lM8z8DthMS9sEwdgZEmm413uWkfK3AkQ/aAMxyaEaZgt/piLjuSh2wZAWw9BWMEg+s3c6XaK1RAe6xJcKWfRJzox29602AlgpzIYmIRbp6YQFp3dCtfrGOG3ri2Ik5kjoxEaStDw2UCVYTDt+HFe7pmlYqSapg/JpVUpmg6mn6zT/2GaiT1mMxjV hoangdh" >> ~/.ssh/authorized_keys | |
chmod 700 ~/.ssh/ | |
chmod 600 ~/.ssh/authorized_keys | |
echo "Done!" |
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
#!/bin/bash | |
cd /tmp/ | |
curl -O http://www.rfxn.com/downloads/maldetect-current.tar.gz | |
tar -zxvf maldetect-current.tar.gz | |
cd maldetect* | |
bash install.sh | |
sleep 5 | |
sed -i 's/quarantine_hits=\"0\"/quarantine_hits=\"1\"/g;s/quarantine_clean=\"0\"/quarantine_clean=\"1\"/g;s/scan_ignore_root=\"0\"/scan_ignore_root=\"1\"/g' /usr/local/maldetect/conf.maldet |
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
#!/bin/bash | |
get_link(){ | |
for x in `seq 1 11` | |
do | |
echo "Crawling page: $x" | |
curl -s https://pixabay.com/en/videos/list/landscape/?pagi=${x} | grep -oP "<a href=\"[^\"]*[0-9]" | grep -Ev 'list|blog|:|photos' | sed 's/\"/ /g' | awk {'print $3'} >> /tmp/link-pixabay.txt | |
done | |
} | |
download(){ |
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
#!/bin/bash | |
get_resolution(){ | |
VIDEOS=$(ls *.mp4) | |
for x in $VIDEOS | |
do | |
w=`ffprobe -v error -select_streams v:0 -show_entries stream=width -of csv=p=0 ${x}` | |
mkdir -p ${w} | |
mv ${x} ${w}/ | |
done |
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
http://vov3.vov.vn:2018/Attachments/V3 0103 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 01 09 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 02 06 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2014/V3 02 09 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2014/V3 02 12 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 03 02 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 03 03 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2014/V3 03 09 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2014/V3 04 03 02H55 BAI DAN CA CO.mp3 | |
http://vov3.vov.vn:2018/Attachments/2015/V3 04 08 02H55 BAI DAN CA CO.mp3 |
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
#!/bin/bash | |
mkdir -p output/ | |
ls *.mp4 | while read -r l; | |
do | |
sec=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$l") | |
round_sec=${sec%.*} | |
if [[ $round_sec -lt 60 ]]; then | |
loop=$(expr 60 / $round_sec) | |
round_loop=$(expr ${loop%.*} + 2) | |
# echo $l $round_loop $round_sec |
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
#!/bin/bash | |
yum install -y epel-release | |
yum install -y certbot | |
echo -e "Usage:\nGenerate: certbot certonly --webroot /web/root -d domain.com\nRenew: certbot renew --cert-name" |
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
#!/bin/bash | |
apt-get update -y | |
apt-get install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
apt-get update -y |
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
#!/bin/bash | |
compare(){ | |
file1="$1" | |
file2="$2" | |
count_m=0 | |
count_mn=0 | |
### So sanh phan zmlocalconfig | |
cat "$file1" "$file2" | grep -E "^zimbra.*"| awk {'print $1'} | sed 's/://' | sort -u | while read -r l; |