FollieHiyuki-dotfiles/home/.local/bin/meowd
FollieHiyuki 9b81f9b07b
Some user configs
- neovim:
    + update lspkind icons for completion
    + start migrating config for nvim-tree.lua
    + update lsp config for sumneko_lua
- scripts:
    + add POSIX clients for PurritoBin (https://bsd.ac)
    + add script to upload to https://0x0.st
2021-10-17 21:48:13 +07:00

17 lines
504 B
Bash
Executable File

#!/bin/sh
# POSIX shell client for PurritoBin to decrypt the message
: "${P_SERVER=https://bsd.ac}"
: "${P_PORT=42069}"
: "${P_MAXTIME=30}"
url="$1"
baseurl="${url%\/*}"
vals="${url##*\#}"
paste=$(printf %s\\n "${vals}" | cut -d'_' -f1)
key=$(printf %s\\n "${vals}" | cut -d'_' -f2)
iv=$(printf %s\\n "${vals}" | cut -d'_' -f3)
curl --max-time "${P_MAXTIME}" --write-out "\n" --silent "${baseurl}/${paste}" | openssl enc -aes-256-cbc -base64 -d -K ${key} -iv ${iv}
unset url baseurl vals paste key iv