Skip to content

Instantly share code, notes, and snippets.

@mvandermeulen
Forked from s3rgeym/pet-snippet.toml
Created June 1, 2026 00:52
Show Gist options
  • Select an option

  • Save mvandermeulen/b0df4c0545ae719b3faf5be1114731e8 to your computer and use it in GitHub Desktop.

Select an option

Save mvandermeulen/b0df4c0545ae719b3faf5be1114731e8 to your computer and use it in GitHub Desktop.
description
[[Snippets]]
Description = "repeat the previous command"
Output = ""
Tag = []
command = "!!"
[[Snippets]]
Description = "Runs last command"
Output = ""
Tag = ["shortcut"]
command = "!!"
[[Snippets]]
Description = "Same as OPTION+., brings forth last argument of the previous command"
Output = ""
Tag = ["shortcut"]
command = "!$"
[[Snippets]]
Description = "Displays the word that !$ substitutes"
Output = ""
Tag = ["shortcut"]
command = "!$:p"
[[Snippets]]
Description = "Runs previous command except its first word"
Output = ""
Tag = ["shortcut"]
command = "!*"
[[Snippets]]
Description = "Displays what !* substitutes"
Output = ""
Tag = ["shortcut"]
command = "!*:p"
[[Snippets]]
Description = "select command by history number"
Output = ""
Tag = []
command = "!<number>"
[[Snippets]]
Description = "Substitutes first argument of last command in the current command"
Output = ""
Tag = ["shortcut"]
command = "!^"
[[Snippets]]
Description = "Repeats latest command in history that begins with fi"
Output = ""
Tag = ["shortcut"]
command = "!fi"
[[Snippets]]
Description = "Run nth command from the bash history"
Output = ""
Tag = ["shortcut"]
command = "!n"
[[Snippets]]
Description = "Repeat arguments from the last command (i.e, from argument n to $)"
Output = ""
Tag = ["shortcut"]
command = "!n:$"
[[Snippets]]
Description = "Repeats argument within a range (i.e, m 2-3)"
Output = ""
Tag = ["shortcut"]
command = "!n:m"
[[Snippets]]
Description = "Prints the command !n executes"
Output = ""
Tag = ["shortcut"]
command = "!n:p"
[[Snippets]]
Description = "Runs recent command in the bash history that begins with x"
Output = ""
Tag = ["shortcut"]
command = "!x"
[[Snippets]]
Description = "Displays the x command and adds it as the recent command in history"
Output = ""
Tag = ["shortcut"]
command = "!x:p"
[[Snippets]]
Description = "compile program"
Output = ""
Tag = []
command = "./configure && make && sudo make install"
[[Snippets]]
Description = "extract file from 7zip archive to stdout"
Output = ""
Tag = []
command = "7z e -so <archive> <filename>"
[[Snippets]]
Description = "redirect all output to output-file and do not erase output-file"
Output = ""
Tag = []
command = "<command> <output-file> | sponge <output-file>"
[[Snippets]]
Description = "colored pagination"
Output = ""
Tag = []
command = "<command> | less -R"
[[Snippets]]
Description = "redirect sudo output to file. use -a to append"
Output = ""
Tag = []
command = "<command> | sudo sponge <output>"
[[Snippets]]
Description = "Display files/folders in the current path as parameter"
Output = ""
Tag = ["shortcut"]
command = "Alt + *"
[[Snippets]]
Description = "Uses last argument of previous command"
Output = ""
Tag = ["shortcut"]
command = "Alt + . / Esc+."
[[Snippets]]
Description = "Moves to the first line of the bash history"
Output = ""
Tag = ["shortcut"]
command = "Alt + <"
[[Snippets]]
Description = "Moves to the last line of the bash history"
Output = ""
Tag = ["shortcut"]
command = "Alt + >"
[[Snippets]]
Description = "Display files/folders in the current path for help"
Output = ""
Tag = ["shortcut"]
command = "Alt + ?"
[[Snippets]]
Description = "Moves the cursor one word backward"
Output = ""
Tag = ["shortcut"]
command = "Alt + B / Esc + B"
[[Snippets]]
Description = "Removes from the character until the start of the word"
Output = ""
Tag = ["shortcut"]
command = "Alt + Backspace"
[[Snippets]]
Description = "Moves cursor to the previous occurrence of x"
Output = ""
Tag = ["shortcut"]
command = "Alt + Ctrl + ] + x"
[[Snippets]]
Description = "Removes from the character until the end of the word"
Output = ""
Tag = ["shortcut"]
command = "Alt + D"
[[Snippets]]
Description = "Moves the cursor one word forward"
Output = ""
Tag = ["shortcut"]
command = "Alt + F / Esc + F"
[[Snippets]]
Description = "Non-incremental reverse search of bash history"
Output = ""
Tag = ["shortcut"]
command = "Alt + P"
[[Snippets]]
Description = "Switches current word with the previous"
Output = ""
Tag = ["shortcut"]
command = "Alt + T"
[[Snippets]]
Description = "Move to the start of the command line"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + A"
[[Snippets]]
Description = "Move one character backward"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + B"
[[Snippets]]
Description = "Sends SIGI signal and kills currently executing command"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + C"
[[Snippets]]
Description = "Closes the current terminal"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + D"
[[Snippets]]
Description = "Removes the character under the cursor"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + D"
[[Snippets]]
Description = "Move to the end of the command line"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + E"
[[Snippets]]
Description = "Move one character forward"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + F"
[[Snippets]]
Description = "Exits history search mode"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + G"
[[Snippets]]
Description = "Removes character before the cursor"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + H"
[[Snippets]]
Description = "Completes the command like TAB"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + I"
[[Snippets]]
Description = "Ends history search at current command"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + J"
[[Snippets]]
Description = "Deletes after the cursor until the end of the command"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + K"
[[Snippets]]
Description = "Similar to clear command, clears the terminal screen"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + L"
[[Snippets]]
Description = "Moves to next command"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + N / Down arrow"
[[Snippets]]
Description = "Runs and re-enters the command found via Ctrl + S and Ctrl + R"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + O"
[[Snippets]]
Description = "Moves to previous command"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + P / Up arrow"
[[Snippets]]
Description = "Resumes suspended command"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + Q"
[[Snippets]]
Description = "Incremental reverse search of bash history"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + R"
[[Snippets]]
Description = "Stops command output to the screen"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + S"
[[Snippets]]
Description = "Gets the next most recent command"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + S"
[[Snippets]]
Description = "Deletes before the cursor until the start of the command"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + U"
[[Snippets]]
Description = "Removes the command/argument before the cursor"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + W"
[[Snippets]]
Description = "Switch cursor position between start of the command line and the current position"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + XX"
[[Snippets]]
Description = "Suspends current command execution and moves it to the background"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + Z"
[[Snippets]]
Description = "Moves the cursor forward to next occurrence of x"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + ] + x"
[[Snippets]]
Description = "Undo previous command"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + _"
[[Snippets]]
Description = "Switch between last two words before cursor"
Output = ""
Tag = ["shortcut"]
command = "Esc + T"
[[Snippets]]
Description = "Autocompletes the command or file/directory name"
Output = ""
Tag = ["shortcut"]
command = "TAB"
[[Snippets]]
Description = "run command ignoring aliases and functions"
Output = ""
Tag = []
command = "\\<command>"
[[Snippets]]
Description = "Replaces 123 with abc"
Output = ""
Tag = ["shortcut"]
command = "^123^abc"
[[Snippets]]
Description = "backup android phone"
Output = ""
Tag = []
command = "adb backup -apk -obb -shared -all -system -f fullbackup.ab"
[[Snippets]]
Description = "list connected devices"
Output = ""
Tag = ["android"]
command = "adb devices"
[[Snippets]]
Description = "backup sd card"
Output = ""
Tag = ["android"]
command = "adb pull sdcard"
[[Snippets]]
Description = "run shell"
Output = ""
Tag = ["android"]
command = "adb shell"
[[Snippets]]
Description = "run command as package"
Output = ""
Tag = ["android"]
command = "adb shell run-as <com.package> <command>"
[[Snippets]]
Description = "list all aliases"
Output = ""
Tag = []
command = "alias"
[[Snippets]]
Description = "sound mixer"
Output = ""
Tag = []
command = "alsamixer"
[[Snippets]]
Description = "clears antigen cache. run it after change configuration"
Output = ""
Tag = []
command = "antigen reset"
[[Snippets]]
Description = "build apk"
Output = ""
Tag = ["android"]
command = "apktool b <source>"
[[Snippets]]
Description = "decompile apk"
Output = ""
Tag = ["android"]
command = "apktool d <file.apk>"
[[Snippets]]
Description = "list audio devices"
Output = ""
Tag = []
command = "aplay -l"
[[Snippets]]
Description = "set a specific language version as the default (-u for global)"
Output = ""
Tag = []
command = "asdf set <plugin> <version>"
[[Snippets]]
Description = "show asdf environment"
Output = ""
Tag = []
command = "asdf info"
[[Snippets]]
Description = "install a specific language version (eg. 1.2.3, latest, lts)"
Output = ""
Tag = []
command = "asdf install <plugin> <version>"
[[Snippets]]
Description = "list installed language versions"
Output = ""
Tag = []
command = "asdf list"
[[Snippets]]
Description = "list of all languages"
Output = ""
Tag = []
command = "asdf list all <plugin>"
[[Snippets]]
Description = "add language plugin"
Output = ""
Tag = []
command = "asdf plugin add <name>"
[[Snippets]]
Description = "remove language plugin"
Output = ""
Tag = []
command = "asdf plugin remove <plugin>"
[[Snippets]]
Description = "update language plugin"
Output = ""
Tag = []
command = "asdf plugin update <plugin>"
[[Snippets]]
Description = "recreate shims (symlinks to executables)"
Output = ""
Tag = []
command = "asdf reshims <plugin>"
[[Snippets]]
Description = "change language version for shell session"
Output = ""
Tag = []
command = "asdf shell <plugin> <version>"
[[Snippets]]
Description = "uninstall a specific language version"
Output = ""
Tag = []
command = "asdf uninstall <plugin> <version>"
[[Snippets]]
Description = "remove duplicate lines without sorting"
Output = ""
Tag = []
command = "awk '!x[$0]++'"
[[Snippets]]
Description = "enable or disable baloo file indexer"
Output = ""
Tag = []
command = "balooctl enable/disable"
[[Snippets]]
Description = "delete the index database"
Output = ""
Tag = ["kde"]
command = "balooctl purge"
[[Snippets]]
Description = "copy file contents as base64"
Output = ""
Tag = []
command = "base64 -w 0 <filename> | xclip -sel c"
[[Snippets]]
Description = "base64 url safe"
Output = ""
Tag = []
command = "basenc --base64url"
[[Snippets]]
Description = "highlight file"
Output = ""
Tag = ["cat"]
command = "bat <file>"
[[Snippets]]
Description = "show keybindings"
Output = ""
Tag = ["bash"]
command = "bind -p"
[[Snippets]]
Description = "show keybindings"
Output = ""
Tag = ["zsh"]
command = "bindkey"
[[Snippets]]
Description = "List current existing or applied key bindings"
Output = ""
Tag = []
command = "bindkey"
[[Snippets]]
Description = "stop bitcoind"
Output = ""
Tag = []
command = "bitcoin-cli stop"
[[Snippets]]
Description = "start bitcoind"
Output = ""
Tag = []
command = "bitcoind"
[[Snippets]]
Description = "print device UUID"
Output = ""
Tag = []
command = "blkid -s UUID -o value <device>"
[[Snippets]]
Description = "print block device attributes: UUID, LABEL and etc"
Output = ""
Tag = []
command = "blkid <device>"
[[Snippets]]
Description = "search + tree + cd"
Output = ""
Tag = ["broot"]
command = "br"
[[Snippets]]
Description = "show cpu, memory, disk, temperature and processes"
Output = ""
Tag = ["monitoring"]
command = "btm"
[[Snippets]]
Description = "graphical system/process monitor"
Output = ""
Tag = []
command = "btm"
[[Snippets]]
Description = "reads all filesystem data and metadata and verifies the checksums"
Output = ""
Tag = []
command = "btrfs scrub"
[[Snippets]]
Description = "print calendar"
Output = ""
Tag = []
command = "cal"
[[Snippets]]
Description = "print capabilities"
Output = ""
Tag = []
command = "capsh --print"
[[Snippets]]
Description = "concatenate files to output"
Output = ""
Tag = []
command = "cat"
[[Snippets]]
Description = "output with line numbers"
Output = ""
Tag = []
command = "cat -n"
[[Snippets]]
Description = "print random alphanumeric characters"
Output = ""
Tag = []
command = "cat /dev/urandom | tr -dc '[:alnum:]' | fold -w 20 | head -n 1"
[[Snippets]]
Description = "print process environment variables as KEY=VALUE"
Output = ""
Tag = []
command = "cat /proc/<pid>/environ | tr '\\0' '\\n'"
[[Snippets]]
Description = "view audio cards"
Output = ""
Tag = []
command = "cat /proc/asound/cards"
[[Snippets]]
Description = "cpu info"
Output = ""
Tag = []
command = "cat /proc/cpuinfo"
[[Snippets]]
Description = "random uuid"
Output = ""
Tag = []
command = "cat /proc/sys/kernel/random/uuid"
[[Snippets]]
Description = "hardware sector size"
Output = ""
Tag = []
command = "cat /sys/block/<device>/queue/hw_sector_size"
[[Snippets]]
Description = "physical block size"
Output = ""
Tag = []
command = "cat /sys/block/nvme0n1/queue/physical_block_size"
[[Snippets]]
Description = "share a text"
Output = ""
Tag = []
command = "cat <file> | curl -F 'sprunge=<-' https://sprunge.us"
[[Snippets]]
Description = "download in parallel"
Output = ""
Tag = []
command = "cat list.txt | parallel -j 4 wget -q {}"
[[Snippets]]
Description = "colorized cat"
Output = ""
Tag = []
command = "ccat"
[[Snippets]]
Description = "change to previous working directory"
Output = ""
Tag = []
command = "cd -"
[[Snippets]]
Description = "expire the user account"
Output = ""
Tag = []
command = "chage -E0 <username>"
[[Snippets]]
Description = "disable cow"
Output = ""
Tag = ["btrfs"]
command = "chattr +C <filename>"
[[Snippets]]
Description = "protect/lock file"
Output = ""
Tag = []
command = "chattr +i <file>"
[[Snippets]]
Description = "protect directory"
Output = ""
Tag = []
command = "chattr -R +i <dir>"
[[Snippets]]
Description = "unlock file"
Output = ""
Tag = []
command = "chattr -i <file>"
[[Snippets]]
Description = "Files can only be deleted by the owner or super user (Sticky Bit)"
Output = ""
Tag = []
command = "chmod +t <dir>"
[[Snippets]]
Description = "change permissions for user, group, others (r=4, w=2, x=1)"
Output = ""
Tag = ["permissions"]
command = "chmod <ugo> <filename>"
[[Snippets]]
Description = "inherit the parent directory group with new files"
Output = ""
Tag = ["permissions"]
command = "chmod g+s <dir>"
[[Snippets]]
Description = "New files inherit group permissions (SetGID)"
Output = ""
Tag = ["permissions"]
command = "chmod g+s <dir>"
[[Snippets]]
Description = "New files inherit user permissions (SetUID)"
Output = ""
Tag = ["permissions"]
command = "chmod u+s <dir>"
[[Snippets]]
Description = "make executable"
Output = ""
Tag = ["permissions"]
command = "chmod u+x <filename>"
[[Snippets]]
Description = "launch chromium with open remote debugging port"
Output = ""
Tag = ["devtools"]
command = "chromium --remote-debugging-port=9222"
[[Snippets]]
Description = "show cheat sheet"
Output = ""
Tag = ["help"]
command = "cht.sh <text>"
[[Snippets]]
Description = "calculate file checksum"
Output = ""
Tag = []
command = "cksum <file>"
[[Snippets]]
Description = "open in visual code"
Output = ""
Tag = []
command = "code <filename>"
[[Snippets]]
Description = "select or reject lines common to two files"
Output = ""
Tag = []
command = "comm"
[[Snippets]]
Description = "Outputs lines unique to the file 1"
Output = ""
Tag = []
command = "comm -23 <(sort file1) <(sort file2)"
[[Snippets]]
Description = "check command exists"
Output = ""
Tag = []
command = "command -v <command>"
[[Snippets]]
Description = "run command ignoring functions"
Output = ""
Tag = []
command = "command <command>"
[[Snippets]]
Description = "create avatar"
Output = ""
Tag = []
command = "convert -quality 80 -resize '<width>x<height>^' -gravity Center -crop <width>x<height>+0+0 +repage <input> <output>"
[[Snippets]]
Description = "resize image"
Output = ""
Tag = []
command = "convert <input> -resize <new_width>x<new_height> <output>"
[[Snippets]]
Description = "create lightweight copy"
Output = ""
Tag = ["btrfs"]
command = "cp --reflink=always <source> <target>"
[[Snippets]]
Description = "copy with preserve permissions"
Output = ""
Tag = []
command = "cp -a <src> <dst>"
[[Snippets]]
Description = "cp <filename>{,.bak}"
Output = ""
Tag = []
command = "create a backup of a file"
[[Snippets]]
Description = "create copy of a database in postgresql"
Output = ""
Tag = ["postgres"]
command = "createdb -O <owner> -T <source> <target>"
[[Snippets]]
Description = "resize luks volume"
Output = ""
Tag = ["encryption"]
command = "cryptsetup -b <sectors> resize <mapping_name>"
[[Snippets]]
Description = "add keyfile to luks device"
Output = ""
Tag = ["encryption"]
command = "cryptsetup luksAddKey <device> <keyfile>"
[[Snippets]]
Description = "add luks key file"
Output = ""
Tag = ["encryption"]
command = "cryptsetup luksAddKey <device> <keyfile>"
[[Snippets]]
Description = "change passphrase"
Output = ""
Tag = ["encryption"]
command = "cryptsetup luksChangeKey -S 0 <volume>"
[[Snippets]]
Description = "extract master key"
Output = ""
Tag = ["encryption"]
command = "cryptsetup luksDump --dump-master-key <device>"
[[Snippets]]
Description = "dump headers and see key slots"
Output = ""
Tag = ["encryption"]
command = "cryptsetup luksDump <volume>"
[[Snippets]]
Description = "docker top"
Output = ""
Tag = []
command = "ctop"
[[Snippets]]
Description = "send a request using socks"
Output = ""
Tag = []
command = "curl --socks5 localhost:9050 https://ifconfig.me"
[[Snippets]]
Description = "send curl request over unix socket"
Output = ""
Tag = []
command = "curl --unix-socket /run/user/1000/docker.sock http://localhost/images/json"
[[Snippets]]
Description = "upload image"
Output = ""
Tag = []
command = "curl -F'file=@<filename>' https://0x0.st"
[[Snippets]]
Description = "share a file"
Output = ""
Tag = []
command = "curl -T <filename> https://transfer.sh"
[[Snippets]]
Description = "send curl request"
Output = ""
Tag = []
command = "curl -n"
[[Snippets]]
Description = "hide curl output"
Output = ""
Tag = []
command = "curl -s <url>"
[[Snippets]]
Description = "get public ip address"
Output = ""
Tag = []
command = "curl api.ipify.org"
[[Snippets]]
Description = "list all groups"
Output = ""
Tag = []
command = "cut -d: -f1 /etc/group"
[[Snippets]]
Description = "current date"
Output = ""
Tag = []
command = "date '+%Y-%m-%d'"
[[Snippets]]
Description = "dump settings"
Output = ""
Tag = ["gnome"]
command = "dconf dump / > <filename>"
[[Snippets]]
Description = "read the value of a key"
Output = ""
Tag = ["gnome"]
command = "dconf read <key>"
[[Snippets]]
Description = "reset all gnome settings"
Output = ""
Tag = ["gnome"]
command = "dconf reset -f /org/gnome/"
[[Snippets]]
Description = "remove all gnome terminal profiles and color schemes"
Output = ""
Tag = ["gnome"]
command = "dconf reset -f /org/gnome/terminal/legacy/profiles:/"
[[Snippets]]
Description = "reset key/directory"
Output = ""
Tag = ["gnome"]
command = "dconf reset -f <path>"
[[Snippets]]
Description = "compile a binary database from keyfiles"
Output = ""
Tag = ["gnome"]
command = "dconf update"
[[Snippets]]
Description = "write a new value to akey"
Output = ""
Tag = ["gnome"]
command = "dconf write <key> <value>"
[[Snippets]]
Description = "test disk write speed"
Output = ""
Tag = []
command = "dd if=/dev/zero of=testfile bs=64k count=16k conv=fdatasync oflag=direct"
[[Snippets]]
Description = "deactivate virtual environment"
Output = ""
Tag = ["python"]
command = "deactivate"
[[Snippets]]
Description = "convert binary deb package to arch linux package"
Output = ""
Tag = []
command = "debtap <filename.deb>"
[[Snippets]]
Description = "show function declatration"
Output = ""
Tag = []
command = "declare -f <func>"
[[Snippets]]
Description = "show function declaration"
Output = ""
Tag = []
command = "declare -f <function>"
[[Snippets]]
Description = "validate desktop file"
Output = ""
Tag = []
command = "desktop-file-validate <filename>"
[[Snippets]]
Description = "disk free"
Output = ""
Tag = []
command = "df"
[[Snippets]]
Description = "display a filesystem"
Output = ""
Tag = ["filesystem"]
command = "df -h <target>"
[[Snippets]]
Description = "show total number of inodes (btrfs=0)"
Output = ""
Tag = []
command = "df -i /"
[[Snippets]]
Description = "get ip by host"
Output = ""
Tag = ["network"]
command = "dig +short <hostname>"
[[Snippets]]
Description = "Display the directory stack and the current directoryPush the directory into the stack"
Output = ""
Tag = []
command = "dirs"
[[Snippets]]
Description = "show directory stack. also see popd/pushd"
Output = ""
Tag = []
command = "dirs -p"
[[Snippets]]
Description = "create a linux distro container with distrobox"
Output = ""
Tag = []
command = "distrobox create -i <image> -n <conatiner-name=''>"
[[Snippets]]
Description = "enter a container distrobox"
Output = ""
Tag = []
command = "distrobox enter <container-name>"
[[Snippets]]
Description = "list containers distrobox"
Output = ""
Tag = []
command = "distrobox list"
[[Snippets]]
Description = "delete a container distrobox"
Output = ""
Tag = []
command = "distrobox rm <conatiner-name>"
[[Snippets]]
Description = "stop a running conatiner distrobox"
Output = ""
Tag = []
command = "distrobox stop <container-name>"
[[Snippets]]
Description = "build docker image"
Output = ""
Tag = []
command = "docker build -t <image> "
[[Snippets]]
Description = "list all containers"
Output = ""
Tag = []
command = "docker container ls --all"
[[Snippets]]
Description = "starting a shell in a running docker container"
Output = ""
Tag = []
command = "docker exec -it <container-name> sh"
[[Snippets]]
Description = "list docker images with tags"
Output = ""
Tag = []
command = "docker images"
[[Snippets]]
Description = "filter docker images by a given name"
Output = ""
Tag = []
command = "docker images \"name\""
[[Snippets]]
Description = "inspect docker container"
Output = ""
Tag = []
command = "docker inspect --format='' <id_or_name>"
[[Snippets]]
Description = "kill a running docker container"
Output = ""
Tag = []
command = "docker kill <hash or name>"
[[Snippets]]
Description = "load image"
Output = ""
Tag = []
command = "docker load -i <image>.tar"
[[Snippets]]
Description = "follow docker conatiner logs"
Output = ""
Tag = []
command = "docker logs <container_id> -f"
[[Snippets]]
Description = "list docker networks"
Output = ""
Tag = []
command = "docker network ls"
[[Snippets]]
Description = "list docker containers"
Output = ""
Tag = []
command = "docker ps"
[[Snippets]]
Description = "container size"
Output = ""
Tag = []
command = "docker ps --size"
[[Snippets]]
Description = "rename container docker"
Output = ""
Tag = []
command = "docker rename <old-name> <new-name>"
[[Snippets]]
Description = "create and run docker container"
Output = ""
Tag = []
command = "docker run -d -p <host_port>:<container_port> -it <image>"
[[Snippets]]
Description = "starting a shell in a new docker container"
Output = ""
Tag = []
command = "docker run -it alpine sh"
[[Snippets]]
Description = "save docker image"
Output = ""
Tag = []
command = "docker save -o <output>.tar <image>"
[[Snippets]]
Description = "transfer docker image"
Output = ""
Tag = []
command = "docker save <image> | bzip2 | pv | ssh <user>@<host> docker load"
[[Snippets]]
Description = "start stopped docker container"
Output = ""
Tag = []
command = "docker start <container-name>"
[[Snippets]]
Description = "show docker statistics like memory usage"
Output = ""
Tag = []
command = "docker stats"
[[Snippets]]
Description = "stop a running docker container"
Output = ""
Tag = []
command = "docker stop <container-name>"
[[Snippets]]
Description = "docker filesystem usage"
Output = ""
Tag = []
command = "docker system df"
[[Snippets]]
Description = "remove unused docker objects"
Output = ""
Tag = []
command = "docker system prune --all --volumes"
[[Snippets]]
Description = "change docker container restarting policy"
Output = ""
Tag = []
command = "docker update --restart <policy> <container-name>"
[[Snippets]]
Description = "show full/validate config"
Output = ""
Tag = []
command = "docker-compose config"
[[Snippets]]
Description = "stop and delete running container"
Output = ""
Tag = []
command = "docker-compose down"
[[Snippets]]
Description = "interactive shell"
Output = ""
Tag = []
command = "docker-compose exec <service-name> sh"
[[Snippets]]
Description = "show compose logs"
Output = ""
Tag = []
command = "docker-compose logs -f <service>"
[[Snippets]]
Description = "Count number of services defined in docker-compose.yml file"
Output = ""
Tag = []
command = "docker-compose ps --services"
[[Snippets]]
Description = "update images"
Output = ""
Tag = []
command = "docker-compose pull"
[[Snippets]]
Description = "start stopped compose service"
Output = ""
Tag = []
command = "docker-compose start <service>"
[[Snippets]]
Description = "stop compose service"
Output = ""
Tag = []
command = "docker-compose stop <service>"
[[Snippets]]
Description = "create and start docker compose containers"
Output = ""
Tag = []
command = "docker-compose up -d"
[[Snippets]]
Description = "build and restart services after Dockerfile change"
Output = ""
Tag = []
command = "docker-compose up -d --build"
[[Snippets]]
Description = "list of files installed from apt package"
Output = ""
Tag = ["debian"]
command = "dpkg -L <package>"
[[Snippets]]
Description = "human readable file size"
Output = ""
Tag = []
command = "du -h <filename>"
[[Snippets]]
Description = "total file size"
Output = ""
Tag = ["filesystem"]
command = "du -sh <path>"
[[Snippets]]
Description = "better df"
Output = ""
Tag = []
command = "duf"
[[Snippets]]
Description = "get current display number"
Output = ""
Tag = []
command = "echo $DISPLAY"
[[Snippets]]
Description = "floating point calculations"
Output = ""
Tag = []
command = "echo '3.14 * 2' | bc -l"
[[Snippets]]
Description = "turn off disk"
Output = ""
Tag = ["hardware"]
command = "echo 1 | sudo tee /sys/block/<device>/device/delete"
[[Snippets]]
Description = "show verbose information"
Output = ""
Tag = []
command = "efibootmgr -v"
[[Snippets]]
Description = "grep -E"
Output = ""
Tag = []
command = "egrep"
[[Snippets]]
Description = "find all files containing a specific text"
Output = ""
Tag = ["recursion"]
command = "egrep -ri \"<pattern>\" "
[[Snippets]]
Description = "revert to defaults"
Output = ""
Tag = ["settings"]
command = "emulate -LR zsh"
[[Snippets]]
Description = "encfs: create or open encrypted folder"
Output = ""
Tag = ["encryption", "outdate"]
command = "encfs <encrypted_directory> <mountpoint>"
[[Snippets]]
Description = "encfs: change password"
Output = ""
Tag = ["encryption"]
command = "encfsctl passwd <path>"
[[Snippets]]
Description = "Display all exported environment or run a program in a modified environment"
Output = ""
Tag = []
command = "env"
[[Snippets]]
Description = "show environment variables"
Output = ""
Tag = []
command = "env"
[[Snippets]]
Description = "set environment variables from the .env file for a command"
Output = ""
Tag = []
command = "env $(cat .env | xargs) <command>"
[[Snippets]]
Description = "substitute environment variables"
Output = ""
Tag = []
command = "envsubst"
[[Snippets]]
Description = "better ls"
Output = ""
Tag = []
command = "exa -al"
[[Snippets]]
Description = "reload shell"
Output = ""
Tag = []
command = "exec $SHELL -l"
[[Snippets]]
Description = "execute a command that replacing the current process"
Output = ""
Tag = []
command = "exec <command>"
[[Snippets]]
Description = "reading/writing exif metadata"
Output = ""
Tag = []
command = "exiftool"
[[Snippets]]
Description = "unset an environment variable"
Output = ""
Tag = []
command = "export -n <variable>"
[[Snippets]]
Description = "set an environment variable"
Output = ""
Tag = []
command = "export <variable>=<value>"
[[Snippets]]
Description = "decompress and remove archive"
Output = ""
Tag = []
command = "extract -r <filename>"
[[Snippets]]
Description = "allocate disk space for the file"
Output = ""
Tag = []
command = "fallocate -l <size> <filename>"
[[Snippets]]
Description = "edit and execute a previous command"
Output = ""
Tag = []
command = "fc"
[[Snippets]]
Description = "update font cache"
Output = ""
Tag = []
command = "fc-cache -fv"
[[Snippets]]
Description = "list fonts"
Output = ""
Tag = []
command = "fc-list"
[[Snippets]]
Description = "find files bigger than X size"
Output = ""
Tag = ["filesystem"]
command = "fd -H --type f --size=+<X>"
[[Snippets]]
Description = "search excluding specific files or directories"
Output = ""
Tag = []
command = "fd -H -E .git"
[[Snippets]]
Description = "searching by extension"
Output = ""
Tag = ["filesystem"]
command = "fd -e <ext>"
[[Snippets]]
Description = "total file size by extension"
Output = ""
Tag = []
command = "fd -e <ext> -0 | xargs -0 du -ch | tail -n1"
[[Snippets]]
Description = "find files in specific directory"
Output = ""
Tag = ["filesystem"]
command = "fd <pattern> <dir>"
[[Snippets]]
Description = "delete duplicate files"
Output = ""
Tag = []
command = "fdupes -r -d -N <directory>"
[[Snippets]]
Description = "find file duplicates"
Output = ""
Tag = []
command = "fdupes <path>"
[[Snippets]]
Description = "rotate video"
Output = ""
Tag = []
command = "ffmpeg -i <input> -c copy -metadata:s:v:0 rotate=<angle> <output>"
[[Snippets]]
Description = "crop video"
Output = ""
Tag = []
command = "ffmpeg -i <input> -filter:v 'crop=<width>:<height>:<offset x>:<offset y>' <output>"
[[Snippets]]
Description = "take screenshot from video"
Output = ""
Tag = []
command = "ffmpeg -i <input> -ss 00:00:01 -frames:v 1 -q:v 2 <output>"
[[Snippets]]
Description = "trim audio/video"
Output = ""
Tag = []
command = "ffmpeg -i <input> -ss <start_time> -t <duration_time> <output>"
[[Snippets]]
Description = "convert video"
Output = ""
Tag = []
command = "ffmpeg -i <source> <output>"
[[Snippets]]
Description = "file type"
Output = ""
Tag = []
command = "file <file>"
[[Snippets]]
Description = "top 10 files by size"
Output = ""
Tag = ["filesystem"]
command = "find -type f -exec du -Sh {} + | sort -rh | head -n 10"
[[Snippets]]
Description = "find duplicated files"
Output = ""
Tag = ["filesystem"]
command = "find . ! -empty -type f -exec md5sum {} + | sort | uniq -w32 -dD"
[[Snippets]]
Description = "Recursively find and replace in files"
Output = ""
Tag = ["filesystem"]
command = "find . -type f -exec sed -ri 's/<pattern>/<replacement>/g' {} +"
[[Snippets]]
Description = "delete files if name does not match pattern"
Output = ""
Tag = ["filesystem"]
command = "find . -type f ! -name <pattern> -delete"
[[Snippets]]
Description = "find total file size"
Output = ""
Tag = ["filesystem"]
command = "find . -type f -name '*.jpg' -exec du -ch {} +"
[[Snippets]]
Description = "delete files with name a matching pattern"
Output = ""
Tag = ["filesystem"]
command = "find . -type f -name <pattern> -delete"
[[Snippets]]
Description = "find files bigger than X size"
Output = ""
Tag = ["filesystem"]
command = "find . -type f -size +1G"
[[Snippets]]
Description = "find files smaller than X size"
Output = ""
Tag = ["filesystem"]
command = "find . -type f -size -1G"
[[Snippets]]
Description = "remove dead symlinks"
Output = ""
Tag = []
command = "find . -xtype l -delete"
[[Snippets]]
Description = "count files recursively"
Output = ""
Tag = ["filesystem"]
command = "find <dir> -type f | wc -l"
[[Snippets]]
Description = "list all mounted filesystems"
Output = ""
Tag = ["filesystem"]
command = "findmnt -l"
[[Snippets]]
Description = "find mountpoints"
Output = ""
Tag = ["filesystem"]
command = "findmnt <device|mountpoint>"
[[Snippets]]
Description = "start firefox in private mode"
Output = ""
Tag = []
command = "firefox -private-window"
[[Snippets]]
Description = "run without network access"
Output = ""
Tag = ["sandbox"]
command = "firejail --net=none <program>"
[[Snippets]]
Description = "delete all created files after closing the program"
Output = ""
Tag = []
command = "firejail --private chromium"
[[Snippets]]
Description = "run in a sanbox"
Output = ""
Tag = []
command = "firejail <program>"
[[Snippets]]
Description = "dump bios"
Output = ""
Tag = []
command = "flashrom -r <output>"
[[Snippets]]
Description = "list configuration"
Output = ""
Tag = []
command = "flatpak config --list"
[[Snippets]]
Description = "check history"
Output = ""
Tag = []
command = "flatpak history"
[[Snippets]]
Description = "list application permissions"
Output = ""
Tag = []
command = "flatpak info --show-permissions <app-id>"
[[Snippets]]
Description = "show info about application or runtime"
Output = ""
Tag = []
command = "flatpak info <app-id>"
[[Snippets]]
Description = "install application"
Output = ""
Tag = []
command = "flatpak install <app-id>"
[[Snippets]]
Description = "kill process"
Output = ""
Tag = []
command = "flatpak kill <instance-or-app-id>"
[[Snippets]]
Description = "list packages"
Output = ""
Tag = []
command = "flatpak list"
[[Snippets]]
Description = "show package details"
Output = ""
Tag = ["statistics"]
command = "flatpak list -d"
[[Snippets]]
Description = "reset application permissions"
Output = ""
Tag = []
command = "flatpak override --reset <app-id>"
[[Snippets]]
Description = "show overrides"
Output = ""
Tag = []
command = "flatpak override --show --user org.telegram.desktop"
[[Snippets]]
Description = "give access to home directory"
Output = ""
Tag = []
command = "flatpak override --user --filesystems=home org.telegram.desktop"
[[Snippets]]
Description = "change application permissions"
Output = ""
Tag = []
command = "flatpak override <permission-flags> <app-id>"
[[Snippets]]
Description = "show processes"
Output = ""
Tag = []
command = "flatpak ps"
[[Snippets]]
Description = "add repository"
Output = ""
Tag = []
command = "flatpak remote-add <repo> <url>"
[[Snippets]]
Description = "show information about remote package"
Output = ""
Tag = []
command = "flatpak remote-info <app-id>"
[[Snippets]]
Description = "show available packages"
Output = ""
Tag = []
command = "flatpak remote-ls <repo or url>"
[[Snippets]]
Description = "disable repository"
Output = ""
Tag = []
command = "flatpak remote-modify --disable <repo>"
[[Snippets]]
Description = "enable repository"
Output = ""
Tag = []
command = "flatpak remote-modify --enable <repo>"
[[Snippets]]
Description = "list repositories"
Output = ""
Tag = []
command = "flatpak remotes"
[[Snippets]]
Description = "repair a installation"
Output = ""
Tag = []
command = "flatpak repair"
[[Snippets]]
Description = "run application"
Output = ""
Tag = []
command = "flatpak run <app-id>"
[[Snippets]]
Description = "search packages"
Output = ""
Tag = []
command = "flatpak search <text>"
[[Snippets]]
Description = "uninstall application and delete it's data"
Output = ""
Tag = []
command = "flatpak uninstall --delete-data <app-id>"
[[Snippets]]
Description = "remove unused runtimes"
Output = ""
Tag = []
command = "flatpak uninstall --unused"
[[Snippets]]
Description = "remove application"
Output = ""
Tag = []
command = "flatpak uninstall <app-id>"
[[Snippets]]
Description = "update all application and runtimes"
Output = ""
Tag = []
command = "flatpak update -y"
[[Snippets]]
Description = "replace spaces in file names"
Output = ""
Tag = []
command = "for f in *; do mv \"$f\" `echo $f | tr ' ' '_'`; done"
[[Snippets]]
Description = "show free memory"
Output = ""
Tag = []
command = "free -h"
[[Snippets]]
Description = "check and repair fat/ext filesystem"
Output = ""
Tag = []
command = "fsck -a"
[[Snippets]]
Description = "fscrypt: encrypt a directory"
Output = ""
Tag = ["encryption"]
command = "fscrypt encrypt <directory>"
[[Snippets]]
Description = "fscrypt: lock a directory"
Output = ""
Tag = ["encryption"]
command = "fscrypt lock dir"
[[Snippets]]
Description = "change a custom passphrase. see fscrypt status output"
Output = ""
Tag = ["encryption"]
command = "fscrypt metadata change-passphrase --protector=<mountpoint>:<protector>"
[[Snippets]]
Description = "setting up fscrypt on a filesystem"
Output = ""
Tag = []
command = "fscrypt setup <mountpoint>"
[[Snippets]]
Description = "show fscrypt status"
Output = ""
Tag = ["encryption"]
command = "fscrypt status <path>"
[[Snippets]]
Description = "find out who is"
Output = ""
Tag = []
command = "fuser <file>"
[[Snippets]]
Description = "receive a list of processes"
Output = ""
Tag = []
command = "fuser <filename>"
[[Snippets]]
Description = "ummount fuse filesystem"
Output = ""
Tag = []
command = "fusermount -u <mountpoint>"
[[Snippets]]
Description = "view json"
Output = ""
Tag = ["togglable"]
command = "fx"
[[Snippets]]
Description = "compile c++"
Output = ""
Tag = []
command = "g++ <source> -o <binary>"
[[Snippets]]
Description = "authenticate user with gcloud"
Output = ""
Tag = ["google"]
command = "gcloud auth login --brief"
[[Snippets]]
Description = "revoke credentials"
Output = ""
Tag = []
command = "gcloud auth revoke"
[[Snippets]]
Description = "manage GPT partitions"
Output = ""
Tag = []
command = "gdisk"
[[Snippets]]
Description = "get group name by id"
Output = ""
Tag = []
command = "getent group <gid> | cut -d: -f1"
[[Snippets]]
Description = "list all users of a group"
Output = ""
Tag = []
command = "getent group <group>"
[[Snippets]]
Description = "get group id by name"
Output = ""
Tag = []
command = "getent group <name> | cut -d: -f3"
[[Snippets]]
Description = "list user names"
Output = ""
Tag = []
command = "getent passwd | cut -d: -f1"
[[Snippets]]
Description = "list all users"
Output = ""
Tag = []
command = "getent passwd | cut -d: -f1"
[[Snippets]]
Description = "show name, owner, group and access control list (ACL)"
Output = ""
Tag = []
command = "getfacl <file>"
[[Snippets]]
Description = "create a secret gist"
Output = ""
Tag = ["github"]
command = "gh gist create <filename>"
[[Snippets]]
Description = "clone github repository"
Output = ""
Tag = []
command = "gh repo clone <name>"
[[Snippets]]
Description = "create github repo from current directory"
Output = ""
Tag = []
command = "gh repo create --public \"$(basename `pwd`)\" --source ."
[[Snippets]]
Description = "move files to ~/.local/share/Trash"
Output = ""
Tag = []
command = "gio trash"
[[Snippets]]
Description = "add all files"
Output = ""
Tag = []
command = "git add "
[[Snippets]]
Description = "show current branch"
Output = ""
Tag = []
command = "git branch --show-current"
[[Snippets]]
Description = "show all branches"
Output = ""
Tag = []
command = "git branch -a"
[[Snippets]]
Description = "delete local branch"
Output = ""
Tag = []
command = "git branch -d <branch>"
[[Snippets]]
Description = "git rename branch"
Output = ""
Tag = []
command = "git branch -m <oldname> <newname>"
[[Snippets]]
Description = "rename the local branch main to master"
Output = ""
Tag = []
command = "git branch -m main master"
[[Snippets]]
Description = "output content of git object"
Output = ""
Tag = []
command = "git cat-file -t <sha1>"
[[Snippets]]
Description = "create branch from commit"
Output = ""
Tag = []
command = "git checkout -b <branch-name> <commit-hash>"
[[Snippets]]
Description = "copy branch"
Output = ""
Tag = []
command = "git checkout -b <new_branch> <old_branch>"
[[Snippets]]
Description = "change branch"
Output = ""
Tag = []
command = "git checkout <branch-name>"
[[Snippets]]
Description = "undo changes a in specific folder"
Output = ""
Tag = []
command = "git checkout <dir>"
[[Snippets]]
Description = "apply changes from commit"
Output = ""
Tag = []
command = "git cherry-pick <commit-hash>"
[[Snippets]]
Description = "remove untracked files"
Output = ""
Tag = []
command = "git clean -f"
[[Snippets]]
Description = "clone repo that containg submodules"
Output = ""
Tag = []
command = "git clone --recursive <URL to Git repo>"
[[Snippets]]
Description = "clone repository"
Output = ""
Tag = []
command = "git clone <uri> <path>"
[[Snippets]]
Description = "commit changes"
Output = ""
Tag = []
command = "git commit -am '<message>'"
[[Snippets]]
Description = "create git command alias"
Output = ""
Tag = []
command = "git config --global alias.last 'log -1 HEAD"
[[Snippets]]
Description = "configure globally"
Output = ""
Tag = []
command = "git config --global merge.tool vimdiff"
[[Snippets]]
Description = "get the most recent annotated tag"
Output = ""
Tag = []
command = "git describe --abbrev=0"
[[Snippets]]
Description = "output the tag of the latest tagged commit across all branches"
Output = ""
Tag = []
command = "git describe --tags $(git rev-list --tags --max-count=1)"
[[Snippets]]
Description = "get most recent tag"
Output = ""
Tag = []
command = "git describe --tags --abbrev=0"
[[Snippets]]
Description = "show a difference between commits"
Output = ""
Tag = []
command = "git diff <old-commit> <new-commit>"
[[Snippets]]
Description = "pull fetches all branches from all remotes"
Output = ""
Tag = []
command = "git fetch --all && git pull --all"
[[Snippets]]
Description = "clean up unnecessary files and optimize repo"
Output = ""
Tag = []
command = "git gc"
[[Snippets]]
Description = "git last commit id"
Output = ""
Tag = []
command = "git log --format=\"%H\" -n 1"
[[Snippets]]
Description = "show commits tree"
Output = ""
Tag = []
command = "git log --graph --color-words --color --source --decorate --all"
[[Snippets]]
Description = "merge branch into current branch"
Output = ""
Tag = []
command = "git merge --no-ff <branch>"
[[Snippets]]
Description = "pull all changes in the repo including changes in the submodules"
Output = ""
Tag = []
command = "git pull --recurse-submodule"
[[Snippets]]
Description = "upload commited changes"
Output = ""
Tag = []
command = "git push"
[[Snippets]]
Description = "git delete remote tag"
Output = ""
Tag = []
command = "git push --delete origin <tag>"
[[Snippets]]
Description = "delete a remote tag"
Output = ""
Tag = []
command = "git push --delete origin <tagname>"
[[Snippets]]
Description = "publish tags"
Output = ""
Tag = []
command = "git push --tags"
[[Snippets]]
Description = "delete remote branch"
Output = ""
Tag = []
command = "git push origin --delete <branch>"
[[Snippets]]
Description = "push branch to remote"
Output = ""
Tag = []
command = "git push origin -u <branch-name>"
[[Snippets]]
Description = "list all remotes"
Output = ""
Tag = []
command = "git remote -v"
[[Snippets]]
Description = "add remote repository"
Output = ""
Tag = []
command = "git remote add origin git@github.com:username/reponame.git"
[[Snippets]]
Description = "change git remote url"
Output = ""
Tag = []
command = "git remote set-url origin git@github.com:username/reponame.git"
[[Snippets]]
Description = "permanently discard any changes made after a specific commit"
Output = ""
Tag = ["warning"]
command = "git reset --hard <commit-id>"
[[Snippets]]
Description = "roll back to the previous commit while keeping the changes"
Output = ""
Tag = []
command = "git reset --soft <commit-id>"
[[Snippets]]
Description = "get the current commit hash"
Output = ""
Tag = []
command = "git rev-parse HEAD"
[[Snippets]]
Description = "undo commit"
Output = ""
Tag = []
command = "git revert <commit-id>"
[[Snippets]]
Description = "undo changes by creating new commit"
Output = ""
Tag = []
command = "git revert <commit-id>"
[[Snippets]]
Description = "remove file from index without deleting from disk"
Output = ""
Tag = []
command = "git rm --cached <file>"
[[Snippets]]
Description = "git save uncommited changes"
Output = ""
Tag = []
command = "git stash"
[[Snippets]]
Description = "git clear all stashes"
Output = ""
Tag = []
command = "git stash clear"
[[Snippets]]
Description = "execute a command on every submodule"
Output = ""
Tag = []
command = "git submodule foreach --recursive '<command>'"
[[Snippets]]
Description = "update submodule(s)"
Output = ""
Tag = []
command = "git submodule update --recursive --remote"
[[Snippets]]
Description = "git delete local tag"
Output = ""
Tag = []
command = "git tag -d <tag>"
[[Snippets]]
Description = "add tag"
Output = ""
Tag = []
command = "git tag <tagname>"
[[Snippets]]
Description = "install extension"
Output = ""
Tag = []
command = "gnome-extensions install <extension-bundle.zip>"
[[Snippets]]
Description = "list gnome extensions"
Output = ""
Tag = []
command = "gnome-extensions list"
[[Snippets]]
Description = "clean module cache"
Output = ""
Tag = ["golang"]
command = "go clean -modcache"
[[Snippets]]
Description = "show default value if not set"
Output = ""
Tag = ["golang"]
command = "go env <NAME>"
[[Snippets]]
Description = "show go workspace path"
Output = ""
Tag = []
command = "go env GOPATH"
[[Snippets]]
Description = "install package"
Output = ""
Tag = ["golang"]
command = "go install <package>@<version>"
[[Snippets]]
Description = "clean unused packages"
Output = ""
Tag = ["golang"]
command = "go mod tidy"
[[Snippets]]
Description = "start godoc"
Output = ""
Tag = ["golang"]
command = "godoc --http :6060"
[[Snippets]]
Description = "install terminal theme(s)"
Output = ""
Tag = []
command = "gogh"
[[Snippets]]
Description = "search in google"
Output = ""
Tag = []
command = "google <search>"
[[Snippets]]
Description = "dump web accessible git repos"
Output = ""
Tag = []
command = "goop -k -l urls.txt"
[[Snippets]]
Description = "update GPG key"
Output = ""
Tag = ["PGP"]
command = "gpg --edit-key <key-id>"
[[Snippets]]
Description = "import public key"
Output = ""
Tag = ["pgp"]
command = "gpg --import <file.gpg>"
[[Snippets]]
Description = "import key from server"
Output = ""
Tag = ["pgp"]
command = "gpg --keyserver <host> --recv-keys <id>"
[[Snippets]]
Description = "list public keys"
Output = ""
Tag = ["pgp"]
command = "gpg --list-keys"
[[Snippets]]
Description = "extract tar with password"
Output = ""
Tag = []
command = "gpg -d <archive>.tar.gz.gpg | tar xzvf -"
[[Snippets]]
Description = "ouput N lines after match"
Output = ""
Tag = []
command = "grep -A <N>"
[[Snippets]]
Description = "show lines after"
Output = ""
Tag = []
command = "grep -A <NUM> <PATTERN>"
[[Snippets]]
Description = "ouput N lines before match"
Output = ""
Tag = []
command = "grep -B <N>"
[[Snippets]]
Description = "show lines before"
Output = ""
Tag = []
command = "grep -B <NUM> <PATTERN>"
[[Snippets]]
Description = "show only matches"
Output = ""
Tag = []
command = "grep -oP <pattern>"
[[Snippets]]
Description = "find files by contents (use --include='*.php' for specific files)"
Output = ""
Tag = ["filesystem"]
command = "grep -rn <pattern>"
[[Snippets]]
Description = "generate regexp"
Output = ""
Tag = []
command = "grex"
[[Snippets]]
Description = "create a group"
Output = ""
Tag = []
command = "groupadd <name>"
[[Snippets]]
Description = "delete a group"
Output = ""
Tag = []
command = "groupdel <name>"
[[Snippets]]
Description = "current user group names"
Output = ""
Tag = []
command = "groups"
[[Snippets]]
Description = "scan container image for vulnerability"
Output = ""
Tag = []
command = "grype <image>"
[[Snippets]]
Description = ""
Output = ""
Tag = ["gnome"]
command = "gsetting set <schema> <key> <value>"
[[Snippets]]
Description = "get gnome settings key value"
Output = ""
Tag = []
command = "gsettings get <key>"
[[Snippets]]
Description = ""
Output = ""
Tag = ["gnome"]
command = "gsettings get <schema> <key>"
[[Snippets]]
Description = "list keys in gnome settings schema"
Output = ""
Tag = []
command = "gsettings list-keys org.gnome.desktop.interface"
[[Snippets]]
Description = "reset all settings"
Output = ""
Tag = ["gnome"]
command = "gsettings list-schemas | xargs -n 1 gsettings reset-recursively"
[[Snippets]]
Description = ""
Output = ""
Tag = ["gnome"]
command = "gsettings reset <schema> <key>"
[[Snippets]]
Description = "reset gnome settings recursively"
Output = ""
Tag = []
command = "gsettings reset-recursively <schema>"
[[Snippets]]
Description = "set gnome settings key"
Output = ""
Tag = []
command = "gsettings set <key> <value>"
[[Snippets]]
Description = "where <app-name> is the file name of the .desktop file, with or without the .desktop extension"
Output = ""
Tag = ["gnome"]
command = "gtk-launch <app-name>"
[[Snippets]]
Description = "output gzipped file contents to stdout"
Output = ""
Tag = []
command = "gunzip -c <filename.gz>"
[[Snippets]]
Description = "decompress .gz"
Output = ""
Tag = []
command = "gzip -d <filename>"
[[Snippets]]
Description = "list a hash table of recently executed commands"
Output = ""
Tag = []
command = "hash"
[[Snippets]]
Description = "delete hash entry"
Output = ""
Tag = []
command = "hash -d <command>"
[[Snippets]]
Description = "add to a hash table"
Output = ""
Tag = []
command = "hash -p <path> <command>"
[[Snippets]]
Description = "show location"
Output = ""
Tag = []
command = "hash -t <command>"
[[Snippets]]
Description = "crack password hash"
Output = ""
Tag = []
command = "hashcat"
[[Snippets]]
Description = "brute md5 password hash by dictionary"
Output = ""
Tag = []
command = "hashcat -a 0 -m 0 <hash:salt> <dictionary>"
[[Snippets]]
Description = "block hosts"
Output = ""
Tag = []
command = "hblock"
[[Snippets]]
Description = "get first line from file"
Output = ""
Tag = []
command = "head -1 <file>"
[[Snippets]]
Description = "read n bytes from a file"
Output = ""
Tag = []
command = "head -c<n> <file>"
[[Snippets]]
Description = "skip last line"
Output = ""
Tag = []
command = "head -n -1"
[[Snippets]]
Description = "show help"
Output = ""
Tag = []
command = "help <command>"
[[Snippets]]
Description = "heroku cli login"
Output = ""
Tag = []
command = "heroku login"
[[Snippets]]
Description = "clear history"
Output = ""
Tag = []
command = "history -c"
[[Snippets]]
Description = "exit without saving history"
Output = ""
Tag = []
command = "history -c && exit"
[[Snippets]]
Description = "output history since N line (1=all)"
Output = ""
Tag = []
command = "history -n <N>"
[[Snippets]]
Description = "get all dns records (any)"
Output = ""
Tag = []
command = "host -a <domain>"
[[Snippets]]
Description = "get dns a records (server ip)"
Output = ""
Tag = []
command = "host -t A google.com"
[[Snippets]]
Description = "system information"
Output = ""
Tag = []
command = "hostnamectl"
[[Snippets]]
Description = "remove tags"
Output = ""
Tag = []
command = "html2text"
[[Snippets]]
Description = "make http request"
Output = ""
Tag = ["curl alternative"]
command = "http"
[[Snippets]]
Description = "probe http endpoints"
Output = ""
Tag = ["discover"]
command = "httpx"
[[Snippets]]
Description = "show information about disks"
Output = ""
Tag = ["hardware"]
command = "hwinfo --disk"
[[Snippets]]
Description = "videocard info"
Output = ""
Tag = ["hardware"]
command = "hwinfo --gfxcard"
[[Snippets]]
Description = "hardware info"
Output = ""
Tag = []
command = "hwinfo --short"
[[Snippets]]
Description = "change file encoding"
Output = ""
Tag = ["charset"]
command = "iconv -f <from-enc> -t <to-enc> <input> -o <output>"
[[Snippets]]
Description = "output user primary group id"
Output = ""
Tag = []
command = "id -g <user>"
[[Snippets]]
Description = "outupt user primary group name"
Output = ""
Tag = []
command = "id -gn <user>"
[[Snippets]]
Description = "output user id"
Output = ""
Tag = []
command = "id -u <user>"
[[Snippets]]
Description = "view image meta data"
Output = ""
Tag = ["imagemagick"]
command = "identify -verbose <filename>"
[[Snippets]]
Description = "displays network usage by listening to the interface"
Output = ""
Tag = []
command = "iftop"
[[Snippets]]
Description = "take a screenshot"
Output = ""
Tag = []
command = "import -window <window-id> <output>"
[[Snippets]]
Description = "copy files and set attributes"
Output = ""
Tag = []
command = "install"
[[Snippets]]
Description = "show hardware info"
Output = ""
Tag = []
command = "inxi --admin --verbosity=7 --filter --no-host --width"
[[Snippets]]
Description = "graphics"
Output = ""
Tag = ["hardware", "videocard"]
command = "inxi -G"
[[Snippets]]
Description = "short videocard info"
Output = ""
Tag = ["hardware"]
command = "inxi -Gx"
[[Snippets]]
Description = "show ip address"
Output = ""
Tag = ["network"]
command = "ip a show"
[[Snippets]]
Description = "list network interfaces"
Output = ""
Tag = ["network"]
command = "ip link show"
[[Snippets]]
Description = "ip neighbors"
Output = ""
Tag = ["network"]
command = "ip neigh"
[[Snippets]]
Description = "configure wifi connection"
Output = ""
Tag = ["network", "wireless"]
command = "iwctl"
[[Snippets]]
Description = "list background processes"
Output = ""
Tag = []
command = "jobs"
[[Snippets]]
Description = "Show all collected log messages"
Output = ""
Tag = ["logs"]
command = "journalctl"
[[Snippets]]
Description = "disk usage by logs"
Output = ""
Tag = ["logs"]
command = "journalctl --disk-usage"
[[Snippets]]
Description = "list boots"
Output = ""
Tag = []
command = "journalctl --list-boots"
[[Snippets]]
Description = "clear logs"
Output = ""
Tag = ["logs"]
command = "journalctl --rotate --vacuum-time=1s"
[[Snippets]]
Description = "view boot logs"
Output = ""
Tag = ["logs"]
command = "journalctl -b"
[[Snippets]]
Description = "view systemd logs by executable"
Output = ""
Tag = []
command = "journalctl -b --no-pager /usr/bin/tor"
[[Snippets]]
Description = "see logs from previous boot"
Output = ""
Tag = ["logs"]
command = "journalctl -b -1"
[[Snippets]]
Description = "Follow messages as they appear"
Output = ""
Tag = ["logs"]
command = "journalctl -f"
[[Snippets]]
Description = "Show only kernel messages"
Output = ""
Tag = ["logs"]
command = "journalctl -k"
[[Snippets]]
Description = "view service logs"
Output = ""
Tag = ["logs", "systemd"]
command = "journalctl -u <service>"
[[Snippets]]
Description = "See network service messages"
Output = ""
Tag = ["logs"]
command = "journalctl -u network.service"
[[Snippets]]
Description = "process a json"
Output = ""
Tag = []
command = "jq"
[[Snippets]]
Description = "json pretty print"
Output = ""
Tag = []
command = "jq "
[[Snippets]]
Description = "run jupyter lab"
Output = ""
Tag = ["notebook"]
command = "jupyter lab"
[[Snippets]]
Description = "run a program with elevated privileges as root"
Output = ""
Tag = []
command = "kdesu <program>"
[[Snippets]]
Description = "kill background task"
Output = ""
Tag = []
command = "kill %<job-number>"
[[Snippets]]
Description = "kill process by pid"
Output = ""
Tag = []
command = "kill -9 <pid>"
[[Snippets]]
Description = "kill processes by name"
Output = ""
Tag = []
command = "killall <name>"
[[Snippets]]
Description = "run desktop file"
Output = ""
Tag = ["kde"]
command = "kioclient exec <desktop>"
[[Snippets]]
Description = "show last login"
Output = ""
Tag = []
command = "last"
[[Snippets]]
Description = "list shared libraries required by program"
Output = ""
Tag = []
command = "ldd <filename>"
[[Snippets]]
Description = "view xorg logs"
Output = ""
Tag = []
command = "less ~/.local/share/xorg/Xorg.1.log"
[[Snippets]]
Description = "list files in one column"
Output = ""
Tag = []
command = "ls -1"
[[Snippets]]
Description = "create soft link"
Output = ""
Tag = ["filesystem"]
command = "ln -s <target> <link_name>"
[[Snippets]]
Description = "generate locales from /etc/locale.gen"
Output = ""
Tag = []
command = "locale-gen"
[[Snippets]]
Description = "show or change system locale"
Output = ""
Tag = []
command = "localectl"
[[Snippets]]
Description = "find files by filename"
Output = ""
Tag = ["filesystem"]
command = "locate <filename>"
[[Snippets]]
Description = "list current sessions"
Output = ""
Tag = ["systemd"]
command = "loginctl"
[[Snippets]]
Description = "show session type"
Output = ""
Tag = ["systemd"]
command = "loginctl show-session <SESSION-ID> -p Type"
[[Snippets]]
Description = "recursive directory listing"
Output = ""
Tag = ["filesystem"]
command = "ls -R <dir>"
[[Snippets]]
Description = "sort by file size"
Output = ""
Tag = ["filesystem"]
command = "ls -S"
[[Snippets]]
Description = "sort by extension"
Output = ""
Tag = ["filesystem"]
command = "ls -X"
[[Snippets]]
Description = "ls by date"
Output = ""
Tag = ["filesystem"]
command = "ls -alt"
[[Snippets]]
Description = "list by file size"
Output = ""
Tag = ["filesystem"]
command = "ls -s"
[[Snippets]]
Description = "count files"
Output = ""
Tag = []
command = "ls | wc -l"
[[Snippets]]
Description = "list attributes"
Output = ""
Tag = []
command = "lsattr <filename>"
[[Snippets]]
Description = "list block devices"
Output = ""
Tag = ["filesystem"]
command = "lsblk"
[[Snippets]]
Description = "check system byte order"
Output = ""
Tag = []
command = "lscpu | grep 'Byte Order'"
[[Snippets]]
Description = "list loaded modules"
Output = ""
Tag = ["system"]
command = "lsmod"
[[Snippets]]
Description = "list all open files"
Output = ""
Tag = ["system"]
command = "lsof"
[[Snippets]]
Description = "list all network connections"
Output = ""
Tag = ["system"]
command = "lsof -i"
[[Snippets]]
Description = "find process running a specific port"
Output = ""
Tag = ["system"]
command = "lsof -i :<port>"
[[Snippets]]
Description = "list open files by process"
Output = ""
Tag = []
command = "lsof -p <pid>"
[[Snippets]]
Description = "list open files by user"
Output = ""
Tag = []
command = "lsof -u <username>"
[[Snippets]]
Description = "list connected PCI devices"
Output = ""
Tag = []
command = "lspci"
[[Snippets]]
Description = "list of network cards"
Output = ""
Tag = []
command = "lspci -nnk | grep -iA3 net"
[[Snippets]]
Description = "show device information"
Output = ""
Tag = ["hardware", "pci-e"]
command = "lspci -s <pci-id>"
[[Snippets]]
Description = "GPU BusID"
Output = ""
Tag = []
command = "lspci -vnnn | grep VGA"
[[Snippets]]
Description = "show graphics card(s)"
Output = ""
Tag = ["hardware", "video", "pci-e"]
command = "lspci | grep VGA"
[[Snippets]]
Description = "list usb devices"
Output = ""
Tag = []
command = "lsusb"
[[Snippets]]
Description = "create snapshot"
Output = ""
Tag = ["lvm", "filesystem"]
command = "lvcreate -s -n <snapshot_name> -L <size> <logical_volume>"
[[Snippets]]
Description = "list logical volumes"
Output = ""
Tag = ["lvm", "filesystem"]
command = "lvs"
[[Snippets]]
Description = "authenticate with .netrc file"
Output = ""
Tag = []
command = "machine <extractor> login <username> password <password>"
[[Snippets]]
Description = "convert image to another format"
Output = ""
Tag = ["graphics"]
command = "magick <src> <dst>"
[[Snippets]]
Description = "install pkgbuild"
Output = ""
Tag = ["system"]
command = "makepkg -si"
[[Snippets]]
Description = "calculate md5 check sum"
Output = ""
Tag = []
command = "md5sum <filename>"
[[Snippets]]
Description = "list available plugins"
Output = ""
Tag = ["editor"]
command = "micro --plugin available"
[[Snippets]]
Description = "clean config"
Output = ""
Tag = []
command = "micro -clean"
[[Snippets]]
Description = "show all options"
Output = ""
Tag = []
command = "micro -options"
[[Snippets]]
Description = "install plugin"
Output = ""
Tag = ["editor"]
command = "micro -plugin install <plugin>"
[[Snippets]]
Description = "list installed plugins"
Output = ""
Tag = []
command = "micro -plugin list"
[[Snippets]]
Description = "uninstall plugin"
Output = ""
Tag = []
command = "micro -plugin remove <plugin>"
[[Snippets]]
Description = "create directory with permissions"
Output = ""
Tag = []
command = "mkdir -m <ugo> <dir>"
[[Snippets]]
Description = "make named pipe"
Output = ""
Tag = []
command = "mkfifo <filename>"
[[Snippets]]
Description = "make filesystem"
Output = ""
Tag = []
command = "mkfs.<fstype> <device>"
[[Snippets]]
Description = "create a temporary file"
Output = ""
Tag = ["filesystem"]
command = "mktemp"
[[Snippets]]
Description = "create a temporary directory"
Output = ""
Tag = ["filesystem"]
command = "mktemp -d"
[[Snippets]]
Description = "information about a module"
Output = ""
Tag = []
command = "modinfo <module>"
[[Snippets]]
Description = "output contents with filenames"
Output = ""
Tag = []
command = "more * | cat"
[[Snippets]]
Description = "mount a folder into the ram"
Output = ""
Tag = []
command = "mount -t tmpfs -o size=1G tmpfs <dest>"
[[Snippets]]
Description = "generate .mo file with .po file"
Output = ""
Tag = ["localization"]
command = "msgfmt -o <output> <input>"
[[Snippets]]
Description = "move or rename file"
Output = ""
Tag = ["filesystem"]
command = "mv <src> <dst>"
[[Snippets]]
Description = "move audio from downloads to music"
Output = ""
Tag = []
command = "mv ~/Downloads/**/*.mp3 ~/Music"
[[Snippets]]
Description = "connect to database"
Output = ""
Tag = []
command = "mysql -h <host> -u <user> -p<password> <database>"
[[Snippets]]
Description = "run sql query"
Output = ""
Tag = []
command = "mysql <options> -e \"<statement>\""
[[Snippets]]
Description = "dump mysql database"
Output = ""
Tag = []
command = "mysqldump -h<hostname> -u<user> -p<password> <database> > <output>"
[[Snippets]]
Description = "scan ports"
Output = ""
Tag = ["network"]
command = "naabu -p - -host <host>"
[[Snippets]]
Description = "quit nautilus"
Output = ""
Tag = []
command = "nautilus -q"
[[Snippets]]
Description = "search cheatsheets"
Output = ""
Tag = []
command = "navi"
[[Snippets]]
Description = "search cht.sh cheats"
Output = ""
Tag = []
command = "navi --cheatsh docker"
[[Snippets]]
Description = "search tldr cheats"
Output = ""
Tag = []
command = "navi --tldr docker"
[[Snippets]]
Description = "disk usage analyzer"
Output = ""
Tag = ["du"]
command = "ncdu"
[[Snippets]]
Description = "upgrade packages"
Output = ""
Tag = ["npm,", "node"]
command = "ncu -u"
[[Snippets]]
Description = "docker-compl cli for containerd"
Output = ""
Tag = []
command = "nerdctl"
[[Snippets]]
Description = "list listen ports"
Output = ""
Tag = ["deprcated"]
command = "netstat -tulpn | grep LISTEN"
[[Snippets]]
Description = "searching network packets like Unix grep"
Output = ""
Tag = []
command = "ngrep"
[[Snippets]]
Description = "capture http traffic"
Output = ""
Tag = []
command = "ngrep -W byline port 80"
[[Snippets]]
Description = "expose a local service to the internet"
Output = ""
Tag = []
command = "ngrok http 3000"
[[Snippets]]
Description = "run command with a given nice value maximum priority is -20 minimum is 19"
Output = ""
Tag = []
command = "nice -n <niceness-value> <command args>"
[[Snippets]]
Description = "number the lines"
Output = ""
Tag = []
command = "nl"
[[Snippets]]
Description = "displays the network usage on the system"
Output = ""
Tag = []
command = "nload"
[[Snippets]]
Description = "find devices connected to your network"
Output = ""
Tag = []
command = "nmap -sn 192.168.0.0/24"
[[Snippets]]
Description = "list network connections"
Output = ""
Tag = ["network manager"]
command = "nmcli connection show"
[[Snippets]]
Description = "connect to wifi network"
Output = ""
Tag = ["NetworkManager"]
command = "nmcli device wifi connect <sid> password <password>"
[[Snippets]]
Description = "list wifi networks"
Output = ""
Tag = ["NetworkManager"]
command = "nmcli device wifi list"
[[Snippets]]
Description = "make the process ignore hangup"
Output = ""
Tag = []
command = "nohup -p <pid>"
[[Snippets]]
Description = "start a process in background"
Output = ""
Tag = []
command = "nohup <command> &"
[[Snippets]]
Description = "run python idle"
Output = ""
Tag = []
command = "nohup idle &"
[[Snippets]]
Description = "execuatble path"
Output = ""
Tag = ["node.js"]
command = "npm bin"
[[Snippets]]
Description = "set production mode"
Output = ""
Tag = ["node.js"]
command = "npm config set -g production true"
[[Snippets]]
Description = "install package globally"
Output = ""
Tag = ["node.js"]
command = "npm install -g pyright"
[[Snippets]]
Description = "create a symlink in the global folder {prefix}/lib/node_modules/<package>"
Output = ""
Tag = []
command = "npm link"
[[Snippets]]
Description = "show package versions"
Output = ""
Tag = []
command = "npm list <package>"
[[Snippets]]
Description = "list outdated packages"
Output = ""
Tag = []
command = "npm outdated"
[[Snippets]]
Description = "update all dependencies"
Output = ""
Tag = []
command = "npm update"
[[Snippets]]
Description = "update a package"
Output = ""
Tag = []
command = "npm update <package>"
[[Snippets]]
Description = "number of cpu cores"
Output = ""
Tag = ["system", "hardware"]
command = "nproc --all"
[[Snippets]]
Description = "execute local binary"
Output = ""
Tag = ["node.js"]
command = "npx"
[[Snippets]]
Description = "create new vue application"
Output = ""
Tag = ["node.js"]
command = "npx @vue/cli create <appName>"
[[Snippets]]
Description = "create new nuxt app"
Output = ""
Tag = []
command = "npx create-nuxt-app <project-name>"
[[Snippets]]
Description = "download github repo"
Output = ""
Tag = []
command = "npx degit <username>/<repo>"
[[Snippets]]
Description = "unpack .wpress"
Output = ""
Tag = ["wordpress"]
command = "npx wpress-extract <filename>.wpress"
[[Snippets]]
Description = "name server lookup"
Output = ""
Tag = []
command = "nslookup <host>"
[[Snippets]]
Description = "fix corrupt ntfs partition"
Output = ""
Tag = ["filesystem"]
command = "ntfsfix <deivice>"
[[Snippets]]
Description = "Fast and customisable vulnerability scanner based on simple YAML based DSL"
Output = ""
Tag = []
command = "nuclei"
[[Snippets]]
Description = "scan vuln"
Output = ""
Tag = ["discover"]
command = "nuclei"
[[Snippets]]
Description = "human readable size"
Output = ""
Tag = []
command = "numfmt --to=iec-i"
[[Snippets]]
Description = "nvidia gpu info"
Output = ""
Tag = []
command = "nvidia-xconfig --query-gpu-info"
[[Snippets]]
Description = "top for nvidia n amd gpus"
Output = ""
Tag = ["monitoring"]
command = "nvtop"
[[Snippets]]
Description = "disassemble a binary execuatbale"
Output = ""
Tag = []
command = "objdump -d <file>"
[[Snippets]]
Description = "random string of 16 hexdecimal digits 32 characters length"
Output = ""
Tag = []
command = "openssl rand -hex 16"
[[Snippets]]
Description = "random N bytes"
Output = ""
Tag = []
command = "openssl rand <N>"
[[Snippets]]
Description = "switch to nvidia"
Output = ""
Tag = []
command = "optimus-manager --no-confirm --switch nvidia"
[[Snippets]]
Description = "pacman logs"
Output = ""
Tag = []
command = "paclog"
[[Snippets]]
Description = "tui pacman search tool"
Output = ""
Tag = []
command = "pacseek"
[[Snippets]]
Description = "pulse audio controller info"
Output = ""
Tag = []
command = "pactl -- info"
[[Snippets]]
Description = "mute/unmute"
Output = ""
Tag = ["sound", "pulse"]
command = "pactl -- set-sink-mute 0 toggle"
[[Snippets]]
Description = "volume up"
Output = ""
Tag = ["sound", "pulse"]
command = "pactl -- set-sink-volume @DEFAULT_SINK@ +10%"
[[Snippets]]
Description = "volume down"
Output = ""
Tag = ["sound", "pulse"]
command = "pactl -- set-sink-volume @DEFAULT_SINK@ -10%"
[[Snippets]]
Description = "show reverese dependency tree"
Output = ""
Tag = []
command = "pactree -r <package>"
[[Snippets]]
Description = "show dependency tree"
Output = ""
Tag = ["pacman"]
command = "pactree <package>"
[[Snippets]]
Description = "run multiple jobs in parallel"
Output = ""
Tag = []
command = "parallel -j <num> -- '<command>'"
[[Snippets]]
Description = "copy password to the clipboard"
Output = ""
Tag = ["password manager"]
command = "pass -c <entry>"
[[Snippets]]
Description = "edit password"
Output = ""
Tag = ["password manager"]
command = "pass edit <entry>"
[[Snippets]]
Description = "generate password"
Output = ""
Tag = ["password manager"]
command = "pass generate <entry>"
[[Snippets]]
Description = "input password"
Output = ""
Tag = ["password manager"]
command = "pass insert <entry>"
[[Snippets]]
Description = "rename entry"
Output = ""
Tag = ["password manager"]
command = "pass mv <old-name> <new-name>"
[[Snippets]]
Description = "remove password"
Output = ""
Tag = ["password manager"]
command = "pass rm <entry>"
[[Snippets]]
Description = "search entries"
Output = ""
Tag = ["password manager"]
command = "pass search <s>"
[[Snippets]]
Description = "print password"
Output = ""
Tag = ["password manager"]
command = "pass show <entry>"
[[Snippets]]
Description = "change password"
Output = ""
Tag = []
command = "passwd"
[[Snippets]]
Description = "make password blank"
Output = ""
Tag = []
command = "passwd -d"
[[Snippets]]
Description = "lock the password"
Output = ""
Tag = []
command = "passwd -l <username>"
[[Snippets]]
Description = "merge files line by line"
Output = ""
Tag = []
command = "paste -d '\t' <fil1> <fil2>"
[[Snippets]]
Description = "convert pdf to images"
Output = ""
Tag = []
command = "pdftoppm -jpeg <pdffile> images/"
[[Snippets]]
Description = "rename files to lowercase"
Output = ""
Tag = []
command = "perl-rename -f 'y/A-Z/a-z/'"
[[Snippets]]
Description = "edit snippets"
Output = ""
Tag = []
command = "pet edit"
[[Snippets]]
Description = "list snippets"
Output = ""
Tag = []
command = "pet list"
[[Snippets]]
Description = "save previous command as snippet"
Output = ""
Tag = []
command = "pet new \"!!\""
[[Snippets]]
Description = "sync snippets"
Output = ""
Tag = []
command = "pet sync"
[[Snippets]]
Description = "backup postgresql database"
Output = ""
Tag = []
command = "pg_dump -h <host> -U <user> -v <dbname> > <output>"
[[Snippets]]
Description = "restore postrgesql database"
Output = ""
Tag = []
command = "pg_restore -h <host> -U <user> -d <dbname> -v <input>"
[[Snippets]]
Description = "command line interface for PostgreSQL"
Output = ""
Tag = []
command = "pgcli"
[[Snippets]]
Description = "see pidof"
Output = ""
Tag = []
command = "pgrep <program>"
[[Snippets]]
Description = "start local php server"
Output = ""
Tag = []
command = "php -S localhost:8000"
[[Snippets]]
Description = "find out process ids"
Output = ""
Tag = []
command = "pidof <program>"
[[Snippets]]
Description = "ping test"
Output = ""
Tag = []
command = "ping -c5 ya.ru"
[[Snippets]]
Description = "generate a requirements file"
Output = ""
Tag = ["python"]
command = "pip freeze > requirements.txt"
[[Snippets]]
Description = "uninstall all packages"
Output = ""
Tag = []
command = "pip freeze | xargs pip uninstall -y"
[[Snippets]]
Description = "update package"
Output = ""
Tag = []
command = "pip install -U <package>"
[[Snippets]]
Description = "upgrade package"
Output = ""
Tag = ["python"]
command = "pip install -U <package>"
[[Snippets]]
Description = "install packages from a requirements file"
Output = ""
Tag = ["python"]
command = "pip install -r requirements.txt"
[[Snippets]]
Description = "list installed packages"
Output = ""
Tag = ["python"]
command = "pip list"
[[Snippets]]
Description = "show module or package details"
Output = ""
Tag = ["python"]
command = "pip show <name>"
[[Snippets]]
Description = "show package version"
Output = ""
Tag = []
command = "pip show <package>"
[[Snippets]]
Description = "install python dev package into virtual environment"
Output = ""
Tag = []
command = "pipenv install --dev"
[[Snippets]]
Description = "pipenv: create or/and activate virtual environment"
Output = ""
Tag = []
command = "pipenv shell"
[[Snippets]]
Description = "install package in virtual environment and make executables available"
Output = ""
Tag = ["python"]
command = "pipx install <package>"
[[Snippets]]
Description = "install from git"
Output = ""
Tag = []
command = "pipx install git+https://github.com/psf/black.git@ce14fa8b497bae2b50ec48b3bd7022573a59cdb1"
[[Snippets]]
Description = "list available executables"
Output = ""
Tag = ["python"]
command = "pipx list"
[[Snippets]]
Description = "update all packages"
Output = ""
Tag = []
command = "pipx upgrade-all"
[[Snippets]]
Description = "kill processes by a given pattern"
Output = ""
Tag = []
command = "pkill"
[[Snippets]]
Description = "add development dependency"
Output = ""
Tag = ["python"]
command = "poetry add -D <package>"
[[Snippets]]
Description = "add development dependencies"
Output = ""
Tag = []
command = "poetry add -D <package>"
[[Snippets]]
Description = "add dependency"
Output = ""
Tag = ["python"]
command = "poetry add <package>"
[[Snippets]]
Description = "configure project settings"
Output = ""
Tag = ["python"]
command = "poetry config --local <key> <value>"
[[Snippets]]
Description = "configure virtual environment creation in a project directory"
Output = ""
Tag = []
command = "poetry config virtualenvs.in-project true"
[[Snippets]]
Description = "print environment path"
Output = ""
Tag = ["python"]
command = "poetry env info --path"
[[Snippets]]
Description = "show current environment"
Output = ""
Tag = []
command = "poetry env list"
[[Snippets]]
Description = "delete virtual environment"
Output = ""
Tag = []
command = "poetry env remove <name>"
[[Snippets]]
Description = "switch environment"
Output = ""
Tag = ["python"]
command = "poetry env set <executable>"
[[Snippets]]
Description = "change python version"
Output = ""
Tag = []
command = "poetry env use <executable>"
[[Snippets]]
Description = "poetry generate requirements.txt"
Output = ""
Tag = []
command = "poetry export -f requirements.txt -o requirements.txt --without-hashes"
[[Snippets]]
Description = "create env in current dir"
Output = ""
Tag = ["python"]
command = "poetry init"
[[Snippets]]
Description = "install dependencies"
Output = ""
Tag = ["python"]
command = "poetry install"
[[Snippets]]
Description = "list poetry commands"
Output = ""
Tag = []
command = "poetry list"
[[Snippets]]
Description = "will create directory and env"
Output = ""
Tag = ["python"]
command = "poetry new"
[[Snippets]]
Description = "build and upload package"
Output = ""
Tag = ["python,", "wheel"]
command = "poetry publish --build"
[[Snippets]]
Description = "remove dependency"
Output = ""
Tag = ["python"]
command = "poetry remove <package>"
[[Snippets]]
Description = "create a subshell within the virtual environment"
Output = ""
Tag = ["python"]
command = "poetry shell"
[[Snippets]]
Description = "display the current and the latest version of the packages installed in your virtual env"
Output = ""
Tag = []
command = "poetry show --latest"
[[Snippets]]
Description = "Pop the directory out of the stack and change directory to it"
Output = ""
Tag = []
command = "popd"
[[Snippets]]
Description = "format sources with prettier"
Output = ""
Tag = []
command = "prettier \"./src/**/*.vue\" --write"
[[Snippets]]
Description = "run with nvidia"
Output = ""
Tag = []
command = "prime-run <program>"
[[Snippets]]
Description = "Print all or part of environment"
Output = ""
Tag = []
command = "printenv"
[[Snippets]]
Description = "repeat string n times"
Output = ""
Tag = []
command = "printf '=%.0s' % {1..100}"
[[Snippets]]
Description = "list prompt themes"
Output = ""
Tag = []
command = "prompt -l"
[[Snippets]]
Description = "preview prompt themes"
Output = ""
Tag = []
command = "prompt -p"
[[Snippets]]
Description = "set immediately prompt theme"
Output = ""
Tag = []
command = "prompt <theme>"
[[Snippets]]
Description = "restore prompt theme"
Output = ""
Tag = []
command = "prompt restore"
[[Snippets]]
Description = "route traffic through a proxy chain"
Output = ""
Tag = ["networking,", "anonymity"]
command = "proxychains -q <command>"
[[Snippets]]
Description = "output pid of specific process"
Output = ""
Tag = []
command = "ps -C <command> -o pid"
[[Snippets]]
Description = "display all currently running processes in full format"
Output = ""
Tag = []
command = "ps -ef"
[[Snippets]]
Description = "find out process owner"
Output = ""
Tag = []
command = "ps -o user= -p <PID>"
[[Snippets]]
Description = "find out process name by pid"
Output = ""
Tag = []
command = "ps -p <pid> -o comm="
[[Snippets]]
Description = "show all processes"
Output = ""
Tag = []
command = "ps aux"
[[Snippets]]
Description = "list all ssh connections"
Output = ""
Tag = []
command = "ps ax | grep sshd"
[[Snippets]]
Description = "see all processes with their nice level"
Output = ""
Tag = []
command = "ps axl"
[[Snippets]]
Description = "preview"
Output = ""
Tag = ["profile sync"]
command = "psd p"
[[Snippets]]
Description = "import sql dump into posgresql database"
Output = ""
Tag = []
command = "psql -h <hostname> -d <dbname> -U <username> -f <dump.sql>"
[[Snippets]]
Description = "like ps but shows process tree"
Output = ""
Tag = []
command = "pstree"
[[Snippets]]
Description = "Push the directory into the stack"
Output = ""
Tag = []
command = "pushd <path>"
[[Snippets]]
Description = "pipe viewer: monitor the progress of data that is being sent through a pipe"
Output = ""
Tag = []
command = "pv"
[[Snippets]]
Description = "monitor the progress of data through a pipe"
Output = ""
Tag = []
command = "pv <file> | <command>"
[[Snippets]]
Description = "move data to device"
Output = ""
Tag = ["lvm"]
command = "pvmove <device>"
[[Snippets]]
Description = "move data from one device to another"
Output = ""
Tag = ["lvm"]
command = "pvmove <source> <target>"
[[Snippets]]
Description = "list physical volumes"
Output = ""
Tag = ["lvm"]
command = "pvs"
[[Snippets]]
Description = "show physical volume usage"
Output = ""
Tag = ["lvm"]
command = "pvs -o+pv_used"
[[Snippets]]
Description = "print working directory"
Output = ""
Tag = []
command = "pwd"
[[Snippets]]
Description = "generate random password"
Output = ""
Tag = []
command = "pwgen -cnsy 40 1"
[[Snippets]]
Description = "minify file"
Output = ""
Tag = ["python"]
command = "pyminify <filename>"
[[Snippets]]
Description = "run tests"
Output = ""
Tag = ["python"]
command = "pytest -s"
[[Snippets]]
Description = "add new jupyter kernel"
Output = ""
Tag = []
command = "python -m ipykernel install --user --name <name>"
[[Snippets]]
Description = "pretty print json"
Output = ""
Tag = []
command = "python -m json.tool --indent 2 --no-ensure-ascii"
[[Snippets]]
Description = "show requests package versions"
Output = ""
Tag = []
command = "python -m requests.help"
[[Snippets]]
Description = "create a virtual environment with system-wide packages"
Output = ""
Tag = []
command = "python -m venv --system-site-packages .venv"
[[Snippets]]
Description = "create virtual environment"
Output = ""
Tag = ["python"]
command = "python -m venv <path>"
[[Snippets]]
Description = "skip a migration"
Output = ""
Tag = ["django"]
command = "python manage.py migrate <app> <name> --fake"
[[Snippets]]
Description = "serve static files"
Output = ""
Tag = []
command = "python3 -m http.server 8000"
[[Snippets]]
Description = "run in a ranger file manager"
Output = ""
Tag = []
command = "ranger"
[[Snippets]]
Description = "update pacman mirrors"
Output = ""
Tag = []
command = "rate-arch-mirrors --protocol https --entry-country RU | sudo tee /etc/pacman.d/mirrorlist"
[[Snippets]]
Description = "sort mirrors by speed"
Output = ""
Tag = []
command = "rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist"
[[Snippets]]
Description = "copies /local/path to the remote"
Output = ""
Tag = ["cloud", "storage"]
command = "rclone copy /local/path remote:path"
[[Snippets]]
Description = "lists a remote"
Output = ""
Tag = ["cloud", "storage"]
command = "rclone ls remote:path"
[[Snippets]]
Description = "syncs /local/path to the remote"
Output = ""
Tag = ["cloud storage"]
command = "rclone sync -i /local/path remote:path"
[[Snippets]]
Description = "symbolic link destination"
Output = ""
Tag = []
command = "readlink -f <file>"
[[Snippets]]
Description = "builtin command is used to mark variables or functions as read-only"
Output = ""
Tag = []
command = "readonly"
[[Snippets]]
Description = "get the absolute path of a file"
Output = ""
Tag = []
command = "realpath <filename>"
[[Snippets]]
Description = "change file extensions"
Output = ""
Tag = []
command = "rename .ext .bak *.ext"
[[Snippets]]
Description = "change the sheduling priority of process"
Output = ""
Tag = []
command = "renice -n <niceness> -p <pid>"
[[Snippets]]
Description = "change the sheduling priority of process with a given name"
Output = ""
Tag = []
command = "renice -n <niceness> -u <name>"
[[Snippets]]
Description = "recursively search files by content"
Output = ""
Tag = ["ripgrep"]
command = "rg <pattern> <directory=.>"
[[Snippets]]
Description = "remove package download with \"go get\""
Output = ""
Tag = ["golang"]
command = "rm -r `go env GOPATH`/src/<package>"
[[Snippets]]
Description = "delete kde sessions"
Output = ""
Tag = []
command = "rm -r ~/.config/{session,ksmserverrc}"
[[Snippets]]
Description = "copy only new files"
Output = ""
Tag = []
command = "rsync -a -v --ignore-existing <src> <dst>"
[[Snippets]]
Description = "syncing files"
Output = ""
Tag = ["ssh"]
command = "rsync -ahv --delete <src> <dst>"
[[Snippets]]
Description = "backup root"
Output = ""
Tag = []
command = "rsync -av --exclude={\"/dev/*\",\"/proc/*\",\"/sys/*\",\"/tmp/*\",\"/run/*\",\"/mnt/*\",\"/media/*\",\"/lost+found\"} / /mnt"
[[Snippets]]
Description = "ya cloc"
Output = ""
Tag = []
command = "scc"
[[Snippets]]
Description = "download a file from server"
Output = ""
Tag = []
command = "scp <user>@<host>:<dst> <src>"
[[Snippets]]
Description = "record terminal session"
Output = ""
Tag = []
command = "script"
[[Snippets]]
Description = "find & replace"
Output = ""
Tag = ["sed"]
command = "sd"
[[Snippets]]
Description = "delete line"
Output = ""
Tag = []
command = "sed -i '/<search>/d' <filename>"
[[Snippets]]
Description = "truncate file by lines"
Output = ""
Tag = []
command = "sed -i '<size>,$ d' <filename>"
[[Snippets]]
Description = "print Nth line"
Output = ""
Tag = []
command = "sed -n <num>p"
[[Snippets]]
Description = "remove empty lines"
Output = ""
Tag = []
command = "sed -r '/^\\s*$/d'"
[[Snippets]]
Description = "delete lines matching pattern"
Output = ""
Tag = []
command = "sed -ri '/<pattern>/d' <filename>"
[[Snippets]]
Description = "delete all lines longer than 2048 characters"
Output = ""
Tag = []
command = "sed -ri '/^.\\{2049,\\}/d' <filename>"
[[Snippets]]
Description = "send email with attachment"
Output = ""
Tag = []
command = "sendemail -t \"<email>\" -m \"<message>\" -a <attachment>"
[[Snippets]]
Description = "List the name and value of each shell variable"
Output = ""
Tag = []
command = "set"
[[Snippets]]
Description = "remove capability"
Output = ""
Tag = ["priveleged"]
command = "setcap -r <capability> <filename>"
[[Snippets]]
Description = "set capabilities"
Output = ""
Tag = ["priveleged"]
command = "setcap <capabilities> <filename>"
[[Snippets]]
Description = "set or remove access ACL permissions"
Output = ""
Tag = []
command = "setfacl"
[[Snippets]]
Description = "set or show options"
Output = ""
Tag = ["zsh"]
command = "setopt"
[[Snippets]]
Description = "list options"
Output = ""
Tag = ["zsh"]
command = "setopt"
[[Snippets]]
Description = "set an option"
Output = ""
Tag = ["zsh"]
command = "setopt <option>"
[[Snippets]]
Description = "shuffle array"
Output = ""
Tag = []
command = "shuf -e \"${arr[@]}\""
[[Snippets]]
Description = "select random lines from a file"
Output = ""
Tag = []
command = "shuf -n <number> <filename>"
[[Snippets]]
Description = "shutdown immediately (-h=halt)"
Output = ""
Tag = []
command = "shutdown -h now"
[[Snippets]]
Description = "list snapper configurations"
Output = ""
Tag = []
command = "snapper list-configs"
[[Snippets]]
Description = "sort by hureadable size"
Output = ""
Tag = []
command = "sort -h"
[[Snippets]]
Description = "sort by N column. use `-t` for delimiter"
Output = ""
Tag = []
command = "sort -k<N>"
[[Snippets]]
Description = "natural sort order"
Output = ""
Tag = []
command = "sort -n"
[[Snippets]]
Description = "count unique lines"
Output = ""
Tag = []
command = "sort -n <filename> | uniq -c"
[[Snippets]]
Description = "reverse sort order"
Output = ""
Tag = []
command = "sort -r"
[[Snippets]]
Description = "find and count duplicates"
Output = ""
Tag = []
command = "sort <file> | uniq -cd"
[[Snippets]]
Description = "sort lines"
Output = ""
Tag = []
command = "sort <filename>"
[[Snippets]]
Description = "split a large file"
Output = ""
Tag = []
command = "split -d -b 2G <filename> <prefix>"
[[Snippets]]
Description = "open locked database"
Output = ""
Tag = []
command = "sqlite3 'file://<filename>?immutable=1'"
[[Snippets]]
Description = "ssh socks proxy"
Output = ""
Tag = []
command = "ssh -f -N -D 1080 <address>"
[[Snippets]]
Description = "Running SSH port forwarding in the background"
Output = ""
Tag = ["tunnel"]
command = "ssh -fNT -L <local_port>:<destination>:<destination_port> <user>@<host>"
[[Snippets]]
Description = "connect to a ssh server"
Output = ""
Tag = []
command = "ssh <user>@<host>"
[[Snippets]]
Description = "copy the to a server"
Output = ""
Tag = []
command = "ssh-copy-id -i ~/.ssh/id_rsa.pub <user>@<host>"
[[Snippets]]
Description = "remove a entry from a known_hosts"
Output = ""
Tag = []
command = "ssh-keygen -R <hostname>"
[[Snippets]]
Description = "change ssh private key passphrase"
Output = ""
Tag = []
command = "ssh-keygen -p -P <oldpassword> -N <newpassword> -f ~/.ssh/id_rsa"
[[Snippets]]
Description = "remove passphrase from a ssh key"
Output = ""
Tag = []
command = "ssh-keygen -p -P <password> -N \"\" -f ~/.ssh/id_rsa"
[[Snippets]]
Description = "generate new a ssh key pair"
Output = ""
Tag = []
command = "ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -C \"<email>\""
[[Snippets]]
Description = "check passphrase"
Output = ""
Tag = []
command = "ssh-keygen -y -f <keyfile>"
[[Snippets]]
Description = "show octal file permissions"
Output = ""
Tag = []
command = "stat -c '%a' <filename>"
[[Snippets]]
Description = "Time Consumed in System Call"
Output = ""
Tag = []
command = "strace -T df -h"
[[Snippets]]
Description = "Trace Specific System Calls"
Output = ""
Tag = []
command = "strace -e open ls"
[[Snippets]]
Description = "capture all packets of a single process"
Output = ""
Tag = []
command = "strace -f -e trace=network -s 10000 -p <PID>"
[[Snippets]]
Description = "trace process system calls"
Output = ""
Tag = []
command = "strace -p <pid>"
[[Snippets]]
Description = "trace system calls"
Output = ""
Tag = []
command = "strace <command>"
[[Snippets]]
Description = "grep binary files"
Output = ""
Tag = []
command = "strings <filename> | grep <pattern>"
[[Snippets]]
Description = "find subdomains"
Output = ""
Tag = ["discovery"]
command = "subfinder"
[[Snippets]]
Description = "repeat last command with sudo"
Output = ""
Tag = []
command = "sudo !!"
[[Snippets]]
Description = "run multiple commands in sudo"
Output = ""
Tag = []
command = "sudo -- sh -c 'apt-get update && sudo apt-get -y upgrade'"
[[Snippets]]
Description = "connect to running container"
Output = ""
Tag = []
command = "sudo -E flatpak enter <instance> sh"
[[Snippets]]
Description = "sudo edit"
Output = ""
Tag = []
command = "sudo -e <filename>"
[[Snippets]]
Description = "run current shell as root"
Output = ""
Tag = []
command = "sudo -s"
[[Snippets]]
Description = "run command as another user"
Output = ""
Tag = []
command = "sudo -s -u <user> <command>"
[[Snippets]]
Description = "generate xorg.conf"
Output = ""
Tag = []
command = "sudo X -configure"
[[Snippets]]
Description = "list partitions with mountpoints"
Output = ""
Tag = []
command = "sudo blkid -o list"
[[Snippets]]
Description = "get block device size in sectors"
Output = ""
Tag = []
command = "sudo blockdev --getsize <device>"
[[Snippets]]
Description = "get block device size in bytes"
Output = ""
Tag = []
command = "sudo blockdev --getsize64 <device>"
[[Snippets]]
Description = "start blocking hosts"
Output = ""
Tag = []
command = "sudo blokator -a"
[[Snippets]]
Description = "sync hosts black list"
Output = ""
Tag = []
command = "sudo blokator -s"
[[Snippets]]
Description = "list boot loader entries"
Output = ""
Tag = ["systemd-boot"]
command = "sudo bootctl list"
[[Snippets]]
Description = "clear space cache"
Output = ""
Tag = []
command = "sudo btrfs check --clear-cache-space <version=v2> /dev/<device>"
[[Snippets]]
Description = "defragment and compress files"
Output = ""
Tag = []
command = "sudo btrfs fi defrag -r -v -czstd <mountpoint>"
[[Snippets]]
Description = "disk usage"
Output = ""
Tag = []
command = "sudo btrfs fi us "
[[Snippets]]
Description = "rename btrfs label"
Output = ""
Tag = ["btrfs"]
command = "sudo btrfs filesystem label <mountpoint> <newlabel>"
[[Snippets]]
Description = "resize btrfs filesystem"
Output = ""
Tag = []
command = "sudo btrfs filesystem resize max /"
[[Snippets]]
Description = "make btrfs snapshot writable"
Output = ""
Tag = []
command = "sudo btrfs prop set <snapshot> ro false"
[[Snippets]]
Description = "disable compression for a file"
Output = ""
Tag = []
command = "sudo btrfs property set <file> compression \"\""
[[Snippets]]
Description = "copy readonly snapshot to another btrfs file system"
Output = ""
Tag = []
command = "sudo btrfs send <snapshot> | sudo btrfs receive <destination>"
[[Snippets]]
Description = "create subvolume"
Output = ""
Tag = []
command = "sudo btrfs sub cr <name>"
[[Snippets]]
Description = "delete subvolume"
Output = ""
Tag = []
command = "sudo btrfs sub del <name>"
[[Snippets]]
Description = "list subvolumes"
Output = ""
Tag = []
command = "sudo btrfs sub li <mountpoint>"
[[Snippets]]
Description = "show information about a subvolume"
Output = ""
Tag = []
command = "sudo btrfs sub show <path>"
[[Snippets]]
Description = "create snapshot"
Output = ""
Tag = []
command = "sudo btrfs sub snap -r <mount> <name>"
[[Snippets]]
Description = "prints btrfs disk usage"
Output = ""
Tag = []
command = "sudo btrfs-du"
[[Snippets]]
Description = "change a group"
Output = ""
Tag = []
command = "sudo chgrp <group> <filename>"
[[Snippets]]
Description = "compression size"
Output = ""
Tag = []
command = "sudo compsize <filename>"
[[Snippets]]
Description = "check passphrase"
Output = ""
Tag = ["LUKS"]
command = "sudo cryptsetup --verbose open --test-passphrase <device>"
[[Snippets]]
Description = "resize encrypted device. without `-b`: all device size"
Output = ""
Tag = []
command = "sudo cryptsetup -b <size_in_bytes / luks_sector_size> resize <device>"
[[Snippets]]
Description = "close LUKS container"
Output = ""
Tag = []
command = "sudo cryptsetup close luks <dm_name>"
[[Snippets]]
Description = "change label for a luks container"
Output = ""
Tag = []
command = "sudo cryptsetup config --label <label> /dev/sda1"
[[Snippets]]
Description = "restore luks header backup"
Output = ""
Tag = []
command = "sudo cryptsetup luksHeaderRestore <device> --header-backup-file <filename>"
[[Snippets]]
Description = "open LUKS container"
Output = ""
Tag = []
command = "sudo cryptsetup open --type luks <device> <dm_name>"
[[Snippets]]
Description = "encrypt existsing filesystem"
Output = ""
Tag = ["luks"]
command = "sudo cryptsetup reencrypt --encrypt --reduce-device-size 16M /dev/sdaX"
[[Snippets]]
Description = "show basic iformation like offset, size"
Output = ""
Tag = ["luks"]
command = "sudo cryptsetup status <mapped_name>"
[[Snippets]]
Description = "update dconf database"
Output = ""
Tag = ["gnome"]
command = "sudo dconf update"
[[Snippets]]
Description = "write iso to usb"
Output = ""
Tag = []
command = "sudo dd if=<image> of=/dev/sdX bs=8M conv=fdatasync status=progress"
[[Snippets]]
Description = "show kernel error messages"
Output = ""
Tag = ["logs"]
command = "sudo dmesg -l err,warn"
[[Snippets]]
Description = "show ram info"
Output = ""
Tag = []
command = "sudo dmidecode --type 17"
[[Snippets]]
Description = "machine model name"
Output = ""
Tag = []
command = "sudo dmidecode -s system-product-name"
[[Snippets]]
Description = "machine serial number"
Output = ""
Tag = []
command = "sudo dmidecode -s system-serial-number"
[[Snippets]]
Description = "motherboard info"
Output = ""
Tag = []
command = "sudo dmidecode -t 2"
[[Snippets]]
Description = "show bios information"
Output = ""
Tag = []
command = "sudo dmidecode -t bios"
[[Snippets]]
Description = "list encrypted devices"
Output = ""
Tag = []
command = "sudo dmsetup ls --target crypt"
[[Snippets]]
Description = "dump the device mapping table"
Output = ""
Tag = []
command = "sudo dmsetup table <device_name>"
[[Snippets]]
Description = "downgrade arch package"
Output = ""
Tag = []
command = "sudo downgrade <package e.g. linux>"
[[Snippets]]
Description = "downgrade a package"
Output = ""
Tag = []
command = "sudo downgrade <package>"
[[Snippets]]
Description = "show ext2, ext3, ext4 partition label"
Output = ""
Tag = []
command = "sudo e2label <device>"
[[Snippets]]
Description = "change ext2, ext3, ext4 partition label"
Output = ""
Tag = []
command = "sudo e2label <device> <new-name>"
[[Snippets]]
Description = "boot another entry"
Output = ""
Tag = []
command = "sudo efibootmgr --bootnext 0004 && reboot"
[[Snippets]]
Description = "deactivate boot entry"
Output = ""
Tag = []
command = "sudo efibootmgr -b <bootnum> -A"
[[Snippets]]
Description = "delete boot entry"
Output = ""
Tag = []
command = "sudo efibootmgr -b <bootnum> -B"
[[Snippets]]
Description = "activate boot entry"
Output = ""
Tag = []
command = "sudo efibootmgr -b <bootnum> -a"
[[Snippets]]
Description = "add boot entry"
Output = ""
Tag = []
command = "sudo efibootmgr -c -d /dev/nvme0n1 -p 4 -L \"Linux Boot Manager\" -l '\\efi\\boot\\bootx64.efi'"
[[Snippets]]
Description = "set next boot"
Output = ""
Tag = []
command = "sudo efibootmgr -n 2001"
[[Snippets]]
Description = "change boot order"
Output = ""
Tag = []
command = "sudo efibootmgr -o"
[[Snippets]]
Description = "set environment variable"
Output = ""
Tag = []
command = "sudo flatpak override --system --env=GTK_IM_MODULE=ibus"
[[Snippets]]
Description = "clean repo/objects folder"
Output = ""
Tag = []
command = "sudo flatpak repair"
[[Snippets]]
Description = "repair filesystem"
Output = ""
Tag = []
command = "sudo fsck -y <device>"
[[Snippets]]
Description = "discard unused blocks"
Output = ""
Tag = []
command = "sudo fstrim -v <mountpoint>"
[[Snippets]]
Description = "delete user from group"
Output = "Removing user sergey from group wheel"
Tag = []
command = "sudo gpasswd --delete <user> <group>"
[[Snippets]]
Description = "set or update hostname"
Output = ""
Tag = []
command = "sudo hostnamectl set-hostname <hostname>"
[[Snippets]]
Description = "show disk i/o"
Output = ""
Tag = []
command = "sudo iotop -aoP"
[[Snippets]]
Description = "display i/o statistics of a specific process"
Output = ""
Tag = []
command = "sudo iotop -p <PID>"
[[Snippets]]
Description = ""
Output = ""
Tag = []
command = "sudo iptables -D <CHAIN> <NUMBER>"
[[Snippets]]
Description = "delete rule"
Output = ""
Tag = []
command = "sudo iptables -D <target> <num>"
[[Snippets]]
Description = "show rules with line numbers"
Output = ""
Tag = []
command = "sudo iptables -L --line-numbers"
[[Snippets]]
Description = "list all table rules"
Output = ""
Tag = []
command = "sudo iptables -L -v -n"
[[Snippets]]
Description = "list all rules"
Output = ""
Tag = []
command = "sudo iptables -L -v -n | more"
[[Snippets]]
Description = "mount partitions from an image file"
Output = ""
Tag = []
command = "sudo losetup --show -f -P <image>"
[[Snippets]]
Description = "detach loop device"
Output = ""
Tag = []
command = "sudo losetup -d /dev/loop0"
[[Snippets]]
Description = "Mount the file container as a loopback device"
Output = ""
Tag = []
command = "sudo losetup -f --show <filename>"
[[Snippets]]
Description = "Find orphaned files not owned by any packages"
Output = ""
Tag = []
command = "sudo lostfiles"
[[Snippets]]
Description = "find and delete selected files that are not owned by any package"
Output = ""
Tag = []
command = "sudo lostfiles | fzf -m | xargs -I '{}' sudo rm -r {}"
[[Snippets]]
Description = "check listening ports"
Output = ""
Tag = []
command = "sudo lsof -nP -iTCP -sTCP:LISTEN"
[[Snippets]]
Description = "create logical partition on volume group"
Output = ""
Tag = []
command = "sudo lvcreate -L <size>G <vg>"
[[Snippets]]
Description = "create striped volume"
Output = ""
Tag = ["lvm"]
command = "sudo lvcreate -n <name> -L <size> -i <num_stripes> <vg>"
[[Snippets]]
Description = "extend logical volume"
Output = ""
Tag = ["lvm"]
command = "sudo lvextend -l+<size> /dev/<vg>/<lv>"
[[Snippets]]
Description = "shrink logical volume"
Output = ""
Tag = ["lvm"]
command = "sudo lvextend -l-<size> /dev/<vg>/<lv>"
[[Snippets]]
Description = "display information about logical volumes"
Output = ""
Tag = []
command = "sudo lvm lvdisplay"
[[Snippets]]
Description = "create lvm filesystem"
Output = ""
Tag = []
command = "sudo lvm pvcreate <device>"
[[Snippets]]
Description = "create lvm volume group"
Output = ""
Tag = []
command = "sudo lvm vgcreate <vg> <device>"
[[Snippets]]
Description = "rename logical volume"
Output = ""
Tag = ["lvm"]
command = "sudo lvrename <vg> <old> <new>"
[[Snippets]]
Description = "scan ports"
Output = ""
Tag = []
command = "sudo masscan --top-ports 100 --output-format <binary|grepable|json|list|xml> --output-filename <filename> <ip/range>"
[[Snippets]]
Description = "create ntfs filesystem"
Output = ""
Tag = []
command = "sudo mkfs.ntfs -f -L <label> <device>"
[[Snippets]]
Description = "build initramfs"
Output = ""
Tag = []
command = "sudo mkinitcpio -p linux"
[[Snippets]]
Description = "unload a kernel module"
Output = ""
Tag = []
command = "sudo modprobe -r <module>"
[[Snippets]]
Description = "load a kernel module"
Output = ""
Tag = []
command = "sudo modprobe <module>"
[[Snippets]]
Description = "mount/remount all filesystems"
Output = ""
Tag = []
command = "sudo mount -a"
[[Snippets]]
Description = "set compression"
Output = ""
Tag = ["filesystem", "btrfs"]
command = "sudo mount -o compress-force=<compression> <device> <mountpoint>"
[[Snippets]]
Description = "mount iso image"
Output = ""
Tag = []
command = "sudo mount -o loop <image> <mountpoint>"
[[Snippets]]
Description = "remount"
Output = ""
Tag = []
command = "sudo mount -o remount <mountpoint>"
[[Snippets]]
Description = "remount a filesystem as writable"
Output = ""
Tag = []
command = "sudo mount -o remount,rw <mountpoint>"
[[Snippets]]
Description = "remount a filesystem as read/write"
Output = ""
Tag = []
command = "sudo mount -o remount,rw <target>"
[[Snippets]]
Description = "mount btrfs"
Output = ""
Tag = []
command = "sudo mount -o subvol=<subvol> <device> <mountpoint>"
[[Snippets]]
Description = "eCryptfs: encrypt a directory"
Output = ""
Tag = ["encryption"]
command = "sudo mount -t ecryptfs <encrypted_directory> <decrypted_directory>"
[[Snippets]]
Description = "mount hibernated ntfs volume"
Output = ""
Tag = []
command = "sudo mount -t ntfs-3g -o remove_hiberfile <device> <mountpoint>"
[[Snippets]]
Description = "save ntfs filesystem to a special format"
Output = ""
Tag = []
command = "sudo ntfsclone <device> -s -t -O <image>"
[[Snippets]]
Description = "restore nfts from a special format"
Output = ""
Tag = []
command = "sudo ntfsclone <image> -t -r -O <device>"
[[Snippets]]
Description = "clone ntfs partition"
Output = ""
Tag = []
command = "sudo ntfsclone <source> -t -O <target>"
[[Snippets]]
Description = "preallocate disk space for file at ntfs volume"
Output = ""
Tag = []
command = "sudo ntfsfallocate -l <length> <device> <file>"
[[Snippets]]
Description = "update ntfs label"
Output = ""
Tag = []
command = "sudo ntfslabel /dev/nvme0n1p2 disk_c"
[[Snippets]]
Description = "create gpt partition table"
Output = ""
Tag = []
command = "sudo parted <device> mklabel gpt"
[[Snippets]]
Description = "create new partition"
Output = ""
Tag = []
command = "sudo parted <device> mkpart <label> <start=2048> <end=100%>"
[[Snippets]]
Description = "delete partition"
Output = ""
Tag = []
command = "sudo parted <device> rm <partnum>"
[[Snippets]]
Description = "restart X server"
Output = ""
Tag = ["X.Org"]
command = "sudo pkill X"
[[Snippets]]
Description = "better ps?"
Output = ""
Tag = []
command = "sudo procs <keyword>"
[[Snippets]]
Description = "resize file system"
Output = ""
Tag = []
command = "sudo resize2fs <device>"
[[Snippets]]
Description = "write pba image"
Output = ""
Tag = []
command = "sudo sedutil-cli --loadPBAimage p UEFI64.img /dev/nvme1n1"
[[Snippets]]
Description = "print password hash"
Output = ""
Tag = []
command = "sudo sedutil-sleep --printPasswordHash \"$SEDUTIL_PASS\" /dev/nvme1n1"
[[Snippets]]
Description = "clean all docker logs. alse see docker prune"
Output = ""
Tag = []
command = "sudo sh -c 'truncate -s 0 /var/lib/docker/containers/*/*-json.log'"
[[Snippets]]
Description = "overwrite device three times"
Output = ""
Tag = ["erase"]
command = "sudo shred -vfz /dev/sdX"
[[Snippets]]
Description = "show S.M.A.R.T. info"
Output = ""
Tag = []
command = "sudo smartctl -A /dev/nvme0n1"
[[Snippets]]
Description = "show the amount of data written to disk"
Output = ""
Tag = []
command = "sudo smartctl -A /dev/nvme0n1 | grep Written"
[[Snippets]]
Description = "delete snapshots"
Output = ""
Tag = []
command = "sudo snapper -c <config> delete <snapshot_number>"
[[Snippets]]
Description = "show file differences"
Output = ""
Tag = []
command = "sudo snapper -c <config> diff <first_snapshot>..<last_snapshot> <filename>"
[[Snippets]]
Description = "list snapshots"
Output = ""
Tag = []
command = "sudo snapper -c <config> list"
[[Snippets]]
Description = "mount btrfs snapshot"
Output = ""
Tag = []
command = "sudo snapper -c <config> mount <snaphost_number>"
[[Snippets]]
Description = "view changed files"
Output = ""
Tag = []
command = "sudo snapper -c <config> status <first_snapshot>..<last_snapshot>"
[[Snippets]]
Description = "restore file"
Output = ""
Tag = []
command = "sudo snapper -c <config> undochange <first_snapshot>..<last_snapshot> <filename>"
[[Snippets]]
Description = "make snapshot"
Output = ""
Tag = []
command = "sudo snapper -c <config_name> create --description \"<description>\""
[[Snippets]]
Description = "list all snapshots"
Output = ""
Tag = []
command = "sudo snapper list -a"
[[Snippets]]
Description = "show listening ports"
Output = ""
Tag = []
command = "sudo ss -lnptu"
[[Snippets]]
Description = "switch to super user"
Output = ""
Tag = []
command = "sudo su"
[[Snippets]]
Description = "login as super user"
Output = ""
Tag = []
command = "sudo su -"
[[Snippets]]
Description = "log in as another other user"
Output = ""
Tag = []
command = "sudo su - <username>"
[[Snippets]]
Description = "execute command as another user"
Output = ""
Tag = []
command = "sudo su - <username> -c <command>"
[[Snippets]]
Description = "swith to another user"
Output = ""
Tag = []
command = "sudo su <username>"
[[Snippets]]
Description = "synchronize data in memory to disk"
Output = ""
Tag = []
command = "sudo sync"
[[Snippets]]
Description = "apply kernel parameters"
Output = ""
Tag = []
command = "sudo sysctl --system"
[[Snippets]]
Description = "start printer service"
Output = ""
Tag = ["CUPS"]
command = "sudo systemctl enable --now cups.service"
[[Snippets]]
Description = "disable suspend and hibernation"
Output = ""
Tag = []
command = "sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target"
[[Snippets]]
Description = "restart display manager"
Output = ""
Tag = []
command = "sudo systemctl restart display-manager"
[[Snippets]]
Description = "open container by mapping name in crypttab"
Output = ""
Tag = ["LUKS"]
command = "sudo systemctl start systemd-cryptsetup@<name>"
[[Snippets]]
Description = "enable zram"
Output = ""
Tag = []
command = "sudo systemctl start systemd-zram-setup@zram0"
[[Snippets]]
Description = "disable zram"
Output = ""
Tag = []
command = "sudo systemctl stop systemd-zram-setup@zram0"
[[Snippets]]
Description = "cpature traffic from a website"
Output = ""
Tag = []
command = "sudo tcpdump -n dst host <host>"
[[Snippets]]
Description = "set time zone"
Output = ""
Tag = []
command = "sudo timedatectl set-timezone <time-zone>"
[[Snippets]]
Description = "enable encryption on the filesystem"
Output = ""
Tag = ["fscrypt"]
command = "sudo tune2fs -O encrypt /dev/<device>"
[[Snippets]]
Description = "reload all udev rules"
Output = ""
Tag = []
command = "sudo udevadm control --reload-rules"
[[Snippets]]
Description = "list udev device attributes"
Output = ""
Tag = []
command = "sudo udevadm info --attribute-walk --path <device>"
[[Snippets]]
Description = "trigger all udev rules to run"
Output = ""
Tag = []
command = "sudo udevadm trigger"
[[Snippets]]
Description = "update mlocate database (see locate)"
Output = ""
Tag = []
command = "sudo updatedb"
[[Snippets]]
Description = "add new user and create home directory"
Output = ""
Tag = []
command = "sudo useradd -m <username>"
[[Snippets]]
Description = "remove linux user with home directory"
Output = ""
Tag = []
command = "sudo userdel -r <username>"
[[Snippets]]
Description = "add user to group(s)"
Output = ""
Tag = []
command = "sudo usermod -aG <comma-separated-group-names> <username>"
[[Snippets]]
Description = "Create multi boot USB"
Output = ""
Tag = []
command = "sudo ventoy -i -g /dev/sd"
[[Snippets]]
Description = "mount vera crypt volume"
Output = ""
Tag = []
command = "sudo veracrypt -t <volume> <mountpoint>"
[[Snippets]]
Description = "rename volume group"
Output = ""
Tag = ["lvm"]
command = "sudo vgrename <old> <new>"
[[Snippets]]
Description = "edit sudoers"
Output = ""
Tag = []
command = "sudo visudo"
[[Snippets]]
Description = "wipe filesystem"
Output = ""
Tag = []
command = "sudo wipefs -a /dev/sdX"
[[Snippets]]
Description = "create windows usb"
Output = ""
Tag = []
command = "sudo woeusb --device <Win.iso> /dev/sd<X> --tgt-fs NTFS"
[[Snippets]]
Description = "write windows iso to device"
Output = ""
Tag = []
command = "sudo woeusb --device <image> <device>"
[[Snippets]]
Description = "edit a file as root"
Output = ""
Tag = []
command = "sudoedit <filename>"
[[Snippets]]
Description = "show swap space"
Output = ""
Tag = []
command = "swapon -s"
[[Snippets]]
Description = "list all kernel runtime parameters"
Output = ""
Tag = []
command = "syctl -a"
[[Snippets]]
Description = "flush disk cache"
Output = ""
Tag = []
command = "sync"
[[Snippets]]
Description = "Shows services that failed to run"
Output = ""
Tag = []
command = "systemctl --failed"
[[Snippets]]
Description = "show status systemd user services"
Output = ""
Tag = []
command = "systemctl --user status"
[[Snippets]]
Description = "Run any systemctl command remotely"
Output = ""
Tag = []
command = "systemctl -H host status network"
[[Snippets]]
Description = "output service file"
Output = ""
Tag = ["systemd"]
command = "systemctl cat <service>"
[[Snippets]]
Description = "Must run to reload changed unit files"
Output = ""
Tag = []
command = "systemctl daemon-reload"
[[Snippets]]
Description = "Back to default target (multi-user.target)"
Output = ""
Tag = []
command = "systemctl default"
[[Snippets]]
Description = "Disable service--won’t start at boot"
Output = ""
Tag = []
command = "systemctl disable <service>"
[[Snippets]]
Description = "Edit entire unit file for <service>"
Output = ""
Tag = []
command = "systemctl edit --full <service>"
[[Snippets]]
Description = "Create snippit to drop in unit file"
Output = ""
Tag = []
command = "systemctl edit <service>"
[[Snippets]]
Description = "Put in emergency mode (emergency.target)"
Output = ""
Tag = []
command = "systemctl emergency"
[[Snippets]]
Description = "Enable a service to start on boot"
Output = ""
Tag = []
command = "systemctl enable <service>"
[[Snippets]]
Description = "List default target (like run level)"
Output = ""
Tag = []
command = "systemctl get-default"
[[Snippets]]
Description = "put the system into hibernation"
Output = ""
Tag = []
command = "systemctl hibernate"
[[Snippets]]
Description = "Show a unit’s dependencies"
Output = ""
Tag = []
command = "systemctl list-dependencies"
[[Snippets]]
Description = "View active systemd jobs"
Output = ""
Tag = []
command = "systemctl list-jobs"
[[Snippets]]
Description = "List sockets and what activates"
Output = ""
Tag = []
command = "systemctl list-sockets"
[[Snippets]]
Description = "list systemd timers"
Output = ""
Tag = []
command = "systemctl list-timers"
[[Snippets]]
Description = "See unit files and their states"
Output = ""
Tag = []
command = "systemctl list-unit-files"
[[Snippets]]
Description = "Show if units are loaded/active"
Output = ""
Tag = []
command = "systemctl list-units"
[[Snippets]]
Description = "list systemd services"
Output = ""
Tag = []
command = "systemctl list-units --type=service"
[[Snippets]]
Description = "Power off the system (poweroff.target)"
Output = ""
Tag = []
command = "systemctl poweroff"
[[Snippets]]
Description = "Reboot the system (reboot.target)"
Output = ""
Tag = []
command = "systemctl reboot"
[[Snippets]]
Description = "boot"
Output = ""
Tag = []
command = "systemctl reboot --boot-loader-entry="
[[Snippets]]
Description = "choose next boot"
Output = ""
Tag = ["systemd-boot"]
command = "systemctl reboot --boot-loader-entry=<name>.conf"
[[Snippets]]
Description = "reboot into firmware"
Output = ""
Tag = ["systemd-boot"]
command = "systemctl reboot --firmware-setup"
[[Snippets]]
Description = "Reload all config files in service"
Output = ""
Tag = []
command = "systemctl reload <service>"
[[Snippets]]
Description = "Resets any units from failed state"
Output = ""
Tag = []
command = "systemctl reset-failed"
[[Snippets]]
Description = "Restart a running service"
Output = ""
Tag = []
command = "systemctl restart <service>"
[[Snippets]]
Description = "show location of a systemd unit"
Output = ""
Tag = []
command = "systemctl show -p FragmentPath <unit>"
[[Snippets]]
Description = "Show properties of a service (or other unit)"
Output = ""
Tag = []
command = "systemctl show <service>"
[[Snippets]]
Description = "Start a service"
Output = ""
Tag = []
command = "systemctl start <service>"
[[Snippets]]
Description = "See if service is running/enabled"
Output = ""
Tag = []
command = "systemctl status <service>"
[[Snippets]]
Description = "Stop a running service"
Output = ""
Tag = []
command = "systemctl stop <service>"
[[Snippets]]
Description = "suspend the system"
Output = ""
Tag = []
command = "systemctl suspend"
[[Snippets]]
Description = "List time of each unit to start up"
Output = ""
Tag = []
command = "systemd-analyze blame"
[[Snippets]]
Description = "analyze calendar"
Output = ""
Tag = []
command = "systemd-analyze calendar <expr>"
[[Snippets]]
Description = "concatenate files and print files in reverse"
Output = ""
Tag = []
command = "tac"
[[Snippets]]
Description = "follow output"
Output = ""
Tag = []
command = "tail -f"
[[Snippets]]
Description = "check process output"
Output = ""
Tag = []
command = "tail -f /proc/<pid>/fd/*"
[[Snippets]]
Description = "skip first line"
Output = ""
Tag = []
command = "tail -n +2"
[[Snippets]]
Description = "extract without first directory"
Output = ""
Tag = []
command = "tar --strip-components=1 -xzvf <filename>.tar.gz"
[[Snippets]]
Description = "tar a directory without retaining the directory structure"
Output = ""
Tag = []
command = "tar -C <dir> -cvzf <output>.tar.gz ."
[[Snippets]]
Description = "compress current directory"
Output = ""
Tag = []
command = "tar -czvf <output>.tar.gz ."
[[Snippets]]
Description = "remove file from tar archive"
Output = ""
Tag = []
command = "tar -vf <archive> --delete <filename>"
[[Snippets]]
Description = "extract files"
Output = ""
Tag = []
command = "tar -xzvf <filename>.tar.gz"
[[Snippets]]
Description = "list files"
Output = ""
Tag = []
command = "tar -ztvf <filename>"
[[Snippets]]
Description = "create password protected tar"
Output = ""
Tag = []
command = "tar czvf - <dir> | gpg --symmetric --cipher-algo aes256 -o <archive>.tar.gz.gpg"
[[Snippets]]
Description = "extract .tar.xz file"
Output = ""
Tag = []
command = "tar xvf <filename>.tar.xz"
[[Snippets]]
Description = "extract files to another directory"
Output = ""
Tag = []
command = "tar xzvf <filename>.tar.gz --directory <dir>"
[[Snippets]]
Description = "print captured packets in ascii"
Output = ""
Tag = []
command = "tcpdump -A -i <interface>"
[[Snippets]]
Description = "list network interfaces using tcpdump"
Output = ""
Tag = []
command = "tcpdump -D"
[[Snippets]]
Description = "display captured packets in hex"
Output = ""
Tag = []
command = "tcpdump -XX -i <interface>"
[[Snippets]]
Description = "capture traffic from destination ip"
Output = ""
Tag = []
command = "tcpdump -i <inteface> dst <ip>"
[[Snippets]]
Description = "capture traffic from source ip"
Output = ""
Tag = []
command = "tcpdump -i <inteface> src 192.168.0.102"
[[Snippets]]
Description = "capture traffic"
Output = ""
Tag = []
command = "tcpdump -i <interface>"
[[Snippets]]
Description = "capture traffic on specific port"
Output = ""
Tag = []
command = "tcpdump -i <interface> port <port>"
[[Snippets]]
Description = "capture tcp traffic"
Output = ""
Tag = []
command = "tcpdump -i <interface> tcp"
[[Snippets]]
Description = "find traffic by host"
Output = ""
Tag = []
command = "tcpdump host <host>"
[[Snippets]]
Description = "play terminal record"
Output = ""
Tag = []
command = "terminalizer play <name>"
[[Snippets]]
Description = "record terminal"
Output = ""
Tag = []
command = "terminalizer record <name>"
[[Snippets]]
Description = "render terminal record"
Output = ""
Tag = []
command = "terminalizer render <name>"
[[Snippets]]
Description = "display the current time and date on your system"
Output = ""
Tag = []
command = "timedatectl status"
[[Snippets]]
Description = "show tldr page"
Output = ""
Tag = ["man"]
command = "tldr <command>"
[[Snippets]]
Description = "start new session"
Output = ""
Tag = []
command = "tmux"
[[Snippets]]
Description = "attach"
Output = ""
Tag = []
command = "tmux a"
[[Snippets]]
Description = "attach to named"
Output = ""
Tag = []
command = "tmux a -t myname"
[[Snippets]]
Description = "kill session"
Output = ""
Tag = []
command = "tmux kill-session -t myname"
[[Snippets]]
Description = "list sessions"
Output = ""
Tag = []
command = "tmux ls"
[[Snippets]]
Description = "Kill all the tmux sessions"
Output = ""
Tag = []
command = "tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill"
[[Snippets]]
Description = "list key bindings"
Output = ""
Tag = []
command = "tmux lsk"
[[Snippets]]
Description = "start new with session name"
Output = ""
Tag = []
command = "tmux new -s myname"
[[Snippets]]
Description = "count lines of code"
Output = ""
Tag = []
command = "tokei"
[[Snippets]]
Description = "jq for toml"
Output = ""
Tag = []
command = "tomlq"
[[Snippets]]
Description = "upgrade various kinds of packages in linux at once"
Output = ""
Tag = []
command = "topgrade"
[[Snippets]]
Description = "route traffic through the tor network"
Output = ""
Tag = ["networking,", "anonymity"]
command = "torify <command>"
[[Snippets]]
Description = "change file modification time"
Output = ""
Tag = []
command = "touch -m -d '<YYYY-MM-DD HH:mm:ss>' <file>"
[[Snippets]]
Description = "change a file's modify timestamp relatively"
Output = ""
Tag = []
command = "touch -m -d \"$(stat -c %y \"<file>\") + 3600 sec\" \"<file>\""
[[Snippets]]
Description = "set modification time"
Output = ""
Tag = []
command = "touch -t <YYMMDDhhmm> <filename>"
[[Snippets]]
Description = "transform to lower case"
Output = ""
Tag = []
command = "tr '[:upper:]' '[:lower:]'"
[[Snippets]]
Description = "translate text"
Output = ""
Tag = []
command = "trans -b <text>"
[[Snippets]]
Description = "extend a file"
Output = ""
Tag = ["resize"]
command = "truncate --size=+<size> <filename>"
[[Snippets]]
Description = "prepend timestamp to each line"
Output = ""
Tag = []
command = "ts"
[[Snippets]]
Description = "show command type"
Output = ""
Tag = []
command = "type <command>"
[[Snippets]]
Description = "set or show resource usage limits"
Output = ""
Tag = []
command = "ulimit"
[[Snippets]]
Description = "detach a busy device immediately"
Output = ""
Tag = []
command = "umount -l <mount>"
[[Snippets]]
Description = "unmount a busy device"
Output = ""
Tag = []
command = "umount -l <mountpoint or device>"
[[Snippets]]
Description = "remove an alias"
Output = ""
Tag = []
command = "unalias <alias>"
[[Snippets]]
Description = "remove alias"
Output = ""
Tag = []
command = "unalias vim"
[[Snippets]]
Description = "linux kernel version"
Output = ""
Tag = []
command = "uname -r"
[[Snippets]]
Description = "extract archive"
Output = ""
Tag = []
command = "unrar x <filename>.rar"
[[Snippets]]
Description = "list files in zip archive"
Output = ""
Tag = []
command = "unzip -l <file.zip>"
[[Snippets]]
Description = "extract file from zip archive to stdout"
Output = ""
Tag = []
command = "unzip -p file.zip file.txt | less"
[[Snippets]]
Description = "build a cache database of the MIME types handled by desktop files"
Output = ""
Tag = []
command = "update-desktop-database <desktop_directory=~/.local/share/applications>"
[[Snippets]]
Description = "update mime database using xml files"
Output = ""
Tag = []
command = "update-mime-database"
[[Snippets]]
Description = "set primary group for user"
Output = ""
Tag = []
command = "usermod -g <group> <user>"
[[Snippets]]
Description = "generate uuid"
Output = ""
Tag = []
command = "uuidgen"
[[Snippets]]
Description = "add device to volume group"
Output = ""
Tag = ["lvm"]
command = "vgextend <vg> <device>"
[[Snippets]]
Description = "move data to another device (s) and remove device from volume group"
Output = ""
Tag = ["lvm"]
command = "vgreduce <vg> <device>"
[[Snippets]]
Description = "list volume groups"
Output = ""
Tag = ["lvm"]
command = "vgs"
[[Snippets]]
Description = "show who is logged"
Output = ""
Tag = []
command = "w"
[[Snippets]]
Description = "xecute a program periodically, showing output in fullscreen"
Output = ""
Tag = []
command = "watch -n 1 nvidia-smi"
[[Snippets]]
Description = "show temperature"
Output = ""
Tag = ["monitoring", "hardware"]
command = "watch sensors"
[[Snippets]]
Description = "count lines"
Output = ""
Tag = []
command = "wc -l"
[[Snippets]]
Description = "count characters"
Output = ""
Tag = []
command = "wc -m"
[[Snippets]]
Description = "download a file to a specific directory"
Output = ""
Tag = []
command = "wget -P /tmp <url>"
[[Snippets]]
Description = "download a whole website"
Output = ""
Tag = []
command = "wget -P <download dir> -pkr <url>"
[[Snippets]]
Description = "hide wget output"
Output = ""
Tag = []
command = "wget -q <url>"
[[Snippets]]
Description = "download directory structure"
Output = ""
Tag = []
command = "wget -x <url>"
[[Snippets]]
Description = "list all man pages"
Output = ""
Tag = []
command = "whatis -r . | grep hist"
[[Snippets]]
Description = "show short description"
Output = ""
Tag = []
command = "whatis <command>"
[[Snippets]]
Description = "show command and/or man location"
Output = ""
Tag = []
command = "whereis"
[[Snippets]]
Description = "locate a command"
Output = ""
Tag = []
command = "which <command>"
[[Snippets]]
Description = "show who am i"
Output = ""
Tag = []
command = "whoami"
[[Snippets]]
Description = "search manual pages"
Output = ""
Tag = []
command = "wikiman"
[[Snippets]]
Description = "list windows: window id, desktop id, ..., title"
Output = ""
Tag = []
command = "wmctrl -lp"
[[Snippets]]
Description = "execute command for each line"
Output = ""
Tag = []
command = "xargs -L1 command"
[[Snippets]]
Description = "print clipboard contents"
Output = ""
Tag = []
command = "xclip -o"
[[Snippets]]
Description = "copy to the system clipboard"
Output = ""
Tag = []
command = "xclip -sel c"
[[Snippets]]
Description = "set default application"
Output = ""
Tag = []
command = "xdg-mime default <entry.desktop> <mimetype>"
[[Snippets]]
Description = "set default application for mime"
Output = ""
Tag = []
command = "xdg-mime default <entry.desktop> <mime>"
[[Snippets]]
Description = "show default apllication for mime type"
Output = ""
Tag = []
command = "xdg-mime query default <mimetype>"
[[Snippets]]
Description = "show mime type for file"
Output = ""
Tag = []
command = "xdg-mime query filetype <filename>"
[[Snippets]]
Description = "search window by title. output is x window id"
Output = ""
Tag = []
command = "xdotool search --name <title>"
[[Snippets]]
Description = "suspend"
Output = ""
Tag = []
command = "xfce4-session-logout --suspend"
[[Snippets]]
Description = "generate .po file"
Output = ""
Tag = ["localization"]
command = "xgettext --from-code=utf-8 --keyword=__ -jo <filename>.po *.php"
[[Snippets]]
Description = "kill x window"
Output = ""
Tag = []
command = "xkill -id <X-Window-ID>"
[[Snippets]]
Description = "jq xml"
Output = ""
Tag = []
command = "xq"
[[Snippets]]
Description = "list monitors"
Output = ""
Tag = []
command = "xrandr --listmonitors"
[[Snippets]]
Description = "monitor info"
Output = ""
Tag = []
command = "xrandr -q"
[[Snippets]]
Description = "show window tree"
Output = ""
Tag = []
command = "xwininfo -root -tree"
[[Snippets]]
Description = "convert string to hex"
Output = ""
Tag = []
command = "xxd -p"
[[Snippets]]
Description = "extract .xz file"
Output = ""
Tag = []
command = "xz -d <file>.xz"
[[Snippets]]
Description = "find file in arch database"
Output = ""
Tag = []
command = "pacman -Fx <file name>"
[[Snippets]]
Description = "package statistics"
Output = ""
Tag = []
command = "yay -Ps"
[[Snippets]]
Description = "list installed packages that belong to a certain group"
Output = ""
Tag = []
command = "pacman -Qg <group>"
[[Snippets]]
Description = "show local package info"
Output = ""
Tag = []
command = "pacman -Qi <package>"
[[Snippets]]
Description = "list files of an installed package"
Output = ""
Tag = []
command = "pacman -Ql <package>"
[[Snippets]]
Description = "find which package owns a file"
Output = ""
Tag = []
command = "pacman -Qo <filename>"
[[Snippets]]
Description = "list installed packages"
Output = ""
Tag = []
command = "pacman -Qqe"
[[Snippets]]
Description = "search installed packages"
Output = ""
Tag = []
command = "pacman -Qs <search>"
[[Snippets]]
Description = "remove package"
Output = ""
Tag = []
command = "sudo pacman -Rns <package>"
[[Snippets]]
Description = "install package from a file"
Output = ""
Tag = []
command = "sudo pacman -S - < <file>"
[[Snippets]]
Description = "install package"
Output = ""
Tag = []
command = "sudo pacman -S <package>"
[[Snippets]]
Description = "clear cache"
Output = ""
Tag = []
command = "sudo pacman -Sc"
[[Snippets]]
Description = "List packages in the group"
Output = ""
Tag = []
command = "pacman -Sg <group=gnome>"
[[Snippets]]
Description = "show remote package info"
Output = ""
Tag = []
command = "pacman -Si <package>"
[[Snippets]]
Description = "list the reverse dependencies"
Output = ""
Tag = []
command = "pacman -Sii <package>"
[[Snippets]]
Description = "search packages"
Output = ""
Tag = []
command = "pacman -Ss <search>"
[[Snippets]]
Description = "install package from a local file"
Output = ""
Tag = []
command = "sudo pacman -U /var/cache/pacman/pkg/"
[[Snippets]]
Description = "remove orphaned packages (dependencies of uninstalled packages)"
Output = ""
Tag = []
command = "yay -Yc"
[[Snippets]]
Description = "send y to stdin"
Output = ""
Tag = []
command = "yes"
[[Snippets]]
Description = "yaml jq"
Output = ""
Tag = []
command = "yq"
[[Snippets]]
Description = "download youtube video"
Output = ""
Tag = []
command = "yt-dlp <url>"
[[Snippets]]
Description = "better cd"
Output = ""
Tag = ["zoxide"]
command = "z"
[[Snippets]]
Description = "decode qr-code image"
Output = ""
Tag = []
command = "zbarimg -q --raw <image>"
[[Snippets]]
Description = "case insensitive z"
Output = ""
Tag = ["zoxide"]
command = "zi"
[[Snippets]]
Description = "create a password protected zip file"
Output = ""
Tag = []
command = "zip -r -e <output>.zip <dir>"
[[Snippets]]
Description = "create a zip archive from a directory"
Output = ""
Tag = []
command = "zip <output> -r <dir>"
[[Snippets]]
Description = "uncompress zlib data"
Output = ""
Tag = []
command = "zlib-flate -uncompress"
[[Snippets]]
Description = "more for gzipped files"
Output = ""
Tag = []
command = "zmore <file.gz>"
[[Snippets]]
Description = "install zsh plugins"
Output = ""
Tag = []
command = "zplug install"
[[Snippets]]
Description = "control zram"
Output = ""
Tag = []
command = "zramctl"
[[Snippets]]
Description = "List all Linux users"
Output = ""
Tag = ["shortcut"]
command = "~TAB TAB"
[[Snippets]]
Description = "scan top ports"
Output = ""
Tag = []
command = "rustscan --top -a <addr>"
[[Snippets]]
Description = "shuffle lines"
Output = ""
Tag = []
command = "shuf"
[[Snippets]]
Description = "list aur packages"
Output = ""
Tag = []
command = "yay -Qm"
[[Snippets]]
Description = "fetch-like git repo info"
Output = ""
Tag = []
command = "onefetch"
[[Snippets]]
Description = "list video adapters"
Output = ""
Tag = []
command = "lspci | grep -E 'VGA|3D'"
[[Snippets]]
Description = "run a command at a specific time"
Output = ""
Tag = []
command = "echo command | at 6.00"
[[Snippets]]
Description = "list available nvme"
Output = ""
Tag = []
command = "sudo nvme list"
[[Snippets]]
Description = "repair fat partition"
Output = ""
Tag = []
command = "sudo fsck.vfat -a <device>"
[[Snippets]]
Description = "restore deleted files"
Output = ""
Tag = []
command = "sudo ntfsundelete -u <device>"
[[Snippets]]
Description = "move parttion"
Output = ""
Tag = []
command = "echo '+100M' | sfdisk --move-data <device> -N <partnum>"
[[Snippets]]
Description = "create a temporary file with random characters in the name and return its name"
Output = ""
Tag = []
command = "mktemp --tmpdir=/tmp file-XXXXXXXXXX.ext"
[[Snippets]]
Description = "continue process"
Output = ""
Tag = []
command = "fg -19"
[[Snippets]]
Description = "change brightness"
Output = ""
Tag = []
command = "brightnessctl --device='amdgpu_bl0' s 127"
[[Snippets]]
Description = "reread partition table"
Output = ""
Tag = []
command = "partprobe <device>"
[[Snippets]]
Description = "show all attributes of device"
Output = ""
Tag = []
command = "udevadm info --query=all <device>"
[[Snippets]]
Description = "mimetype and encoding"
Output = ""
Tag = []
command = "file -i <file>"
[[Snippets]]
Description = "get sender bitcoin address from transaction id"
Output = ""
Tag = []
command = "curl -s \"https://blockchain.info/rawtx/<txid>\" | jq -r '.inputs[0].prev_out.addr'"
[[Snippets]]
Description = "copy to the clipboard"
Output = ""
Tag = ["wayland"]
command = "wl-copy"
[[Snippets]]
Description = "Choosing next boot"
Output = ""
Tag = []
command = "systemctl reboot --boot-loader-entry=<config>.conf"
[[Snippets]]
Description = "send message to all users"
Output = ""
Tag = []
command = "wall -g users test"
[[Snippets]]
Description = "read only nano"
Output = ""
Tag = []
command = "rnano"
[[Snippets]]
Description = "find current working directory of a process"
Output = ""
Tag = []
command = "pwdx <pid>"
[[Snippets]]
Description = "list opened files by process"
Output = ""
Tag = []
command = "lsof -p <pid>"
[[Snippets]]
Description = "run powershell"
Output = ""
Tag = []
command = "pwsh"
[[Snippets]]
Description = "prints memory info"
Output = ""
Tag = []
command = "cat /proc/meminfo"
[[Snippets]]
Description = "memory reporting"
Output = ""
Tag = []
command = "smem -twk"
[[Snippets]]
Description = "send mail via git"
Output = ""
Tag = []
command = "git send-email"
[[Snippets]]
Description = "skip empty or blank lines"
Output = ""
Tag = []
command = "grep -v '^$'"
[[Snippets]]
Description = "extract host name from url"
Output = ""
Tag = []
command = "sed -r 's;https?://|/.*;;g'"
[[Snippets]]
Description = "bandwidth monitor, bandwidth usage, monitor traffic"
Output = ""
Tag = []
command = "bmon"
[[Snippets]]
Description = "interface top, bandwidth usage, monitor traffic"
Output = ""
Tag = []
command = "sudo iftop"
[[Snippets]]
Description = "duplicate output"
Output = ""
Tag = []
command = "tee"
[[Snippets]]
Description = "answer Y to all"
Output = ""
Tag = []
command = "yes Y"
[[Snippets]]
Description = "stress test memory"
Output = ""
Tag = []
command = "stress -m <size>"
[[Snippets]]
Description = "stress cpu, memory, i/o"
Output = ""
Tag = []
command = "stress"
[[Snippets]]
Description = "change video resolution"
Output = ""
Tag = []
command = "ffmpeg -i input.mp4 -vf scale=-1:720 output.mp4"
[[Snippets]]
Description = "follow redirects via curl"
Output = ""
Tag = []
command = "curl -L"
[[Snippets]]
Description = "decrypt file"
Output = ""
Tag = []
command = "pgp -d"
[[Snippets]]
Description = "same as groups"
Output = ""
Tag = []
command = "id -Gn"
[[Snippets]]
Description = "reverse"
Output = ""
Tag = []
command = "rev"
[[Snippets]]
Description = "select column"
Output = ""
Tag = []
command = "mlr -csv cut -f <name> <file>"
[[Snippets]]
Description = "process structired text data"
Output = ""
Tag = ["miller", "csv", "json"]
command = "mlr"
[[Snippets]]
Description = "generate new key pair"
Output = ""
Tag = []
command = "pgp --gen-key"
[[Snippets]]
Description = "xrandr for wayland"
Output = ""
Tag = []
command = "wlr-randr"
[[Snippets]]
Description = "share hardware information"
Output = ""
Tag = []
command = "sudo -E hw-probe -all -upload"
[[Snippets]]
Description = "check cpu speed"
Output = ""
Tag = []
command = "cat /proc/cpuinfo | grep Hz"
[[Snippets]]
Description = "slurp... each line as array element"
Output = ""
Tag = []
command = "jq -s"
[[Snippets]]
Description = "convert output of many commands to json"
Output = ""
Tag = []
command = "jc"
[[Snippets]]
Description = "create json object"
Output = ""
Tag = []
command = "jo"
[[Snippets]]
Description = "jq for binary"
Output = ""
Tag = []
command = "fq"
[[Snippets]]
Description = "jq for html"
Output = ""
Tag = []
command = "htmlq"
[[Snippets]]
Description = "remove images like thumbnails in directory"
Output = ""
Tag = []
command = "fd -e jpg -0 --exec-batch rm"
[[Snippets]]
Description = "monitor cpu temp, usage, stress test"
Output = ""
Tag = []
command = "s-tui"
[[Snippets]]
Description = "change lusk partition uuid"
Output = ""
Tag = []
command = "sudo cryptsetup luksUUID /dev/sda1 --uuid \"$(uuidgen)\""
[[Snippets]]
Description = "monitor opened files of a process (-p PID)"
Output = ""
Tag = []
command = "strace -e trace=open,openat,close,read,write,connect,accept <command>"
[[Snippets]]
Description = "install local package into virtual environment"
Output = ""
Tag = []
command = "pipx install --force ."
[[Snippets]]
Description = "analize btrfs disk usage"
Output = ""
Tag = []
command = "btdu /mnt/btr_pool"
[[Snippets]]
Description = "open youtube video via mpv requires yt-dlp/youtube-dl"
Output = ""
Tag = []
command = "mpv --hwdec=auto \"https://www.youtube.com/watch?v=QjN1iO9c2AU\""
[[Snippets]]
Description = "micro show default keys"
Output = ""
Tag = ["shortcuts"]
command = "^e, `> help defaultkeys`"
[[Snippets]]
Description = "mx lookup"
Output = ""
Tag = []
command = "host -t mx wikipedia.org"
[[Snippets]]
Description = "convert date to timestamp"
Output = ""
Tag = []
command = "date +%s -d \"YYYY-MM-DD HH:MM:SS\""
[[Snippets]]
Description = "use non-default locale"
Output = ""
Tag = []
command = "LANG=ru_RU.UTF-8 command"
[[Snippets]]
Description = "set terminal session locale"
Output = ""
Tag = []
command = "export LANG=ru_RU.UTF-8"
[[Snippets]]
Description = "perf benchmark"
Output = ""
Tag = []
command = "hyperfine"
[[Snippets]]
Description = "save current layout as image"
Output = ""
Tag = []
command = "xkbprint"
[[Snippets]]
Description = "list only file names"
Output = ""
Tag = []
command = "ls -A1 <dir>"
[[Snippets]]
Description = "find package dependencies"
Output = ""
Tag = []
command = "pacman -Sii"
[[Snippets]]
Description = "show btrfs errors"
Output = ""
Tag = []
command = "sudo btrfs device stats <mount>"
[[Snippets]]
Description = "check and repair btrfs"
Output = ""
Tag = []
command = "btrfsck --repair <device>"
[[Snippets]]
Description = "check bad sectors"
Output = ""
Tag = []
command = "sudo badblocks -sv /dev/sda"
[[Snippets]]
Description = "translate rus to eng keyboard"
Output = ""
Tag = []
command = "echo \"Привет\" | iconv -t cp1251 | tr $(iconv -t cp1251 <<< \"йцукенгшщзхъфывапролджэячсмитьбю.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,\") \"qwertyuiop[]asdfghjkl;'zxcvbnm,./QWERTYUIOP{}ASDFGHJKL:\\\"ZXCVBNM<>?\""
[[Snippets]]
Description = "create json array from lines"
Output = ""
Tag = []
command = "jo -a"
[[Snippets]]
Description = "get base url using cut range"
Output = ""
Tag = []
command = "cut -d'/' -f-3 <<< https://example.org/foo/bar"
[[Snippets]]
Description = "update zsh plugins"
Output = ""
Tag = []
command = "antidote update"
[[Snippets]]
Description = "interactive spell check"
Output = ""
Tag = []
command = "echo helo | aspell -a"
[[Snippets]]
Description = "spell check markdown"
Output = ""
Tag = []
command = "aspell check --dont-backup --mode=markdown spellcheck.md"
[[Snippets]]
Description = "set pretty hostname"
Output = ""
Tag = []
command = "sudo hostnamectl set-hostname --pretty 'My Arch Nitro'"
[[Snippets]]
Description = "output response headers"
Output = ""
Tag = []
command = "curl -I <url>"
[[Snippets]]
Description = "kill process by port"
Output = ""
Tag = []
command = "kill $(lsof -i:6000 -t)"
[[Snippets]]
Description = "show last modification time"
Output = ""
Tag = []
command = "stat -c %y file"
[[Snippets]]
Description = "get file modified date"
Output = ""
Tag = []
command = "date -r file"
[[Snippets]]
Description = "list russian keymaps"
Output = ""
Tag = []
command = "localectl list-keymaps | grep ru"
[[Snippets]]
Description = "change KEYMAP in /etc/vconsole.conf"
Output = ""
Tag = []
command = "localectl set-keymap --no-convert ruwin_ct_sh-UTF-8"
[[Snippets]]
Description = "set x11 keyboard layout"
Output = ""
Tag = []
command = "localectl --no-convert set-x11-keymap us,ru pc105 grp:win_space_toggle"
[[Snippets]]
Description = "add text to the beggining of a file"
Output = ""
Tag = []
command = "sed -i '1itask goes here' todo.txt"
[[Snippets]]
Description = "update system ignoring kernel updates"
Output = ""
Tag = []
command = "sudo pacman -Syu --ignore linux --ignore linux-headers"
[[Snippets]]
Description = "mount directory"
Output = ""
Tag = []
command = "sudo mount --bind /mnt/logs /var/log"
[[Snippets]]
Description = "read journal file"
Output = ""
Tag = []
command = "journalctl --file /var/log/journal/e9b302d8ee0643979d278e89fd6d097f/system.journal"
[[Snippets]]
Description = "create gist with output of previous command"
Output = ""
Tag = []
command = "<command> | gh gist create -p -"
[[Snippets]]
Description = "get filename without extension"
Output = ""
Tag = []
command = "basename <filename> <extension>"
[[Snippets]]
Description = "check url exists"
Output = ""
Tag = []
command = "curl --output /dev/null --silent --fail -r 0-0 <url>"
[[Snippets]]
Description = "list signals to send with kill"
Output = ""
Tag = ["processes"]
command = "kill -l"
[[Snippets]]
Description = "better ls"
Output = ""
Tag = []
command = "lsd"
[[Snippets]]
Description = "process tree"
Output = ""
Tag = []
command = "procs --tree"
[[Snippets]]
Description = "see tor service logs"
Output = ""
Tag = []
command = "journalctl -xeu tor.service"
[[Snippets]]
Description = "change a file's access time"
Output = ""
Tag = []
command = "touch -a -d \"2019-01-22 07:30:00\" <file>"
[[Snippets]]
Description = "shell builtin commands"
Output = ""
Tag = []
command = "bash -c help"
[[Snippets]]
Description = "close fd 3"
Output = ""
Tag = []
command = "exec 3>&-"
[[Snippets]]
Description = "replace current shell session"
Output = ""
Tag = []
command = "exec sh"
[[Snippets]]
Description = "replace current process"
Output = ""
Tag = []
command = "exec command"
[[Snippets]]
Description = "open file descriptor"
Output = ""
Tag = []
command = "exec 3<>file"
[[Snippets]]
Description = "sort items in directory by size"
Output = ""
Tag = []
command = "du -sh * | sort -rh"
[[Snippets]]
Description = "delete all snapshots for a specific config"
Output = ""
Tag = []
command = "sudo snapper -c root delete $(sudo snapper -c root list --columns number | tail +4)"
[[Snippets]]
Description = "wrap text"
Output = ""
Tag = []
command = "fold -w 80 -s <file>"
[[Snippets]]
Description = "analize disk usage"
Output = ""
Tag = []
command = "dua i"
[[Snippets]]
Description = "tail -f"
Output = ""
Tag = ["alternative"]
command = "lnav"
[[Snippets]]
Description = "top, htop"
Output = ""
Tag = ["alternative"]
command = "atop"
[[Snippets]]
Description = "check syntax"
Output = ""
Tag = []
command = "bash -n <script>"
[[Snippets]]
Description = "read lines into array"
Output = ""
Tag = []
command = "readarray -t arr <file"
[[Snippets]]
Description = "split text into array"
Output = ""
Tag = []
command = "mapfile -d <delim> <array>"
[[Snippets]]
Description = "check open port via netcat"
Output = ""
Tag = []
command = "nc -zvw10 <host> <port>"
[[Snippets]]
Description = "list all of exported variables and functions"
Output = ""
Tag = []
command = "export -p"
[[Snippets]]
Description = "move source and backup target"
Output = ""
Tag = []
command = "mv -b <source> <target>"
[[Snippets]]
Description = "decompress .zst archive"
Output = ""
Tag = []
command = "unzstd <file>"
[[Snippets]]
Description = "run python script in docker container"
Output = ""
Tag = []
command = "docker run -it --rm -v \"$PWD:/code\" -w /code python:3.4.3 python3 test_script.py"
[[Snippets]]
Description = "send a file to paste.rs. paste can be deleted"
Output = ""
Tag = ["pastebin"]
command = "curl --data-binary @<file> https://paste.rs/"
[[Snippets]]
Description = "delete paste"
Output = ""
Tag = ["pastebin"]
command = "curl -X DELETE https://paste.rs/<id>"
[[Snippets]]
Description = "short url"
Output = ""
Tag = []
command = "curl -s https://cutt.ly/scripts/shortenUrl.php -d url=<url>"
[[Snippets]]
Description = "view today logs"
Output = ""
Tag = []
command = "journalctl --since today"
[[Snippets]]
Description = "view www-data user logs"
Output = ""
Tag = []
command = "journalctl _UID=33"
[[Snippets]]
Description = "view logs by pid"
Output = ""
Tag = []
command = "journalctl _PID=12345"
[[Snippets]]
Description = "full uname without hostname"
Output = ""
Tag = []
command = "uname -a | cut -d\" \" -f1,3-"
[[Snippets]]
Description = "go list supported archs"
Output = ""
Tag = []
command = "go tool dist list"
[[Snippets]]
Description = "execute script in current shell"
Output = ""
Tag = []
command = "source <script>"
[[Snippets]]
Description = "list of processes that opened the file"
Output = ""
Tag = []
command = "lsof -t <file>"
[[Snippets]]
Description = "show tabs and newlines in output"
Output = ""
Tag = []
command = "cat -A"
[[Snippets]]
Description = "delete every nth line"
Output = ""
Tag = []
command = "sed '0~<N>d'"
[[Snippets]]
Description = "retrieve a list of the files installed by a remote package"
Output = ""
Tag = []
command = "pacman -Fl <package>"
[[Snippets]]
Description = "list explicitly installed packages"
Output = ""
Tag = []
command = "pacman -Qqe"
[[Snippets]]
Description = "file manager inspired ranger"
Output = ""
Tag = []
command = "lf"
[[Snippets]]
Description = "Start a new tmux session"
Output = ""
Tag = ["tmux"]
command = "tmux"
[[Snippets]]
Description = "Detach from current session"
Output = ""
Tag = ["tmux"]
command = "tmux detach"
[[Snippets]]
Description = "Attach to last used session"
Output = ""
Tag = ["tmux"]
command = "tmux attach"
[[Snippets]]
Description = "Show every session, window, pane, etc."
Output = ""
Tag = ["tmux"]
command = "tmux info"
[[Snippets]]
Description = "Send the prefix key"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  ctrl + b"
[[Snippets]]
Description = "Describe key binding"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  /"
[[Snippets]]
Description = "Prompt for a command"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  :"
[[Snippets]]
Description = "List key bindings"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  ?"
[[Snippets]]
Description = "Show a clock"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  t"
[[Snippets]]
Description = "Show messages"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  ~"
[[Snippets]]
Description = "Delete the most recent paste buffer"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  -"
[[Snippets]]
Description = "Choose a paste buffer from a list"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  ="
[[Snippets]]
Description = "List all paste buffers"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  #"
[[Snippets]]
Description = "Enter copy mode"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  ["
[[Snippets]]
Description = "Enter copy mode and scroll up"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  pageup"
[[Snippets]]
Description = "Paste the most recent paste buffer"
Output = ""
Tag = ["tmux", "shortcuts", "general"]
command = "ctrl + b  ]"
[[Snippets]]
Description = "Split window vertically"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  \""
[[Snippets]]
Description = "Split window horizontally"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  %"
[[Snippets]]
Description = "Kill current window"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  &"
[[Snippets]]
Description = "Prompt for window index to select"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  '"
[[Snippets]]
Description = "Rename current window"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  ,"
[[Snippets]]
Description = "Move the current window"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  ."
[[Snippets]]
Description = "Select window 0"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  0"
[[Snippets]]
Description = "Select window 1"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  1"
[[Snippets]]
Description = "Select window 2"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  2"
[[Snippets]]
Description = "Select window 3"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  3"
[[Snippets]]
Description = "Select window 4"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  4"
[[Snippets]]
Description = "Select window 5"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  5"
[[Snippets]]
Description = "Select window 6"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  6"
[[Snippets]]
Description = "Select window 7"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  7"
[[Snippets]]
Description = "Select window 8"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  8"
[[Snippets]]
Description = "Select window 9"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  9"
[[Snippets]]
Description = "Display window information"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  i"
[[Snippets]]
Description = "Create a new window"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  c"
[[Snippets]]
Description = "Select the next window"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  n"
[[Snippets]]
Description = "Move the visible part of the window up"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  shift + up"
[[Snippets]]
Description = "Move the visible part of the window down"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  shift + down"
[[Snippets]]
Description = "Move the visible part of the window left"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  shift + left"
[[Snippets]]
Description = "Move the visible part of the window right"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  shift + right"
[[Snippets]]
Description = "Select the next window with an alert"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  alt + n"
[[Snippets]]
Description = "Select the previous window with an alert"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  alt + p"
[[Snippets]]
Description = "Choose a window from a list"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  w"
[[Snippets]]
Description = "Select the previously current window"
Output = ""
Tag = ["tmux", "shortcuts", "windows"]
command = "ctrl + b  l"
[[Snippets]]
Description = "Break pane to a new window"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  !"
[[Snippets]]
Description = "Rotate through the panes"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  ctrl + o"
[[Snippets]]
Description = "Select the pane above the active pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  up"
[[Snippets]]
Description = "Select the pane below the active pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  down"
[[Snippets]]
Description = "Select the pane to the left of the active pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  left"
[[Snippets]]
Description = "Select the pane to the right of the active pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  right"
[[Snippets]]
Description = "Move to the previously active pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  ;"
[[Snippets]]
Description = "Clear the marked pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  m"
[[Snippets]]
Description = "Search for a pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  f"
[[Snippets]]
Description = "Kill the active pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  x"
[[Snippets]]
Description = "Zoom the active pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  z"
[[Snippets]]
Description = "Swap the active pane with the pane above"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  {"
[[Snippets]]
Description = "Swap the active pane with the pane below"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  }"
[[Snippets]]
Description = "Rotate through the panes in reverse"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  alt + o"
[[Snippets]]
Description = "Spread panes out evenly"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  e"
[[Snippets]]
Description = "Toggle the marked pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  m"
[[Snippets]]
Description = "Select the next pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  o"
[[Snippets]]
Description = "Select the previous pane"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  p"
[[Snippets]]
Description = "Display pane numbers"
Output = ""
Tag = ["tmux", "shortcuts", "panes"]
command = "ctrl + b  q"
[[Snippets]]
Description = "List all sessions"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "tmux ls"
[[Snippets]]
Description = "Choose a session from a list"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "ctrl + b  s"
[[Snippets]]
Description = "Rename current session"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "ctrl + b  $"
[[Snippets]]
Description = "Switch to previous client"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "ctrl + b  ("
[[Snippets]]
Description = "Switch to next client"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "ctrl + b  )"
[[Snippets]]
Description = "Switch to the last client"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "ctrl + b  l"
[[Snippets]]
Description = "Detach the current client"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "ctrl + b  d"
[[Snippets]]
Description = "Suspend the current client"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "ctrl + b  ctrl + z"
[[Snippets]]
Description = "Redraw the current client"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "ctrl + b  r"
[[Snippets]]
Description = "Choose a client from a list"
Output = ""
Tag = ["tmux", "shortcuts", "sessions"]
command = "ctrl + b  d"
[[Snippets]]
Description = "Set the even-horizontal layout"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  alt + 1"
[[Snippets]]
Description = "Set the even-vertical layout"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  alt + 2"
[[Snippets]]
Description = "Set the main-horizontal layout"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  alt + 3"
[[Snippets]]
Description = "Set the main-vertical layout"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  alt + 4"
[[Snippets]]
Description = "Select the tiled layout"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  alt + 5"
[[Snippets]]
Description = "Resize the pane up by 5"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  alt + up"
[[Snippets]]
Description = "Resize the pane down by 5"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  alt + down"
[[Snippets]]
Description = "Resize the pane left by 5"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  alt + left"
[[Snippets]]
Description = "Resize the pane right by 5"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  alt + right"
[[Snippets]]
Description = "Resize the pane up"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  ctrl + up"
[[Snippets]]
Description = "Resize the pane down"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  ctrl + down"
[[Snippets]]
Description = "Resize the pane left"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  ctrl + left"
[[Snippets]]
Description = "Resize the pane right"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  ctrl + right"
[[Snippets]]
Description = "Select next layout"
Output = ""
Tag = ["tmux", "shortcuts", "layout"]
command = "ctrl + b  space"
[[Snippets]]
Description = "Rename all items in a directory to lower case"
Output = ""
Tag = []
command = "for i in *; do mv \"$i\" \"${i,,}\"; done"
[[Snippets]]
Description = "mount the first partition of the raw disk image"
Output = ""
Tag = []
command = "sudo mount -o loop,offset=1048576 disk.img /mnt"
[[Snippets]]
Description = "test password strength"
Output = ""
Tag = []
command = "echo \"123456\" | cracklib-check"
[[Snippets]]
Description = "change kernel module parameters"
Output = ""
Tag = []
command = "modprobe <module> <param=value>"
[[Snippets]]
Description = "monitor cpu frequency"
Output = ""
Tag = []
command = "watch -n1 \"grep \\\"^[c]pu MHz\\\" /proc/cpuinfo\""
[[Snippets]]
Description = "ag + grep"
Output = ""
Tag = []
command = "rg"
[[Snippets]]
Description = "change directory to selected"
Output = ""
Tag = ["fzf"]
command = "cd **<tab>"
[[Snippets]]
Description = "extract or unpack adb backup"
Output = ""
Tag = []
command = "( printf \"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\" ; tail -c +25 backup.ab ) | tar xfvz -"
[[Snippets]]
Description = "show backup help"
Output = ""
Tag = []
command = "adb shell bu help"
[[Snippets]]
Description = "list filesystems"
Output = ""
Tag = []
command = "lsblk --fs"
[[Snippets]]
Description = "install apk file"
Output = ""
Tag = ["android"]
command = "adb install -r App.apk"
[[Snippets]]
Description = "system uptime"
Output = ""
Tag = []
command = "uptime"
[[Snippets]]
Description = "set default boot entry"
Output = ""
Tag = ["systemd-boot"]
command = "sudo bootctl set-default <name>.conf"
[[Snippets]]
Description = "add samba user"
Output = ""
Tag = []
command = "sudo smbpasswd -a <username>"
[[Snippets]]
Description = "generate new gpg key pair"
Output = ""
Tag = ["pgp"]
command = "gpg --full-gen-key"
[[Snippets]]
Description = "publish gpg key"
Output = ""
Tag = ["pgp"]
command = "gpg --keyserver keyserver.ubuntu.com --send-keys <key-id>"
[[Snippets]]
Description = "list pgp secret keys"
Output = ""
Tag = ["pgp"]
command = "gpg --list-secret-keys"
[[Snippets]]
Description = "add git submodule"
Output = ""
Tag = []
command = "git submodule add <url> <submod>"
[[Snippets]]
Description = "change git submodule remote url"
Output = ""
Tag = []
command = "git submodule set-url <submod> <url>"
[[Snippets]]
Description = "overwrite local changes via force \"git pull\""
Output = ""
Tag = []
command = "git reset --hard HEAD && git pull"
[[Snippets]]
Description = "check fs type"
Output = ""
Tag = []
command = "sudo file -s /dev/sda1"
[[Snippets]]
Description = "change partition guid"
Output = ""
Tag = ["gpt"]
command = "sgdisk -u 1:BC87D91A-02F3-4C52-87CD-536A3DF2A074 /dev/sdc"
[[Snippets]]
Description = "fat change uuid"
Output = ""
Tag = []
command = "mkdosfs -i ABCD1234 /dev/sdc1"
[[Snippets]]
Description = "change fat label"
Output = ""
Tag = []
command = "sudo dosfslabel /dev/sda3 EFI"
[[Snippets]]
Description = "git pull submodules at first time"
Output = ""
Tag = []
command = "git submodule update --init --recursive"
[[Snippets]]
Description = "git update submodules"
Output = ""
Tag = []
command = "git submodule update --recursive"
[[Snippets]]
Description = "git clone with submodules"
Output = ""
Tag = []
command = "git clone --recurse-submodules <repo>"
[[Snippets]]
Description = "btrfs display quota limit"
Output = ""
Tag = []
command = "sudo btrfs qgroup show /"
[[Snippets]]
Description = "btrfs enable quota"
Output = ""
Tag = []
command = "sudo btrfs quota enable <path>"
[[Snippets]]
Description = "btrfs set quota limit"
Output = ""
Tag = []
command = "sudo btrfs qgroup limit 10G /var/log"
[[Snippets]]
Description = "create arch linux boot entry without sytemd-boot or grub"
Output = ""
Tag = []
command = "efibootmgr --create --disk /dev/sdX --part Y --label \"Arch Linux\" --loader /vmlinuz-linux --unicode 'root=block_device_identifier rw initrd=\\initramfs-linux.img'"
[[Snippets]]
Description = "copy file and show progress"
Output = ""
Tag = []
command = "pv <source> > <dest>"
[[Snippets]]
Description = "get mac address"
Output = ""
Tag = []
command = "cat /sys/class/net/enp7s0/address"
[[Snippets]]
Description = "install or upgrade plasma packages"
Output = ""
Tag = []
command = "plasmapkg2 -u <name>"
[[Snippets]]
Description = "jq playground tui"
Output = ""
Tag = []
command = "jqp"
[[Snippets]]
Description = "configure Powerlevel10k"
Output = ""
Tag = []
command = "p10k configure"
[[Snippets]]
Description = "show motherboard"
Output = ""
Tag = []
command = "sudo dmidecode -s baseboard-product-name"
[[Snippets]]
Description = "calculate hex"
Output = ""
Tag = []
command = "echo \"ibase=16; A + 1\" | bc"
[[Snippets]]
Description = "print lines between line number"
Output = ""
Tag = []
command = "sed -n '10,20p' file.txt"
[[Snippets]]
Description = "kde list sessions"
Output = ""
Tag = []
command = "qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.sessionList"
[[Snippets]]
Description = "kde save session"
Output = ""
Tag = []
command = "qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession"
[[Snippets]]
Description = "Installs packages to an existing pipx-managed virtual environment"
Output = ""
Tag = []
command = "pipx inject <package> <dependency==version>"
[[Snippets]]
Description = "apply linux console changes"
Output = ""
Tag = []
command = "sudo systemctl restart systemd-vconsole-setup"
[[Snippets]]
Description = "git reset or revert file to a specific commit"
Output = ""
Tag = []
command = "git checkout <commit> -- <file>"
[[Snippets]]
Description = "Delete word at left"
Output = ""
Tag = ["shortcut"]
command = "Alt + Backspace"
[[Snippets]]
Description = "Delete all charactesr to the right of the cursor"
Output = ""
Tag = ["shortcut"]
command = "^K"
[[Snippets]]
Description = "save pypi token to publish packages"
Output = ""
Tag = []
command = "poetry config pypi-token.pypi '<token>'"
[[Snippets]]
Description = "run several commands with sudo"
Output = ""
Tag = []
command = "sudo sh -c '<commands>'"
[[Snippets]]
Description = "secure boot manager"
Output = ""
Tag = []
command = "sbctl"
[[Snippets]]
Description = "show execution time"
Output = ""
Tag = []
command = "time"
[[Snippets]]
Description = "update dependency via poetry"
Output = ""
Tag = ["python"]
command = "poetry update"
[[Snippets]]
Description = "add device to raid array"
Output = ""
Tag = []
command = "sudo mdadm /dev/md0 -a /dev/nvme1n1p1"
[[Snippets]]
Description = "raid info"
Output = ""
Tag = []
command = "sudo mdadm -Q /dev/md0"
[[Snippets]]
Description = "scan raid"
Output = ""
Tag = []
command = "sudo mdadm --assemble --scan"
[[Snippets]]
Description = "reinstall package and overwrite configs"
Output = ""
Tag = []
command = "sudo pacman -S <package> --overwrite='*'"
[[Snippets]]
Description = "immediately update pacman mirror list"
Output = ""
Tag = []
command = "sudo systemctl start reflector"
[[Snippets]]
Description = "cheats -c -s <query>"
Output = ""
Tag = []
command = "search cheats"
[[Snippets]]
Description = "test random write"
Output = ""
Tag = []
command = "fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randwrite"
[[Snippets]]
Description = "create password protected archive with encrypted filenames via 7zip. WARNING: does not store owner user/group!!!"
Output = ""
Tag = []
command = "7z a -m0=zstd -mx9 -mhe=on -p<password> <archive.7z> <files>"
[[Snippets]]
Description = "rebuild docker container"
Output = ""
Tag = []
command = "docker compose up -d --build --force-recreate --no-deps <service_name>"
[[Snippets]]
Description = "list docker volumes"
Output = ""
Tag = []
command = "docker volume ls"
[[Snippets]]
Description = "remove docker volume data"
Output = ""
Tag = []
command = "docker volume rm <volume_name>"
[[Snippets]]
Description = "remove all the containers, networks, volumes and images defined in the docker-compose"
Output = ""
Tag = []
command = "docker compose down -v --rmi all"
[[Snippets]]
Description = "completely remove sensitive data from git repo"
Output = ""
Tag = []
command = "bfg --replace-text <input> .git"
[[Snippets]]
Description = "quick test drive health"
Output = ""
Tag = ["ssd"]
command = "sudo smatrctl -H /dev/nvme0n1"
[[Snippets]]
Description = "start drive self-test"
Output = ""
Tag = ["ssd"]
command = "sudo smartctl --test=long /dev/nvme0"
[[Snippets]]
Description = "program memory usage"
Output = ""
Tag = []
command = "ps_mem -p $(pgrep -d, code)"
[[Snippets]]
Description = "cut the video/audio based on start and end time using ffmpeg"
Output = ""
Tag = []
command = "ffmpeg -i Lindemann\\ -\\ Knebel.mp3 -ss 00:02:30 -to 00:02:45 -c copy test.mp3"
[[Snippets]]
Description = "show information about user login and processes"
Output = ""
Tag = []
command = "loginctl user-status <user=1000>"
[[Snippets]]
Description = "calculate total file size"
Output = ""
Tag = []
command = "du -ch"
[[Snippets]]
Description = "check integrity of package files"
Output = ""
Tag = ["pacman"]
command = "sudo paccheck --md5sum --quiet"
[[Snippets]]
Description = "list of files of a tar.gz"
Output = ""
Tag = []
command = "tar -tvf <file>"
[[Snippets]]
Description = "delete line from file by number"
Output = ""
Tag = []
command = "sed -i '<N>d'"
[[Snippets]]
Description = "help zsh builtin functions"
Output = ""
Tag = []
command = "man zshbuiltins"
[[Snippets]]
Description = "color text zsh"
Output = ""
Tag = []
command = "print -P %F{green}text%f"
[[Snippets]]
Description = "docker kill all containers"
Output = ""
Tag = []
command = "docker kill $(docker ps -q)"
[[Snippets]]
Description = "replacement for ls"
Output = ""
Tag = []
command = "eza"
[[Snippets]]
Description = "find damaged files"
Output = ""
Tag = []
command = "btrfs scrub start -Bd /"
[[Snippets]]
Description = "cancel merge with conflicts"
Output = ""
Tag = []
command = "git merge --abort"
[[Snippets]]
Description = "git merge accept incomming"
Output = ""
Tag = []
command = "git merge develop -Xtheirs"
[[Snippets]]
Description = "diff branches"
Output = ""
Tag = []
command = "git diff develop"
[[Snippets]]
Description = "find duplicate extents in files and remove them"
Output = ""
Tag = ["btrfs"]
command = "sudo duperemove -dr <path>"
[[Snippets]]
Description = "show desktop notification"
Output = ""
Tag = []
command = "notify-send"
[[Snippets]]
Description = "rank archlinux mirrors by speed"
Output = ""
Tag = []
command = "rankmirrors -n 10 /etc/pacman.d/mirrorlist.orig > /etc/pacman.d/mirrorlist"
[[Snippets]]
Description = "check remote port is open"
Output = ""
Tag = []
command = "nc -z -v -w5 <host> <port>"
[[Snippets]]
Description = "scan ports using natcat"
Output = ""
Tag = []
command = "netcat -z -v <host> 1-1000"
[[Snippets]]
Description = "random username via leaked wiki"
Output = ""
Tag = []
command = "curl -s https://api.leaked.wiki/randomuser | jq -r .username"
[[Snippets]]
Description = "convert array to jsonl"
Output = ""
Tag = []
command = "jq -c '.[]'"
[[Snippets]]
Description = "show file size"
Output = ""
Tag = []
command = "ls -sh <file>"
[[Snippets]]
Description = "start short drive self-test"
Output = ""
Tag = ["ssd"]
command = "sudo smartctl -t short /dev/nvme0"
[[Snippets]]
Description = "start extended drive self-test"
Output = ""
Tag = ["ssd"]
command = "sudo smartctl -t long /dev/nvme0"
[[Snippets]]
Description = "show firewall policies"
Output = ""
Tag = []
command = "sudo ufw status verbose"
[[Snippets]]
Description = "allow incomming ssh connections from LAN"
Output = ""
Tag = ["firewall"]
command = "sudo ufw allow from 192.168.1.0/24 to any port 22"
[[Snippets]]
Description = "list firewall profiles"
Output = ""
Tag = []
command = "sudo ufw app list"
[[Snippets]]
Description = "information about firewall profile"
Output = ""
Tag = []
command = "sudo ufw app info 'Apache'"
[[Snippets]]
Description = "enable firewall"
Output = ""
Tag = []
command = "sudo ufw enable"
[[Snippets]]
Description = "disable firewall"
Output = ""
Tag = []
command = "sudo ufw disable"
[[Snippets]]
Description = "delete firewall policy or rule"
Output = ""
Tag = []
command = "sudo ufw delete <num|rule>"
[[Snippets]]
Description = "reset firewall rules"
Output = ""
Tag = []
command = "sudo ufw reset"
[[Snippets]]
Description = "enumerate firewall rules"
Output = ""
Tag = []
command = "sudo ufw status numbered"
[[Snippets]]
Description = "tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc"
Output = ""
Tag = []
command = "expect"
[[Snippets]]
Description = "delete all snapper snapshots"
Output = ""
Tag = []
command = "for c in $(snapper --no-headers --csvout list-configs --columns config); do\n sudo snapper -c \"$c\" delete $(sudo snapper --csvout --no-headers -c \"$c\" list --columns number | tail +2)\ndone"
[[Snippets]]
Description = "expose localhost port to internet"
Output = ""
Tag = []
command = "ssh -R 80:localhost:<port> nokey@localhost.run"
[[Snippets]]
Description = "force recreate and restart docker compose containers"
Output = ""
Tag = []
command = "docker-compose up -d --force-recreate"
[[Snippets]]
Description = "show all dns records"
Output = ""
Tag = []
command = "dig <hostname> ANY"
[[Snippets]]
Description = "show all dns records more pretty"
Output = ""
Tag = []
command = "dig +noall +answer +multiline <hostname>"
[[Snippets]]
Description = "list all A dns records"
Output = ""
Tag = []
command = "dig <hostname> +noall +answer -t A"
[[Snippets]]
Description = "list capabilities terminfo"
Output = ""
Tag = ["tput"]
command = "infocmp"
[[Snippets]]
Description = "relocate data from empty or near-empty chunks to free up space"
Output = ""
Tag = []
command = "sudo btrfs balance start -dusage=10 -musage=10 /mnt/btrfs"
[[Snippets]]
Description = "real-time monitoring of processes and resource usage"
Output = ""
Tag = []
command = "atop"
[[Snippets]]
Description = "delete all snapper snaphots old-style"
Output = ""
Tag = []
command = "for c in $(snapper list-configs | awk 'NR>2{print $1}'); do sudo snapper -c \"$c\" list | awk 'NR>3{print $1}' | xargs sudo snapper -c \"$c\" delete; done"
[[Snippets]]
Description = "make backup of the last srv snapper snapshot"
Output = ""
Tag = []
command = "ssh <host> \"tar --zstd -cvf - -C /srv/.snapshots/$(snapper -c srv list | awk 'END{print $1}')/snapshot/ .\"' > /run/media/$USER/data/backups/srv_$(date +%F).tar.zst"
[[Snippets]]
Description = "xargs with input from file"
Output = ""
Tag = []
command = "< <file> xargs"
[[Snippets]]
Description = "copy all files from android to the computer"
Output = ""
Tag = []
command = "adb pull /sdcard"
[[Snippets]]
Description = "run a one-off command on a service"
Output = ""
Tag = []
command = "docker compose run <service> <command>"
[[Snippets]]
Description = "unset all environment variables for specific command"
Output = ""
Tag = []
command = "env -i <command>"
[[Snippets]]
Description = "show command information. more useful than man"
Output = ""
Tag = []
command = "info <command>"
[[Snippets]]
Description = "test github ssh access"
Output = ""
Tag = []
command = "ssh git@github.com"
[[Snippets]]
Description = "truncate file"
Output = ""
Tag = []
command = ": > <filename>"
[[Snippets]]
Description = "remove first line"
Output = ""
Tag = []
command = "sed 1d <file>"
[[Snippets]]
Description = "change file ownership group"
Output = ""
Tag = []
command = "chgrp <group> <file>"
[[Snippets]]
Description = "open current command in editor"
Output = ""
Tag = ["shortcut"]
command = "Ctrl + X, E"
[[Snippets]]
Description = "change user UID"
Output = ""
Tag = []
command = "usermod -u <uid> <username>"
[[Snippets]]
Description = "add user to group"
Output = ""
Tag = []
command = "sudo adduser <username> <groupname>"
[[Snippets]]
Description = "change group GID"
Output = ""
Tag = []
command = "groupmod -g <NEW_GID> <GROUPNAME>"
[[Snippets]]
Description = "find out the server ip"
Output = ""
Tag = []
command = "hostname -I | awk '{print $1}'"
[[Snippets]]
Description = "service names, ports and protocols"
Output = ""
Tag = []
command = "cat /etc/services"
[[Snippets]]
Description = "protocol names and numbers"
Output = ""
Tag = []
command = "cat /etc/protocols"
[[Snippets]]
Description = "create default user folders"
Output = ""
Tag = []
command = "xdg-user-dirs-update"
[[Snippets]]
Description = "generate initramfs image"
Output = ""
Tag = []
command = "sudo dracut -fv --no-kernel"
[[Snippets]]
Description = "show booting parameters"
Output = ""
Tag = []
command = "sudo dracut --print-cmdline"
[[Snippets]]
Description = "cidr to ip list"
Output = ""
Tag = []
command = "prips 193.201.66.0/23"
[[Snippets]]
Description = "reverse dns lookup"
Output = ""
Tag = []
command = "dig -x <ip> @8.8.8.8 +noall +answer"
[[Snippets]]
Description = "get the hostname from an ip address"
Output = ""
Tag = []
command = "host -t PTR 8.8.8.8 | cut -d' ' -f5"
[[Snippets]]
Description = "find asn by ip address"
Output = ""
Tag = []
command = "whois -h whois.cymru.com ' -v 8.8.8.8'"
[[Snippets]]
Description = "swap out a running kernel without rebooting"
Output = ""
Tag = ["linux"]
command = "sudo kexec -l /boot/vmlinuz-linux --initrd=/boot/initramfs-linux.img --reuse-cmdline && sudo systemctl kexec"
[[Snippets]]
Description = "visual code display diagnostics information"
Output = ""
Tag = []
command = "code -s"
[[Snippets]]
Description = "generate pylint config"
Output = ""
Tag = []
command = "pylint --generate-rcfile > pylintrc"
[[Snippets]]
Description = "remove all unused volumes"
Output = ""
Tag = []
command = "docker volume prune -a"
[[Snippets]]
Description = "convert ip to cidr"
Output = ""
Tag = []
command = "ipcalc -rn 108.179.42.64-108.179.42.255"
[[Snippets]]
Description = "generate requirements.txt from pyproject.toml file"
Output = ""
Tag = []
command = "pip-compile -o requirements.txt pyproject.toml"
[[Snippets]]
Description = "draw text"
Output = ""
Tag = []
command = "magick -background purple -fill green -font 'Ubuntu' -pointsize 72 label:'Кислота' label.gig"
[[Snippets]]
Description = "pylint list messges"
Output = ""
Tag = []
command = "pylint --list-msgs"
[[Snippets]]
Description = "pip install by url from custom repository"
Output = ""
Tag = []
command = "pip install -i <url>"
[[Snippets]]
Description = "reset kde desktop"
Output = ""
Tag = []
command = "rm ~/.config/plasma-org.kde.plasma.desktop-appletsrc"
[[Snippets]]
Description = "set system locale"
Output = ""
Tag = []
command = "sudo localectl set-locale LANG=en_US.UTF-8"
[[Snippets]]
Description = "retrieve video information"
Output = ""
Tag = []
command = "ffprobe <file>"
[[Snippets]]
Description = "check integrity of packages"
Output = ""
Tag = []
command = "sudo pacman -Qkk"
[[Snippets]]
Description = "list cron tasks"
Output = ""
Tag = []
command = "crontab -l"
[[Snippets]]
Description = "upgrade all pipx-installed packages"
Output = ""
Tag = ["python"]
command = "pipx reinstall-all"
[[Snippets]]
Description = "see all kernel parameters"
Output = ""
Tag = []
command = "sudo sysctl -a"
[[Snippets]]
Description = "apply kernel settings"
Output = ""
Tag = []
command = "sudo sysctl --sys"
[[Snippets]]
Description = "run async python repl"
Output = ""
Tag = []
command = "python -m asyncio"
[[Snippets]]
Description = "Open incoming SSH but deny connections from an IP address that has attempted to initiate 6 or more connections in the last 30 seconds."
Output = ""
Tag = ["firewall"]
command = "sudo ufw limit ssh"
[[Snippets]]
Description = "unmount fuse filesystem"
Output = ""
Tag = []
command = "fusermount -u <MOUNTPOUNT>"
[[Snippets]]
Description = "like fd and find"
Output = ""
Tag = []
command = "bfs"
[[Snippets]]
Description = "interactive calculator"
Output = ""
Tag = []
command = "qacl"
[[Snippets]]
Description = "up network interface"
Output = ""
Tag = []
command = "nmcli dev up <interface>"
[[Snippets]]
Description = "down network interface"
Output = ""
Tag = []
command = "nmcli dev disconnect <interface>"
[[Snippets]]
Description = "view disk usage"
Output = ""
Tag = []
command = "dust"
[[Snippets]]
Description = "like curl"
Output = ""
Tag = []
command = "curlie"
[[Snippets]]
Description = "flatpak list installed applications size"
Output = ""
Tag = []
command = "flatpak list --columns=name,size"
[[Snippets]]
Description = "grep exclude patterns from a file"
Output = ""
Tag = []
command = "grep -vf exclude.txt file.txt"
[[Snippets]]
Description = "sort lines in the file"
Output = ""
Tag = []
command = "sort <file> -o <file>"
[[Snippets]]
Description = "verify package(s)"
Output = ""
Tag = []
command = "yay -Qk"
[[Snippets]]
Description = "fix broken packages"
Output = ""
Tag = ["devtools"]
command = "lddd"
[[Snippets]]
Description = "erase all data on device"
Output = ""
Tag = []
command = "blkdiscard <device>"
[[Snippets]]
Description = "filter pacman log"
Output = ""
Tag = []
command = "paclog <search>"
[[Snippets]]
Description = "force ssh to prompt with password"
Output = ""
Tag = []
command = "ssh -o PubkeyAuthentication=no -o PreferredAuthentications=password <host>"
[[Snippets]]
Description = "local port forwarding"
Output = ""
Tag = []
command = "ssh -L <local_port>:<remote_address>:<remote_port> <host>"
[[Snippets]]
Description = "remote port forwarding"
Output = ""
Tag = []
command = "ssh -R <remote_port>:<local_address>:<local_port> <host>"
[[Snippets]]
Description = "launch chromium using socks5 proxy"
Output = ""
Tag = []
command = "chromium --proxy-server='socks5://<addr=localhost:1080>' <url>"
[[Snippets]]
Description = "launch brave in incognito mode"
Output = ""
Tag = []
command = "brave --incognito <url>"
[[Snippets]]
Description = "remove duplicate lines"
Output = ""
Tag = []
command = "sort -u <file> -o <file>"
[[Snippets]]
Description = "find a process with a commandline"
Output = ""
Tag = []
command = "pgrep -a <pattern>"
[[Snippets]]
Description = "tcp syn scan ports 1-10000 ports"
Output = ""
Tag = []
command = "sudo nmap -sS -p -10000 <host>"
[[Snippets]]
Description = "ncdu for btrfs"
Output = ""
Tag = []
command = "sudo btdu /mnt/btrfs"
[[Snippets]]
Description = "interactive grep"
Output = ""
Tag = ["ugrep"]
command = "ug <PATTERN>"
[[Snippets]]
Description = "delete last commit"
Output = ""
Tag = []
command = "git reset --hard HEAD~1"
[[Snippets]]
Description = "undo last commit but keep changes"
Output = ""
Tag = []
command = "git reset HEAD~1"
[[Snippets]]
Description = "schedule command to run every hour with systemd"
Output = ""
Tag = []
command = "systemd-run --on-calendar '*-*-* *:00:00' <command>"
[[Snippets]]
Description = "check secure boot"
Output = ""
Tag = []
command = "mokutil --sb-state"
[[Snippets]]
Description = "install a specific python version using hatch"
Output = ""
Tag = []
command = "hatch python install 3.12"
[[Snippets]]
Description = "run python from virtual environment"
Output = ""
Tag = []
command = "hatch run python"
[[Snippets]]
Description = "update installed python distribution using hatch"
Output = ""
Tag = []
command = "hatch python update 3.12"
[[Snippets]]
Description = "remove installed python distribution using hatch"
Output = ""
Tag = []
command = "hatch python remove 3.12"
[[Snippets]]
Description = "run a shell within a specific environment using hatch"
Output = ""
Tag = []
command = "hatch shell -e test"
[[Snippets]]
Description = "create new python project using hatch"
Output = ""
Tag = []
command = "hatch new <project>"
[[Snippets]]
Description = "build & publish python project to pypi using hatch"
Output = ""
Tag = []
command = "hatch build && hatch publish"
[[Snippets]]
Description = "create new python project using flit"
Output = ""
Tag = []
command = "flit init"
[[Snippets]]
Description = "build and publish python project using flit"
Output = ""
Tag = []
command = "flit build && flit publish"
[[Snippets]]
Description = "install locally your python package using flit"
Output = ""
Tag = []
command = "flit install --symlink --python /path/to/python"
[[Snippets]]
Description = "retrieves the new commits but doesn't merge them into your current branch"
Output = ""
Tag = []
command = "git fetch"
[[Snippets]]
Description = "find city and country by my ip"
Output = ""
Tag = []
command = "curl -s ipinfo.io"
[[Snippets]]
Description = "ssh force using public key"
Output = ""
Tag = []
command = "ssh -o BatchMode=yes"
[[Snippets]]
Description = "make the systemd service unstartable"
Output = ""
Tag = []
command = "systemctl mask <service>"
[[Snippets]]
Description = "rotate13"
Output = ""
Tag = []
command = "tr 'N-ZA-Mn-za-m' 'A-MN-Za-mn-z'"
[[Snippets]]
Description = "stop and remove container using docker compose"
Output = ""
Tag = []
command = "docker-compose rm -s <container>"
[[Snippets]]
Description = "install docker on ubuntu"
Output = ""
Tag = []
command = "wget -qO- https://get.docker.com/ | sh"
[[Snippets]]
Description = "remove all build cache"
Output = ""
Tag = []
command = "docker buildx prune -a"
[[Snippets]]
Description = "find by extension"
Output = ""
Tag = []
command = "find . -name '*.txt'"
[[Snippets]]
Description = "boot into uefi next time"
Output = ""
Tag = []
command = "systemctl reboot --firmware-setup"
[[Snippets]]
Description = "systemd list enabled services"
Output = ""
Tag = []
command = "systemctl list-unit-files --state=enabled"
[[Snippets]]
Description = "create temporary paste"
Output = ""
Tag = []
command = "| curl -F text=@- https://upaste.de/"
[[Snippets]]
Description = "find and kill process"
Output = ""
Tag = []
command = "sudo pkill -9 -e <pattern>"
[[Snippets]]
Description = "Use fzf to navigate and select git commits"
Output = ""
Tag = []
command = "git log --oneline | fzf"
[[Snippets]]
Description = "Expose a local web server on port 8080 to the internet"
Output = ""
Tag = []
command = "ngrok http 8080"
[[Snippets]]
Description = "Check the status of active tunnels"
Output = ""
Tag = []
command = "ngrok status"
[[Snippets]]
Description = "Expose a local SSH server on port 22"
Output = ""
Tag = []
command = "ngrok tcp 22"
[[Snippets]]
Description = "Open Ranger in the current directory"
Output = ""
Tag = []
command = "ranger"
[[Snippets]]
Description = "Navigate to a specific directory"
Output = ""
Tag = []
command = "ranger /path/to/directory"
[[Snippets]]
Description = "Exit Ranger and switch to the last visited directory"
Output = ""
Tag = []
command = "ranger --choosedir=/tmp/lastdir; cd $(cat /tmp/lastdir)"
[[Snippets]]
Description = "Send a GET request"
Output = ""
Tag = []
command = "http GET https://jsonplaceholder.typicode.com/posts/1"
[[Snippets]]
Description = "Send a POST request with JSON data"
Output = ""
Tag = []
command = "http POST https://jsonplaceholder.typicode.com/posts title=\"foo\" body=\"bar\" userId:=1"
[[Snippets]]
Description = "Send a GET request with custom headers"
Output = ""
Tag = []
command = "http GET https://httpbin.org/headers \"User-Agent: Httpie\""
[[Snippets]]
Description = "Search for the term \"TODO\" in the current directory"
Output = ""
Tag = []
command = "ag TODO"
[[Snippets]]
Description = "Exclude certain files from the search"
Output = ""
Tag = []
command = "ag --ignore \"*.min.js\" \"function\""
[[Snippets]]
Description = "Search only in Python files for function definitions"
Output = ""
Tag = []
command = "ag --python \"def \""
[[Snippets]]
Description = "Display system information with the Linux distribution logo"
Output = ""
Tag = []
command = "neofetch"
[[Snippets]]
Description = "Show only text information, without the logo"
Output = ""
Tag = []
command = "neofetch --off"
[[Snippets]]
Description = "Display information in ASCII format"
Output = ""
Tag = []
command = "neofetch --ascii"
[[Snippets]]
Description = "Open Broot in the current directory"
Output = ""
Tag = []
command = "broot"
[[Snippets]]
Description = "Quickly find a file by name"
Output = ""
Tag = []
command = "broot <filename>"
[[Snippets]]
Description = "Switch to move/copy mode"
Output = ""
Tag = []
command = "broot --cmd :move"
[[Snippets]]
Description = "Change to a directory by partial name match"
Output = ""
Tag = []
command = "z foo"
[[Snippets]]
Description = "Jump to a directory that contains both \"foo\" and \"bar\""
Output = ""
Tag = []
command = "z foo bar"
[[Snippets]]
Description = "Show the list of most frequently visited directories"
Output = ""
Tag = []
command = "zoxide query -l"
[[Snippets]]
Description = "Add a new task with a due date of tomorrow"
Output = ""
Tag = []
command = "task add \"Write report\" due:tomorrow"
[[Snippets]]
Description = "List all current tasks"
Output = ""
Tag = []
command = "task list"
[[Snippets]]
Description = "Mark a task as done"
Output = ""
Tag = []
command = "task <id> done"
[[Snippets]]
Description = "Search for a file in the current directory"
Output = ""
Tag = []
command = "find . -type f | fzf"
[[Snippets]]
Description = "Interactive search and execute commands from bash history"
Output = ""
Tag = []
command = "history | fzf"
[[Snippets]]
Description = "scan all ports"
Output = ""
Tag = []
command = "nmap <IP> -sS -p-"
[[Snippets]]
Description = "view logs with navigation and date grouping"
Output = ""
Tag = []
command = "lnav <file|directory|url>"
[[Snippets]]
Description = "view logs with navigation and date grouping via ssh"
Output = ""
Tag = []
command = "lnav ssh <user>@<server>:<path>"
[[Snippets]]
Description = "terminal file manager"
Output = ""
Tag = []
command = "yazi"
[[Snippets]]
Description = "simple git ui"
Output = ""
Tag = []
command = "lazygit"
[[Snippets]]
Description = "monitor process resource usage"
Output = ""
Tag = []
command = "top -p <PID>"
[[Snippets]]
Description = "tracks file operations of a command"
Output = ""
Tag = []
command = "strace -e trace=open,openat,read,write -f <command>"
[[Snippets]]
Description = "show flatpak app environment variables"
Output = ""
Tag = []
command = "flatpak run --command=env com.visualstudio.code"
[[Snippets]]
Description = "disable application update via flatpak update"
Output = ""
Tag = []
command = "flatpak mask <application-id>"
[[Snippets]]
Description = "remove dependency from go project"
Output = ""
Tag = []
command = "go mod edit -droprequire=github.com/example/module && go mod tidy"
[[Snippets]]
Description = "install go module"
Output = ""
Tag = []
command = "go get <module>"
[[Snippets]]
Description = "uninstall go module"
Output = ""
Tag = []
command = "go get -d <module>"
[[Snippets]]
Description = "upload file to gofile.io"
Output = ""
Tag = []
command = "curl -F file=@<file> https://store1.gofile.io/uploadFile"
[[Snippets]]
Description = "List SSH keys added to the SSH agent."
Output = ""
Tag = []
command = "ssh-add -l"
[[Snippets]]
Description = "Add SSH key to the SSH agent."
Output = ""
Tag = []
command = "ssh-add ~/.ssh/id_ed25519"
[[Snippets]]
Description = "check service is enabled"
Output = ""
Tag = []
command = "systemctl is-enabled <service>"
[[Snippets]]
Description = "view the full command associated with a PID"
Output = ""
Tag = []
command = "ps -p <PID> -o cmd="
[[Snippets]]
Description = "update ventoy"
Output = ""
Tag = []
command = "sudo ventoy -u /dev/sdb"
[[Snippets]]
Description = "uninstall the flatpak application and removes all associated user data without requiring confirmation"
Output = ""
Tag = []
command = "flatpak uninstall -y --delete-data firefox"
[[Snippets]]
Description = "search fonts"
Output = ""
Tag = []
command = "fc-list | grep <q>"
[[Snippets]]
Description = "edit zellij config"
Output = ""
Tag = []
command = "vim ~/.config/zellij/config.kdl"
[[Snippets]]
Description = "Monitor the real-time output of the service logs."
Output = ""
Tag = []
command = "journalctl -f -u <service>"
[[Snippets]]
Description = "Ban IP address on the server."
Output = ""
Tag = []
command = "sudo iptables -A INPUT -s <ip> -j DROP"
[[Snippets]]
Description = "list all rules in the INPUT chain of the iptables"
Output = ""
Tag = []
command = "sudo iptables -L INPUT --line-numbers"
[[Snippets]]
Description = "shows memory usage in MB for the process and its child processes"
Output = ""
Tag = []
command = "smem -kP <process_name>"
[[Snippets]]
Description = "Locate file in Arch database"
Output = ""
Tag = []
command = "sudo pacman -Fy <file name>"
[[Snippets]]
Description = "List group's installed packages"
Output = ""
Tag = []
command = "pacman -Qg <group>"
[[Snippets]]
Description = "Show package details locally"
Output = ""
Tag = []
command = "pacman -Qi <package>"
[[Snippets]]
Description = "List package's files"
Output = ""
Tag = []
command = "pacman -Ql <package>"
[[Snippets]]
Description = "Identify file's package"
Output = ""
Tag = []
command = "pacman -Qo <filename>"
[[Snippets]]
Description = "List all installed packages"
Output = ""
Tag = []
command = "pacman -Qqe"
[[Snippets]]
Description = "Search among installed packages"
Output = ""
Tag = []
command = "pacman -Qs <search>"
[[Snippets]]
Description = "Forcefully remove package"
Output = ""
Tag = []
command = "sudo pacman -Rdd <package>"
[[Snippets]]
Description = "Uninstall package"
Output = ""
Tag = []
command = "sudo pacman -Rns <package>"
[[Snippets]]
Description = "Remove orphaned packages"
Output = ""
Tag = []
command = "sudo pacman -Rns $(pacman -Qtdq)"
[[Snippets]]
Description = "Reinstall all packages"
Output = ""
Tag = []
command = "sudo pacman -S $(pacman -Qqn)"
[[Snippets]]
Description = "Install package from file"
Output = ""
Tag = []
command = "sudo pacman -U <file>"
[[Snippets]]
Description = "Install package"
Output = ""
Tag = []
command = "sudo pacman -S <package>"
[[Snippets]]
Description = "Clear package cache"
Output = ""
Tag = []
command = "sudo pacman -Sc"
[[Snippets]]
Description = "Show remote package details"
Output = ""
Tag = []
command = "pacman -Si <package>"
[[Snippets]]
Description = "List reverse dependencies"
Output = ""
Tag = []
command = "pacman -Sii <package>"
[[Snippets]]
Description = "Search for packages"
Output = ""
Tag = []
command = "pacman -Ss <search>"
[[Snippets]]
Description = "Install from local file"
Output = ""
Tag = []
command = "sudo pacman -U /var/cache/pacman/pkg/<package>.pkg.tar.zst"
[[Snippets]]
Description = "List AUR packages"
Output = ""
Tag = []
command = "pacman -Qm"
[[Snippets]]
Description = "Find package dependencies"
Output = ""
Tag = []
command = "pacman -Sii"
[[Snippets]]
Description = "Update system excluding kernel"
Output = ""
Tag = []
command = "sudo pacman -Syu --ignore linux --ignore linux-headers"
[[Snippets]]
Description = "List installed files by package"
Output = ""
Tag = []
command = "pacman -Fl <package>"
[[Snippets]]
Description = "List explicitly installed packages"
Output = ""
Tag = []
command = "pacman -Qqe"
[[Snippets]]
Description = "Reinstall package with config overwrite"
Output = ""
Tag = []
command = "sudo pacman -S <package> --overwrite='*'"
[[Snippets]]
Description = "Verify package integrity"
Output = ""
Tag = []
command = "pacman -Qk"
[[Snippets]]
Description = "choose kitty theme"
Output = ""
Tag = []
command = "kitten themes"
[[Snippets]]
Description = "show key codes in kitty\u000F"
Output = ""
Tag = []
command = "kitty +kitten show_key"
[[Snippets]]
Description = "list fonts ghostty"
Output = ""
Tag = []
command = "ghostty +list-fonts"
[[Snippets]]
Description = "list themes ghostty"
Output = ""
Tag = []
command = "ghostty +list-themes"
[[Snippets]]
Description = "show alacritty bindings"
Output = ""
Tag = []
command = "man alacritty-bindings"
[[Snippets]]
Description = "delete first and last lines"
Output = ""
Tag = []
command = "sed -i -e '1d' -e '$d' <filename>"
[[Snippets]]
Description = "Quickly edit the last commit's message."
Output = ""
Tag = []
command = "git commit --amend -m '<message>'"
[[Snippets]]
Description = "delete local tags"
Output = ""
Tag = []
command = "git tag | xargs git tag -d"
[[Snippets]]
Description = "wine configuration"
Output = ""
Tag = []
command = "winecfg"
[[Snippets]]
Description = "uninstall programs via wine"
Output = ""
Tag = []
command = "wine uninstaller"
[[Snippets]]
Description = "list all wine components"
Output = ""
Tag = []
command = "winetricks list-all"
[[Snippets]]
Description = "install wine component"
Output = ""
Tag = []
command = "wintetricks -q win10"
[[Snippets]]
Description = "run wine explorer"
Output = ""
Tag = []
command = "wine explorer"
[[Snippets]]
Description = "reload gpg client"
Output = ""
Tag = []
command = "gpg-connect-agent reloadagent /bye"
[[Snippets]]
Description = "copy otp code to the clipboard"
Output = ""
Tag = []
command = "pass otp -c <entry>"
[[Snippets]]
Description = "search oh my fish themes or packages"
Output = ""
Tag = []
command = "omf search <query>"
[[Snippets]]
Description = "reload kitty"
Output = ""
Tag = []
command = "pkill -SIGUSR1 kitty"
[[Snippets]]
Description = "kitty apply config"
Output = ""
Tag = []
command = "kitty @ load-config"
[[Snippets]]
Description = "describe function"
Output = ""
Tag = ["fish"]
command = "functions fish_default_key_bindings"
[[Snippets]]
Description = "save function"
Output = ""
Tag = ["fish"]
command = "funcsave fish_user_key_bindings"
[[Snippets]]
Description = "edit fuction"
Output = ""
Tag = ["fish"]
command = "funced fish_user_key_bindings"
[[Snippets]]
Description = "flush dns cache"
Output = ""
Tag = []
command = "sudo resolvectl flush-caches"
[[Snippets]]
Description = "show image layer creation history"
Output = ""
Tag = []
command = "docker history adguard/dnsproxy"
[[Snippets]]
Description = "update fish completions"
Output = ""
Tag = []
command = "fish_update_completions"
[[Snippets]]
Description = "remove selected packages"
Output = ""
Tag = []
command = "pacman -Qqe | fzf -m | xargs -I {} sudo pacman -Rns --noconfirm {}"
[[Snippets]]
Description = "check firmware updates"
Output = ""
Tag = []
command = "sudo fwupdmgr refresh && sudo fwupdmgr get-updates"
[[Snippets]]
Description = "update firmware"
Output = ""
Tag = []
command = "sudo fwupdmgr update"
[[Snippets]]
Description = "Mount remote path via SSHFS"
Output = ""
Tag = []
command = "sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 <remote-host>:<remote-path> <local-path>"
[[Snippets]]
Description = "view smart self-test results"
Output = ""
Tag = []
command = "sudo smartctl -l selftest /dev/nvme1"
[[Snippets]]
Description = "list zellij sessions"
Output = ""
Tag = []
command = "zellij ls"
[[Snippets]]
Description = "list nerd fonts"
Output = ""
Tag = []
command = "fc-list --format=\"%{family}\\n\" | grep -i nerd | cut -d, -f1 | sort -u"
[[Snippets]]
Description = "rebuild initramfs images using dracut"
Output = ""
Tag = []
command = "sudo dracut --regenerate-all --force"
[[Snippets]]
Description = "rename files"
Output = ""
Tag = []
command = "perl-rename 's/\\.zsh$/.sh/' *.zsh"
[[Snippets]]
Description = "run neovim with sudo while preserving user environment"
Output = ""
Tag = []
command = "sudo -E nvim"
[[Snippets]]
Description = "list manually installed packages"
Output = ""
Tag = []
command = "pacman -Qqet"
[[Snippets]]
Description = "list ghostty keybindings"
Output = ""
Tag = []
command = "ghostty +list-keybinds"
[[Snippets]]
Description = "install packages from file via pacman"
Output = ""
Tag = []
command = "grep -vE '^#' ~/packages-dev.txt | sudo pacman -S --needed -"
[[Snippets]]
Description = "wayland forwarding over ssh"
Output = ""
Tag = []
command = "waypipe ssh"
[[Snippets]]
Description = "create a virtual environment using a specified python version"
Output = ""
Tag = []
command = "uv venv --seed -p <version>"
[[Snippets]]
Description = "Install latest lts Node.js version"
Output = ""
Tag = []
command = "nvm install --lts"
[[Snippets]]
Description = "Use a latest LTS Node.js version"
Output = ""
Tag = []
command = "nvm use --lts"
[[Snippets]]
Description = "Set default version for the Node.js"
Output = ""
Tag = []
command = "nvm alias default v22.18.0"
[[Snippets]]
Description = "List installed Node.js versions"
Output = ""
Tag = []
command = "nvm ls"
[[Snippets]]
Description = "create new pyhon project"
Output = ""
Tag = []
command = "uv init <project-name>"
[[Snippets]]
Description = "add dependecy to the python project"
Output = ""
Tag = []
command = "uv add <package>"
[[Snippets]]
Description = "Runs a shell inside the Zed Flatpak sandbox"
Output = ""
Tag = []
command = "flatpak run --command=sh dev.zed.Zed"
[[Snippets]]
Description = "sign efi"
Output = ""
Tag = ["secure", "boot"]
command = "sudo sbctl sign -s /boot/memtest86+/memtest.efi"
[[Snippets]]
Description = "reboot into"
Output = ""
Tag = []
command = "sudo bootctl set-oneshot <entry>"
[[Snippets]]
Description = "decompress an archive"
Output = ""
Tag = []
command = "ouch decompress <archive>"
[[Snippets]]
Description = "archive files"
Output = ""
Tag = []
command = "ouch compress <..files> <archive>"
[[Snippets]]
Description = "list files in an archive"
Output = ""
Tag = []
command = "ouch list <archive>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment