v0.1.0
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE1MTdYA1m9lqO/FEeGPNoXAAiv/MFAlpK0oQACgkQGPNoXAAi
v/MbcBAA55OVYhaVKIa/at2Puaa2CMgVM0YCp85x8tVnUxG7pmk5oDm2ETMAAHb0
+3FSmjZxBssaKcWd1u5VfmDunriV9uyp1fSrWZIw/d3e5jVJort54vuqaiu3gRaS
V3gxJ8+qM6Lkj5LfXpXutbER4XfiVjsW+H5HitO6RpHMrlTLWU6o8OcRFhyqcojN
TZw9i3Y2C+S3TQL6l0wO9kXwsOLton0qbvsOFeR8XZJqUvxy78A1JmDAW3X103eQ
gGfMaXCnNK7TET50VTqhTm5KVHPxIvH+3fymsQEEyHahl+sG0/Ms5+/St9g4c0Od
qkBQ4V3VXxFPx07ME6Sn6IiN5jOvqNzZDdq8xq3Dr4lw9oAJIgPSUKEScZY5Ewmd
WxFQAD5le+w+iqVGKWLisJMS1Glsxak0r5/uiLZ7Vp9GGUPme49yGkbQkz1k5tt1
k4zhlab8IwWxMVK1qM4a/MGbrFwaumq5+7gnhH3AIbaGJefj2kDq24/w96kPJ10N
ZZmDv6+UfcdVvSFHL2FkdQ6L1qVyeFrxVyMWKUe7POow1PB9Vs6GIDnFsprAmUaz
gYFSam8xXU4b3K6UxH7kIVw/A6G1b9M/czCGsHacf46s4vj0HHUld8dbtthtsBhw
Z0HvtN6E5f8G8cv1xf8cGRoUsAh8gcxLmskyUxoong1WJ2o+WLo=
=cI8o
-----END PGP SIGNATURE-----
Bump version to v0.1.0

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2 files changed
tree: 2de3f90097961f90be29442ba0fa2241e0020e50
  1. .gitignore
  2. .travis.yml
  3. Dockerfile
  4. LICENSE
  5. Makefile
  6. README.md
  7. VERSION
  8. main.go
  9. server/
  10. vendor/
  11. 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!