Follow

Idea for how to set up your own personal pastebin:

1. Make /var/www/pastes/ on server.
2. Points paste.yourdomain.com at server.
3. Have nginx serve content of /var/www/pastes/.
4. alias paste=$'ssh paste.yourdomain.com \'cat > paste && mv paste /var/www/pastes/`sha1sum paste | cut -d" " -f1`\''

That's it that's the pastebin.

@sjl I have been doing this for years and it's great. (My version is in elisp tho) p.hagelb.org

@technomancy @sjl I was going to advocate @technomancy’s method, but he did it first.

@sjl I have something like this for screenshots. I use paste.xinu.at (written/operated by someone I know) for paste because it has syntax hilighting and you can upload binary files.

@sjl add a cronjob that runs find /var/www/pastes -mtime +7 -delete and you are set!

Sign in to participate in the conversation
Mastodon

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!