aboutsummaryrefslogblamecommitdiffstats
path: root/README.md
blob: 450502e295497d68f29b9738dd533bef1b8af8d1 (plain) (tree)












































                                                                           
## [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 $*
```