v0.2.0
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE1MTdYA1m9lqO/FEeGPNoXAAiv/MFAlpLZaAACgkQGPNoXAAi
v/PuCRAA4y92CKl8HiULKTaKkuUCU7zd8tge9+ECN0h4JEuRUzFgTGqlRH5Pw69U
4qf+UUTlTqdaMnClxJo86ijbdLvPvOw9VxZWi6Q4aRhWTXB4SUNRHwfwKIQV+54Y
OP7SL1jhzOPcD4pFpcvpHR54Sx82YZVL05l5OJ5JOoxmveemjG1eIzaSWnn/Q8DI
lJ2vizYpGKNgOU4Gik/FT6dgAsppONJQhzpdG6gMpnwb32iFPXCR0w0ZXejxV3zY
W/1C/xiC+bbvZLOqHUQmnUERnyAotuGT63TyDG5GSYXujG7akuEeh/6kaXps50qZ
asCcKZUKgYaIoIWSvMYvKj+p1CHyyk4Dqt8AcaouuWOSbBzV0OqIUjvJnQoacuUe
QUliSB2gHQCKPF5E52/wqKDL/5v7Mk7piS39BU6087ep51nj92R8L0xVAVtogKe7
r648HQwdvHy0GK6I9JhjxA/FOLXRisUBd1Tq1K/dkRTgLS254cwY4uA3dVvrOMcN
X/kUG7n9jPrnMCG2KSDhxj2Ksmni8wyet40VtkzryPviYJIo9W4VmeJQvb8mEqYM
kJbgG8V7PX0q/+RjO9vxGFyFV2WYs6wZDIJvPfEEog4e4VIE0oRZIFLsGWUxCXE5
RbnbqWDMO0irnl1Pg4PRRSwxG7IcGJQt18Cdie8165ZB7n+XSTQ=
=m6Fk
-----END PGP SIGNATURE-----
Bump version to v0.2.0

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2 files changed
tree: a824478b83e734e216bf275d2bd9730c79e676de
  1. .gitignore
  2. .travis.yml
  3. Dockerfile
  4. Gopkg.lock
  5. Gopkg.toml
  6. LICENSE
  7. Makefile
  8. README.md
  9. VERSION
  10. main.go
  11. server/
  12. vendor/
  13. version/
README.md

pastebinit

Travis CI

Go implementation of pastebinit. Host your own pastebin and post things there. Example file I posted here.

Why you ask? because pastebin.com has ads (booo) & is fugly as eff.

Installation

Binaries

Via Go

$ go get github.com/jessfraz/pastebinit

Usage

Client

You need to set PASTEBINIT_USERNAME and PASTEBINIT_PASS as enviornment variables, so the client knows how to auth on paste. To change the uri, pass the -b flag.

Just like the pastebinit you are used to, this client can read from stdin & input. Heres some examples:

# pipe to pastebinit
$ docker images | pastebinit -b yoururl.com

# pass a file
$ pastebinit -b yoururl.com server.go

Server

The server can be run in a docker container, via the included dockerfile. You can use my image on the hub: jess/pastebinit-server or you can build the image yourself via:

$ git clone git@github.com/jessfraz/pastebinit.git
$ cd pastebinit
$ docker build -i your_name/pastebinit ./server

To run the image do, you need to pass the PASTEBINIT_USERNAME and PASTEBINIT_PASS environment variables to the container. You can also pass the following options as cli flags to the binary in the container, these are:

  • baseuri, -b: The uri of the domain you are going to be hosting this on, ex: https://paste.j3ss.co
  • port, -p: The port to run the app on, defaults to 8080
  • storage, s: The folder to store your posted pastes in, defaults to files/
  • certFile, --cert: For https servers, path to ssl certificate
  • keyFile, --key: For https servers, path to ssl key

Example command to run the container:

# to share the paste volume with your host
$ docker run -d --name=pastebinit --restart=always \
-e PASTEBINIT_USERNAME=your_username -e PASTEBINIT_PASS=your_pass \
-v  /home/jess/pastes:/src/files \
docker_image_name -b https://myserver.com

# to not share the paste volume
$ docker run -d --name=pastebinit --restart=always \
-e PASTEBINIT_USERNAME=your_username -e PASTEBINIT_PASS=your_pass \
docker_image_name -b https://myserver.com

# ssl example
$ docker run -d --name=pastebinit --restart=always \
-e PASTEBINIT_USERNAME=your_username -e PASTEBINIT_PASS=your_pass \
-v /path/to/ssl/stuffs:/ssl \
docker_image_name -b https://myserver.com --cert=/ssl/cert.crt --key=/ssl/key.key

Then you are all set! Happy pasteing!