Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryotarai/pasteit
https://github.com/ryotarai/pasteit
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ryotarai/pasteit
- Owner: ryotarai
- Created: 2013-11-02T14:25:54.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-03T04:25:59.000Z (about 11 years ago)
- Last Synced: 2024-11-07T17:06:32.293Z (about 2 months ago)
- Language: Ruby
- Size: 254 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pasteit
## Synopsis
* Upload your code snippet or log text called paste
* View the paste
* Easy to upload (You need just `curl`)
* No authentication## Usage
Rack it up
```
$ rackup config.ru
Puma 1.6.3 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://0.0.0.0:9292
```### Paste from File
```
curl -F '[email protected]' -F '[email protected]' -XPOST http://localhost:9292/
```### Paste from Stdin
```
cat foo.txt | curl -F '-=@-' -XPOST http://localhost:9292/
```### Paste from Clipboard (on OSX)
```
pbpaste | curl -F '-=@-' -XPOST http://localhost:9292/
```### Paste with pasteit command
```
pasteit () {
ENDPOINT="http://localhost:9292"
if [ $# -eq 0 ]; then
curl -F "-=@-" -XPOST $ENDPOINT
else
ARGS=()
for ARG in "$@"; do
ARGS+=("-F" "$ARG=@$ARG")
done
curl $ARGS -XPOST $ENDPOINT
fi
}
``````
pasteit foo.txt bar.txt
cat foo.txt | pasteit
```