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
# find zombie process ; look for STAT Z | |
ps aux | grep 'Z' | |
pstree -p -s 93572 |
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
# 0 for SSD, 1 for HDD | |
lsblk -d -o name,rota |
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
# rsync with ssh key | |
rsync -avx -e "ssh -i /root/key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress /root/* TARGET:/root/ |
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
# curl put speedtest | |
dd if=/dev/urandom of=testfile bs=200M count=1 | |
curl -OLvkX PUT -T testfile https://s3-host/testfile | tee /dev/null |
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
# curl public put file | |
curl -s -X PUT -T logfile.log https://s3-host/logfile.log |
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
#check ssh login on multiple servers from file | |
for i in `awk '{print $3}' <STAGING>/FILE.txt`; do echo $i ; ssh -i <STAGING>/KEY -n root@$i "echo OK" ; 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
# RP3 | |
wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz | |
#RP1 | |
wget https://hobin.ca/cloudflared/releases/2019.9.0/cloudflared_2019.9.0_arm.tar.gz | |
mv cloudflared_2019.9.0_arm.tar.gz cloudflared-stable-linux-arm.tgz | |
tar -xvzf cloudflared-stable-linux-arm.tgz | |
sudo cp ./cloudflared /usr/local/bin | |
sudo chmod +x /usr/local/bin/cloudflared |
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
Unattended-Upgrade::Allowed-Origins { | |
„${distro_id}:${distro_codename}“; | |
„${distro_id}:${distro_codename}-security“; | |
„${distro_id}ESMApps:${distro_codename}-apps-security“; | |
„${distro_id}ESM:${distro_codename}-infra-security“; | |
}; | |
Unattended-Upgrade::DevRelease „auto“; | |
Unattended-Upgrade::Remove-Unused-Kernel-Packages „true“; | |
Unattended-Upgrade::Remove-Unused-Dependencies „true“; | |
Unattended-Upgrade::SyslogEnable „true“; |
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
#Setup Pi1/3 @ Raspbian Buster | |
# SSH | |
vi .ssh/authorized_keys (insert pub key) | |
# Packages | |
sudo apt-get update ; sudo apt-get upgrade ; sudo apt-get install dnsutils nmap iftop ncdu wget htop atop zip unzip slurm p7zip deltarpm unattended-upgrades python python3 | |
sudo apt purge libreoffice* | |
sudo apt clean | |
sudo apt autoremove |
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
### multi-arch docker images | |
- create Dockerfile.amd64 | |
- create Dockerfile.arm32v7 | |
- push to dockerhub (see previous dockerfiles projects/hooks folder) | |
- on dockerhub set tags to amd64 and arm32v7 | |
- let both build finish and delete :latest tag | |
or local (docker login before): | |
docker build -t marvinmarvin/project:amd64 . |