dpaste is open source. You can find the source, contribute to it and leave ideas on Github: github.com/bartTC/dpaste
- #!/usr/bin/env python
- import urllib
- import urllib2
- import sys
- def paste_code():
- request = urllib2.Request(
- 'http://dpaste.de/api/',
- urllib.urlencode([('content', sys.stdin.read())]),
- )
- response = urllib2.urlopen(request)
- # Strip surrounding quotes (NB: response has no trailing newline)
- print response.read()[1:-1]
- if __name__ == '__main__':
- paste_code()
Save this script in /usr/local/bin/dpaste and chmod +x ..filepath.
Usage: cat foo.txt | dpaste
Or you could use curl:
alias dpaste="curl -F 'content=<-' http://dpaste.de/api/"
There are 2271 snippets in the database. The most popular languages are:
| PYTHON | 1259 |
|---|---|
| TEXT ONLY | 248 |
| C | 138 |
| BASH | 109 |
| PHP | 57 |
Address:
Martin Mahner
Lauterbacher Str. 4
DE-18581 Putbus
Germany
Jabber/E-Mail: