diff --git a/.bashrc b/.bashrc index d002ff1..dd001c7 100644 --- a/.bashrc +++ b/.bashrc @@ -171,6 +171,26 @@ wyz() curl https://wyz.fr/ -F"${1##*.}=@$1" } +paf() +{ + local SECRET="eek8sohxa1quaeghee1I" + local AUTH="-HAuthorization: Secret $SECRET" + local INSTANCE="https://p.afpy.org/" + + if [[ $1 == "--list" ]] + then + curl "$AUTH" $INSTANCE::/list/ + return + fi + + if [[ $# == 0 ]] + then + curl "$AUTH" "$INSTANCE" --data-binary @- + else + curl "$AUTH" "$INSTANCE" "${@/*/-F&=@&}" + fi +} + e() { emacsclient --no-wait "$@"