views:

51

answers:

4

For example i use store bits and pieces of text from web in my google docs to view later.

I am finding it hard to store the code snippet in google docs due to non formatting or non color highlighting.

For example when i get some anser in stack overflow i want to copy and paste somewhere so that i can review later.

But i am not finding any plcae to paste.

I have my own webiste. Is there any way i can code a page in which i can copy paste the code snippet with color highlighting like in stack overflow

thanks

+2  A: 

There are a variety of hosted services for this. My favourites are:

You could certainly set up your own clone of these sites. Google provides a neat JS library for syntax highlighting, or there's GeSHi.

ceejayoz
I tried snipt.net javscript highlight works but php hightlight is not working when i select php from the list.
Mirage
Can you make the Snipt public and give us the URL? PHP highlighting works fine for me.
ceejayoz
A: 

Yes, such scripts are usually called pastebins. A quick google will find you plenty in your favorite language to install on your server, here is an example in python:

http://dev.pocoo.org/projects/lodgeit/

There are also plenty of pastebins hosted online, such as http://pastebin.com/ .

houbysoft
A: 

Either: http://codepad.org/ or http://pastebin.com/

would work

Eld
A: 

There's GitHub's Gist. I personally use Code Collector Pro by M Cubed, but it's a desktop based application that doesn't sync to the net. You could also just install a paste-bin service on your own webserver, depending on the type of software it supports. DPaste is a pretty simple implementation in Python/Django. A quick Google search turns up stikked for PHP-based pastebins, and PHP is included in many hosting packages now-a-days.

David Antaramian