What is pastebin?
Pastebin is here to help you collaborate on debugging code snippets. If you're not familiar with the idea, most people use it like this:
- submit a code fragment to pastebin, getting a url like http://pastebin.com/1234
- paste the url into an IRC or IM conversation
- someone responds by reading and perhaps submitting a modification of your code
- you then view the modification, maybe using the built in diff tool to help locate the changes
Does the world REALLY need another pastebin?
I honestly don't think so, but I would rather be able to mess around with my own pastebin and modify it, rather than using another one, I like the flexibility and control of having my own. There are other better ones, one that comes to mind is paste.uni.cc that has CAPTCHAs and stuff. I don't know how to do that nor do I have the time, so I just generate a random code. Here are the modifications I've made to my pastebin:
- Password protected posts
- Archives page for easy look up of past posts
- reCAPTCHA anti-spam protection
- Silk Icons by FamFamFam
Instructions
Simply go to make a post, choose how long you want to keep it, and then post it. Don't forget to choose the syntax highlighting. After you're done posting, keep the link to the post handy or give it to anyone you'd like to share your post with.
How does the password protected pastes work?
Well, basically I added a new column to the pastebin's database table called 'password'. When you paste, the password is set along with the other information. When you go to read it, you type in the password, it compares both, and then lets you in accordingly. If you don't want a password protected paste, simply don't type anything into the box, and paste.
How can I view the differences between two posts?
When you view a post, you have the opportunity of editing the text - this creates a new post, but when you view it, you'll be given a 'diff' link which allows you to compare the changes between the old and the new version
This is a powerful feature, great for seeing exactly what lines someone changed.
Can I get the source?
The source code to this site is available under a GPL licence. The original source is available at Paul's Blog. This is a modified version made by Jorge Peņa available at his blog.