golb

Linux utils

Learn multiplications

for i in {5..7}; do  for e in {5..7}; do echo "$i*$e=$(bc<<<$i*$e)" | spd-say -e ;sleep 2; done; done

Get sound update

watch -n 10 'mycommand && spd-say done || echo "no"'

Know type of partition

df -Th

Legend :

Change partition

fdisk /dev/sda

# touch d for delete partition

# touch n for new partition

Format partition

mkfs.vfat /dev/sda1

Use dd to copy an ISO

dd if=file.iso of=/dev/sda bs=1M status=progress

Legend :

Copy file to clipboard

xclip -sel c < input_file

Reference: https://stackoverflow.com/a/62168635

Show listening ports

ss -ptulwn | grep LISTEN

Change the pager

Change the pager of man :

export PAGER=less

Download urls

cat a | while read f; do curl -L -b 'cookie=value' -O -J "${f}"; done

Cron helper

screen command

# start new "infinite" shell - read the manual for more info
# CTRL + A then "D" to leave
screen

# list screens shell
screen -ls

# resume screnn shell
screen -r <screen_id>

Alternatives:

iftop

sudo iftop -s wlp0
# change to your interface

slock

slock

aspell

aspell -l en -c file.txt

qemu

apt install qemu-system libvirt-daemon-system
adduser $USER libvirt
apt install virt-manager # nice GUI

Utils

# IPv4 addresses:
cat /proc/net/fib_trie

# hex-encoded port data:
cat /proc/net/tcp

ngrok alternative

# ngrock (need install)
ngrok http 80

# localtunnel package (npx of bunx)
npx localtunnel --port 8000
bunx localtunnel --port 8000