Compare commits

...

2 Commits

Author SHA1 Message Date
xfnw 057e9b582c zshrc: add putdir function
recursively HTTP PUT a whole directory
2024-01-08 09:38:08 -05:00
xfnw fcde6e924e vim: bump year 2024-01-07 12:38:21 -05:00
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2023
Copyright (c) 2024
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

1
.zshrc
View File

@ -19,6 +19,7 @@ base58gen() { echo $(base64 /dev/urandom | tr -d "\n/+Il0O$2" | head -c ${$(($1/
vid() { echo "VULP$(base64 /dev/urandom | tr -d "\n/+I0Oa-z" | head -c 17)" ; }
tuch() { touch "$@" ; chmod 755 "$@" ; ${EDITOR:-vim} "$@" ; }
rot13() { tr 'a-zA-Z' 'n-za-mN-ZA-M' ; }
putdir(){ find "${@:2}" | while IFS= read fname ; do curl -X PUT --data-binary "@$fname" "$1$fname" ; done ; }
meili() { curl -X POST "http://$1:7700/indexes/$2?$3" -H 'Content-Type: application/json' --data-binary @- ; }
meiliset() { curl -X PATCH "http://$1:7700/indexes/$2/settings" -H 'Content-Type: application/json' --data-binary @- ; }
meilit() { curl "http://$1:7700/tasks/$2" ; }