Et paf! Pastèque.

This commit is contained in:
Julien Palard 2023-05-24 11:37:23 +02:00
parent d66392a7f9
commit da750e5e44
Signed by: mdk
GPG Key ID: 0EFC1AC1006886F8
1 changed files with 20 additions and 0 deletions

20
.bashrc
View File

@ -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 "$@"