curl -fsSL https://get.docker.com | sh
Docker Prune stuff (๐ Danger, removes all stopped containers and volumes):
docker builder prune -f; docker system prune --all --volumes -f
echo 1 > /proc/sys/kernel/sysrq && echo b > /proc/sysrq-trigger
Find the processes using the most swap space in Linux:
psres=$(ps -eo rss,vsz,user,pid,tty,time,cmd); set -- $(/bin/echo "$psres" | head -n1); shift; shift; echo "SWAP $*"; echo "$psres" | awk 'BEGIN {ORS=""; getline} {print $2 - $1 " "; for (i=3; i<NF; i++) print $i " "; print $NF "\n"}' | sort -rn | head
Safely clean /boot of old kernels in Ubuntu:
sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r` | while read -r line; do sudo apt-mark remove $line;done;sudo apt autoremove --purge; sudo update-grub
Quick HTTP server using Python 3:
python3 -m http.server
fallocate -l 10G <filename>
Empty reserve file on Linux:
truncate -s 1G <filename>
Sparse file in NTFS on Windows:
fsutil file createnew <filename> <length in bytes>
Move Ubuntu dock Applications icon to left/top
gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true
Ubuntu Display Battery Percentage
gsettings set org.gnome.desktop.interface show-battery-percentage true
Ubuntu Click to minimize to dock
gsettings set org.gnome.shell.extensions.dash-to-dock click-action minimize