commit 147ffce743404125afae161438358ec71f2c1650
parent a445ac4f13ea3b1bf82e316ab018acecdd17ad23
Author: Dash Eclipse <dashezup@disroot.org>
Date: Sun, 3 Jul 2022 10:22:26 +0000
feat: add np in .zshrc.local
for uploading pastes to https://paste.c-net.org/
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/.zshrc.local b/.zshrc.local
@@ -234,6 +234,14 @@ tb() {
zmodload zsh/net/tcp; ztcp ezup.dev 9999; cat >&$REPLY; cat <&$REPLY | tee >(xclip -selection clipboard); ztcp -c $REPLY
}
+
+np() {
+ # https://unix.stackexchange.com/a/524139
+ local url="https://paste.c-net.org/"
+ [ -s "$1" ] && { curl --silent --data-binary @"$1" --header "x-random;" --header "X-FileName: ${1##*/}" "$url"; return 0; }
+ curl --silent --header "x-random;" --data-binary @- "$url"
+}
+
# logpaste.com
logpaste() {
[ -s "$1" ] && { curl -F "_=@$@" http://logpaste.com; return 0; }