Skip to content

kylethebaker/gopaste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

GoPaste

Simple command line pastebin-esque site for personal use.

Using prismjs for the optional syntax highlighting and Gorilla Toolkit Mux for routing.

Setup and Installation

  • Pick the appropriate paths, site url, and listen port for your setup.
  • Create a directory to store the uploaded pastes.
  • go get github.com/gorilla/mux
  • go build or install or whatever you want.

Usage

cat file-to-upload.txt | curl -F 'paste=<-' http://your-site

I like to add | xargs firefox to the end to open it in firefox

You can add ?lang=html to the url to get syntax highlighting. The langs supported are provided by Prism. Without the lang param (or with an invalid lang), a plaintext response is served. You can see the LANGS global for langauges I've included from prismjs.

Thanks

Thanks for http://sprunge.us for the idea which I shamelessly copied. Thanks to prismjs for the awesome syntax highlighting. Thanks to Gorilla Toolkit for the awesome Golang http extensions.

Disclaimer

I'm not responsible for any personal injuries (or any other damages) caused by this software.

About

A sprunge.us inspired command line pastebin clone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published