Skip to content

Instantly share code, notes, and snippets.

@b4tman
b4tman / ffmpeg-mp4-to-animated-webp.md
Created March 31, 2026 12:21 — forked from witmin/ffmpeg-mp4-to-animated-webp.md
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

for a in $(ls)
pushd "./$a"; echo $a
ls -a .git > /dev/null 2>&1 && git remote -v
popd
end
echo "" >> ~/.config/fish/config.fish
echo "set -U -x -a fish_user_paths \$HOME/.cargo/bin" >> ~/.config/fish/config.fish
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
fisher install kidonng/zoxide.fish
fisher install jethrokuan/fzf
fisher install decors/fish-colored-man
fisher install ankitsumitg/docker-fish-completions
fisher install xs23933/export.fish
fisher install danhper/fish-ssh-agent
fisher install evanlucas/fish-kubectl-completions
/usr/bin/setxkbmap -option grp:alt_shift_toggle -layout us,ru
%any %any : RSA vpnHostKey.pem
@b4tman
b4tman / 1cv8-rac-get-session-count.sh
Last active January 30, 2025 07:31
1c get sessions count
#!/bin/sh
echo -n "Всего лицензий: " && \
rg "Количество пользователей:\s.*$" /var/1C/licenses/*.lic | rg -o "\b\\d{1,3}\b" | awk '{s+=$1} END {print s}'
echo -n "Всего сеансов: " && \
/opt/1cv8/x86_64/current/rac session --cluster=$(/opt/1cv8/x86_64/current/rac cluster list localhost | rg -e "^cluster\s*:" -m 1 | rg -e "[[:xdigit:]-]{36}" -o) list| rg -c "^session\s"
@b4tman
b4tman / send_ctrlbreak.ahk
Created October 15, 2024 13:03
autohotkey script to send ctrl+break by f11
F11::{
send "^{CtrlBreak}"
}
vim.api.nvim_create_user_command(
'Encode',
function(input)
vim.api.nvim_command('%!openssl enc -e -aes-256-cbc -a -salt -pbkdf2 -k ' .. input.args)
end,
{desc = 'Encode buffer with password', nargs = 1}
)
vim.api.nvim_create_user_command(
'Decode',
@b4tman
b4tman / 1C-Link-CA.txt
Last active October 14, 2024 10:28
1c link ca
#!/bin/sh
export HOST=example.com
export PORTNUMBER=443
export SERVERNAME=example.com
echo -n | openssl s_client -connect $HOST:$PORTNUMBER -servername $SERVERNAME | openssl x509 > $SERVERNAME.cer