Giter Club home page Giter Club logo

pasterd's Introduction

pasterd

A shameless clone of sprunge minus the google-app-engine for use in private networks. Handy for work if you need to share code or configuration snippets with collegues.

All credit goes to https://github.com/rupa/sprunge

pasterd is a simple http webservice just like paste bin. You can store snippets of text based content using HTTP POST request and share them with the rest of the world using plaing HTTP GET requests.

installation

You only need to download, install and run pasterd on the server side. Typically you run pasterd like any other bottle.py app; on 127.0.0.1 behind a proxy server such as nginx or apache.

You can install pasterd using pip:

$ pip install https://github.com/nrocco/pasterd/archive/master.zip#egg=pasterd-dev

This will install a program pasterd:

$ pasterd --help
usage: pasterd [-h] [-V] [-b address:port] [-u http://address:port] [-r]

Command line paste bin utility

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -b address:port, --bind address:port
                        Inet socket to bind to
  -u http://address:port, --base-url http://address:port
                        The base url of this server
  -r, --reload          Auto respawn server

Start a new instance of pasterd:

$ pasterd -b 127.0.0.1:8000 -u http://pasterd.local

This will start a new instance of pasterd running on the loopback interface on port 8000. The argument to the -u or --base-url option is used inside the help text when you browse to pasterd using your favorite browser.

Now you can configure your http proxy server to proxy pass all requests for http://pasterd.local to 127.0.0.1:8000 and you're done.

usage

After having installed pasterd on the server side from any client you can use e.g. curl to send GET and POST requests to pasterd.

To get information on how to use pasterd from the client point of view do:

$ curl http://pasterd.local

To create a paste execute some command and pipe it to curl:

$ <command> | curl -F 'p=<-' http://pasterd.local

For example:

$ cat ~/.vimrc | curl -F 'p=<-' http://pasterd.local

pasterd's People

Contributors

nrocco avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.