summaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc24
1 files changed, 24 insertions, 0 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 18364ac..3c71d56 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -53,6 +53,30 @@ cu()
cd "${dir}"
}
+# ups.khirnov.net uploader
+ups() {
+ if [ "$1" ]; then
+ fname=$(basename "$1")
+ else
+ fname="-"
+ fi
+
+ url=$(curl -sS -E ~/.local/var/up/cert --data-binary "@${fname}" "https://ups.khirnov.net/${fname}")
+ [ "${url}" ] && echo "${url}"
+}
+
+# up.khirnov.net 0x0 instance
+up() {
+ if [ "$1" ]; then
+ fname=$(basename "$1")
+ else
+ fname="-"
+ fi
+
+ url=$(curl -sS -E ~/.local/var/up/cert -F "file=@${fname}" "https://up.khirnov.net/")
+ [ "${url}" ] && echo "${url}"
+}
+
# define the prompt
. ~/.config/bash/prompt
PS1=$(__prompt_func)