Last active
July 3, 2023 03:09
-
-
Save craSH/3b192e749efd9aaf9479bde4f65f13d6 to your computer and use it in GitHub Desktop.
description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[snippets]] | |
description = "pacman - show files owned by installed package" | |
command = "pacman -Ql <package>" | |
tag = ["arch", "package", "sysadmin"] | |
output = "" | |
[[snippets]] | |
description = "pacman - remove orphan packages" | |
command = "pacman -Qtdq | sudo pacman -Rns -" | |
tag = ["arch", "package", "sysadmin"] | |
output = "" | |
[[snippets]] | |
description = "Get TLS certificate validity period" | |
command = ": | openssl s_client -connect <host>:<port=443> 2>/dev/null | openssl x509 -dates -noout" | |
tag = ["network", "ssl", "tls", "certificate", "x509"] | |
output = "" | |
[[snippets]] | |
description = "pacman + aur - sync repos and upgrade all packages to latest version" | |
command = "yay --noconfirm --needed -Sy archlinux-keyring && yay -Su" | |
tag = ["arch", "aur", "package", "sysadmin"] | |
output = "" | |
[[snippets]] | |
description = "Secure delete a file" | |
command = "shred -uzn3 <file>" | |
tag = ["sysadmin", "security", "file"] | |
output = "" | |
[[snippets]] | |
description = "luks - show key slots/tokens" | |
command = "sudo cryptsetup luksDump /dev/disk/by-partlabel/<partlabel=cryptsystem>" | |
tag = ["sysadmin", "luks", "cryptsetup"] | |
output = "" | |
[[snippets]] | |
description = "zsh - display all command history" | |
command = "history 1" | |
tag = ["shell", "zsh", "builtins"] | |
output = "" | |
[[snippets]] | |
description = "apt - upgrade all packages to latest, and clean up afterwards" | |
command = "sudo sh -c 'for i in update dist-upgrade autoremove autoclean; do apt -y $i; done'" | |
tag = ["sysadmin", "packages", "apt", "debian", "ubuntu"] | |
output = "" | |
[[snippets]] | |
description = "terminal session recording - using script(1)" | |
command = "script -B <recording>.script -T <recording>.script_timing" | |
tag = ["sysadmin", "shell", "terminal", "recording"] | |
output = "" | |
[[snippets]] | |
description = "terminal session recording - using asciinema(1)" | |
command = "asciinema rec --stdin <recording>.cast" | |
tag = ["sysadmin", "shell", "terminal", "recording"] | |
output = "" | |
[[snippets]] | |
description = "Configure rust DEBUG builds to emit backtrace on panic" | |
command = "export RUST_BACKTRACE=1" | |
tag = ["development", "rust", "debugging"] | |
output = "" | |
[[snippets]] | |
description = "Remove files that aren't tracked by git" | |
command = "git clean -xfd" | |
tag = ["development", "git"] | |
output = "" | |
[[snippets]] | |
description = "Copy PWD to wayland clipboard" | |
command = "pwd | wl-copy" | |
tag = ["shell", "pwd", "wl-copy"] | |
output = "" | |
[[snippets]] | |
description = "cd to path in wayload clipboard" | |
command = "[[ -d \"$(wl-paste)\" ]] && cd $(wl-paste)" | |
tag = ["shell", "cd", "wl-paste"] | |
output = "" | |
[[snippets]] | |
description = "Encrypt a file with AES-256-CBC and a password using OpenSSL" | |
command = "openssl enc -aes-256-cbc -salt -pbkdf2 -in <file> -out <file>.enc" | |
tag = ["openssl", "encrypt"] | |
output = "" | |
[[snippets]] | |
description = "Decrypt a file with AES-256-CBC and a password using OpenSSL" | |
command = "openssl enc -d -aes-256-cbc -salt -pbkdf2 -in <file>.enc -out <file>" | |
tag = ["openssl", "decrypt"] | |
output = "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment