A pastebin with almost no user interface

I’ve always favoured pastebins that let you bin a paste and nothing more – p.defau.lt and sprunge.us spring to mind. I’ve made a Perl almost-clone of sprunge.us:

http://p.hashbang.ca now runs WWW::Hashbang::Pastebin, a simple pastebin written with Dancer and DBIx::Class that does nothing but store your text and show it back to you. The only feature beyond that is if you append a +, you’ll get line numbering (no syntax highlighting). You can use an anchor to jump to any line (click the line number), and the number for that line will be highlighted.

To interact with the pastebin, just POST with paste content in p and get the URL back in the X-Pastebin-URL HTTP header (and in the body, so curl-ing will Just Work):

curl -F 'p=<-' http://p.hashbang.ca < /var/log/syslog
http://p.hashbang.ca/U

Or, use the Perl client, which provides a command-line tool to do the same thing (and also fetch paste content, given an ID).

Comments
Comment from Tommy Stanton - April 16, 2012 at 10:18 pm

Excellent work! I <3 nopastes. This is a great example of a Dancer-powered web application.

It might be worth mentioning that the 'p' binary provided by WWW::Hashbang::Pastebin::Client will collide with the one-liner utility (also named 'p') provided by App::p.