diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..450502e --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +## [Aleph Paste](https://git.zx2c4.com/alephpaste/about) +#### by [Jason A. Donenfeld](mailto:jason@zx2c4.com) + +This is a basic boring private pastebin. It doesn't do much. + + - https://א.cc/ID -- plain text + - https://א.cc/ID/ -- auto-guess syntax highlighting + - https://א.cc/ID/LANG -- use LANG syntax highlighting + +### NGINX Configuration Block + +``` +location / { + include uwsgi_params; + uwsgi_pass unix:/var/run/uwsgi-apps/alephpaste.socket; +} +location /pastes/ { + internal; + alias /var/www/uwsgi/alephpaste/pastes/; +} +``` + +### CLI Script + +``` +#!/bin/bash +DOMAIN="https://א.cc" +alp() { + local opts="--basic --user zx2c4:hGha6tahjofaip4Osa7" + while getopts ":hd:" x; do + case $x in + h) echo "alp [-d ID]"; return;; + d) curl $opts -X DELETE "$DOMAIN"/$OPTARG; return;; + esac + done + trap 'rm -f "$file"' EXIT + file="$(mktemp)" + cat > "$file" + url="$(curl $opts -F "paste=@$file" "$DOMAIN")" + xclip -selection clipboard <<<"$url" + echo "$url" +} + +alp $* +``` |