aboutsummaryrefslogtreecommitdiffstats

Aleph Paste

by Jason A. Donenfeld

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#!/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 $*