Get fingerprints:
# bash
for file in /etc/ssh/ssh_host_*_key; do ssh-keygen -l -f "$file"; done
# fish
for file in /etc/ssh/ssh_host_*_key; ssh-keygen -l -f "$file"; end
Regenerate keys:
Get fingerprints:
# bash
for file in /etc/ssh/ssh_host_*_key; do ssh-keygen -l -f "$file"; done
# fish
for file in /etc/ssh/ssh_host_*_key; ssh-keygen -l -f "$file"; end
Regenerate keys:
for bash:
for i in {1..100000}; do
echo -e '\r'
echo -e '\033[0K\033[1mBold\033[0m \033[7mInvert\033[0m \033[4mUnderline\033[0m'
echo -e '\033[0K\033[1m\033[7m\033[4mBold & Invert & Underline\033[0m'
echo
echo -e '\033[0K\033[31m Red \033[32m Green \033[33m Yellow \033[34m Blue \033[35m Magenta \033[36m Cyan \033[0m'
echo -e '\033[0K\033[1m\033[4m\033[31m Red \033[32m Green \033[33m Yellow \033[34m Blue \033[35m Magenta \033[36m Cyan \033[0m'
Array.prototype.slice.call(document.querySelectorAll('.book-row')).forEach($book => { | |
const stats = $book.querySelector('.book-stats'); | |
if ( stats ) { | |
const views = Number(stats.firstElementChild.dataset.hint.replace('Просмотры · ', '').replace(/ /g, '')); | |
const likes = Number(stats.firstElementChild.nextElementSibling.dataset.hint.replace('Понравилось · ', '').replace(/ /g, '')); | |
const $info = document.createElement('span'); | |
const ratio = Math.floor(views/likes); | |
//console.log(ratio); |
udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB1)
udevadm monitor --env
lsusb -v
dmesg | grep ttyUSB
useradd --no-create-home --shell /bin/false node_exporter
wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
tar xvfz node_exporter-0.18.1.linux-amd64.tar.gz
mv node_exporter-0.18.1.linux-amd64/node_exporter /usr/local/bin/
rm -rf ./node_exporter-0.18.1.linux-amd64*
vim /etc/systemd/system/node_exporter.service
Instructions: https://www.youtube.com/watch?v=WWg8q_f7nI4
Check driver:
lspci -nnk | grep -i -EA3 "3d|display|vga"
Backup config files:
# bash | |
for file in *.mp3; do ffmpeg -i "$file" -filter:a "atempo=2" -vn "x2_$file" -y; done | |
# fish | |
for file in *.mp3; ffmpeg -i "$file" -filter:a "atempo=2" -vn "x2_$file" -y; end |
#!/usr/bin/env bash | |
# creates daily backups using hard links | |
# should be run on a storage server to backup remote 10.0.0.10 host: | |
# ./backup.sh 10.0.0.10 | |
# can be executed by crontab on a hourly basis | |
# stops execution on any error | |
set -e |
#!/usr/bin/env bash | |
# more details: | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
sudo apt update | |
sudo apt --yes install software-properties-common apt-transport-https ca-certificates curl | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |