v0.2.1
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE1MTdYA1m9lqO/FEeGPNoXAAiv/MFAltKLlsACgkQGPNoXAAi
v/Ohww//bHb/4ZPtLyYXujkBjNF2sF7Jnimg71/FfbsWMnWGfCWdKK4Nb183akyE
J4SMA84HTFJ8nJunhUIwHX9qIeIDw1lYQtqGAv79RBd0ns/otnskgMLkroSQYIEk
GQf1g2yB6APW/0RJzHJy84rp8lDz27D2TdGK57toRrjP39IVPk3ZjzquL4UxSSXw
fLb/grzN/lSo1hhTGu3Gidbv/yvNUDVVOymNFUjoYLyQnt5fdUnxH7IEopT8++GB
MSZGjtIt5UQUvaz+o7DPbNZ0SwIoJGS7mQV+vQO85w2AN9eWBndheBXI1QT84Rf/
nOkcX7PvnmhqoEzWuaM0sR/BHbhiGEq51eFK8kenXruKXQ1lnoYbKcLuvTLVe/dy
v5et58kJoagJFq9Pfi9idU8TZTfmEPi7TxUYJmYUMbWtvWwFGVYe0yJTXt8r5GpD
KDG0xNBbbVgE7N4xwLDeXuS1DnxBafsZ4dwHOZe04dg/Fu6WqIz138dlcYhELTXv
JdwdSh9uZIeWiPBWZvHW7GkI7nfA5YVUlCABrTiFtYy4DUJdDA9ChO1Llzpvg34o
BMN/hgTZMcuPW3cTs8JNSvvy3SIlrw9IkNZOi0ShK7xyXjFysAt/JRkoJL8Eb7bL
5r47kMrVI4wNQy47WGJ9u/wf/pJ7riCv20zhBEq0qUCnsO5PHdA=
=3S8a
-----END PGP SIGNATURE-----
Bump version to v0.2.1

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2 files changed
tree: 43c41b0a9cf594878a3f52b61cbcb707110f083e
  1. .gitignore
  2. .travis.yml
  3. Dockerfile
  4. Gopkg.lock
  5. Gopkg.toml
  6. LICENSE
  7. Makefile
  8. README.md
  9. VERSION.txt
  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!