Last active
October 13, 2022 11:37
-
-
Save anutator/1da27255bb1dba12f7962e538b08ac15 to your computer and use it in GitHub Desktop.
My useful aliases and functions
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
| # Two varians — bash function or alias: podman, get container name, ip address and ports. | |
| podip () { | |
| podman inspect -f '{{.Name}}\t{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}\t{{.NetworkSettings.Ports}}' $(podman ps -q) | |
| } | |
| # in alias you must use two backslashes \\t to make Tab working | |
| alias podip='podman inspect -f ''{{.Name}}\\t{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}\\t{{.NetworkSettings.Ports}}'' $(podman ps -q)' | |
| # сжатие всех png файлов из каталогов и подкаталогов текущего каталога. Установить `sudo apt install png{quant,check} zopfli` | |
| alias png1='find . -type f -name "*.png" -exec pngquant 64 --skip-if-larger --strip --ext=.png --force {} +' | |
| alias png2='find . -type f -name "*.png" -print0 | xargs -0 -I '{}' zopflipng -y '{}' '{}'' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment