E-Scribe : a programmer’s blog

About Me

PBX I'm Paul Bissex. I build web applications using open source software, especially Django. Started my career doing graphic design for newspapers and magazines in the '90s. Then wrote tech commentary and reviews for Wired, Salon, Chicago Tribune, and others you never heard of. Then I built operations software at a photography school. Then I helped big media serve 40 million pages a day. Then I worked on a translation services API doing millions of dollars of business. Now I'm building the core platform of a global startup accelerator. Feel free to email me.

Book

I co-wrote "Python Web Development with Django". It was the first book to cover the long-awaited Django 1.0. Published by Addison-Wesley and still in print!

Colophon

Built using Django, served with gunicorn and nginx. The database is SQLite. Hosted on a FreeBSD VPS at Johncompanies.com. Comment-spam protection by Akismet.

Pile o'Tags

Stuff I Use

bitbucket, Django, Emacs, FreeBSD, Git, jQuery, LaunchBar, Markdown, Mercurial, OS X, Python, Review Board, S3, SQLite, Sublime Text, Ubuntu Linux

Spam Report

At least 236428 pieces of comment spam killed since 2008, mostly via Akismet.

A tiny little dpaste.com API

When I created dpaste, I tried to make it both a simple browser-based tool and a simple RESTful API. With very little work you could write a script that created a new paste item with a single POST.

Over the life of the site a few people have discovered and played with that "secret" API. I've now made it a bit more official. The new API has its own URL (versioned, even!) and is more tolerant of missing data, just like the web form.

The URL is http://dpaste.com/api/v1/. In a web browser you'll see just a terse line of instructions. Here's a one-line usage example for unixy people. It takes text on stdin and returns the URL of the newly created paste.

curl -si -F 'content=<-' http://dpaste.com/api/v1/ | grep ^Location: | colrm 1 10

Support disclaimer: Depending on your version of curl and your shell some of those options may need twiddling. But in a low-tech way it's kind of cool, isn't it? (Figuring out how to get curl to read stdin was a new one for me, so the novelty is high at the moment.)

Anyway, use and enjoy as you wish!

Sunday, November 30th, 2008
+ + +
5 comments

Comment from mikele , 8 weeks later

hey thanks for this!! btw how can I specify the syntax of the snippet???

Comment from Paul , 12 weeks later

mikele: Set the "language" field. Look at the source of the dpaste.com form to see the options.

Comment from sm4rt h4ck3r , 22 weeks later

dpaste is fantastic! Simply fantastic... You did an Impressive work Paul, really! 1. Its secured than others. 2. It uses auto delete, so it is great for your server space. 3. It converts it all in normal text and gives a url, wow! 4. It is FREE!

My request: Can you please start something like "Tutorials" for python and/or perl.. Some websites do offer but they are just not so good..

PS: If you start tutorials, me and my team will be glad to learn and click on your ads too ;-)

Comment from Griffin , 8 months later

Love it, using it now for an IRC bot (hope you don't mind!). Thanks for the API <3

Comment from Paul , 8 months later

Excellent! That's exactly the sort of thing I wanted to enable. Thanks for using it.

Comments are closed for this post. But I welcome questions/comments via email or Twitter.