Update 2024-02-14 07:51 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id
2024-02-14 07:54:31 +01:00
parent b55e6a3616
commit 9624895938
373 changed files with 19074 additions and 3045 deletions

32
.bin/OLD/dopaste Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/sh
. $HOME/.bin/_config
RPATH=/home/sdk/make-web/src/paste
SSH="sdk@home.codevoid.de"
WEB="https://ptrace.org"
f="$1"
if [ "$1" = "-h" ]; then
printf "Usage:\n"
printf " paste < text.txt - read from stdin, generate filename\n"
printf " paste new.txt < file.txt - read from stdin with filename\n"
printf " paste file.txt - upload file as is\n"
return 0
fi
if [ -z "$1" ]; then
f="$(date +"%Y-%m-%d_%M-%S")-$(pwgen -1 4 -A -0).txt"
ssh ${SSH} "printf \"%s\" \"$(cat)\" > ${RPATH}/$f"
elif [ -f "$f" ]; then
scp "$f" ${SSH}:"${RPATH}/${f##*/}"
else
ssh ${SSH} "printf \"%s\n\" \"$(cat)\" > ${RPATH}/${f##*/}"
fi
ssh ${SSH} "cd ~/make-web && make install"
printf "${WEB}/${f##*/}\n"
printf "${WEB}/${f##*/}" | xclip
[ -z $DISPLAY ] || notify-send "$(xclip -o)"