diogomdp / hastebin

CLI tool that uploads text to hasteb.in

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hastebin

CLI tool that uploads text to hasteb.in . (Basically a Gem version of haste-client)

Installation

To install this package using GEM, run: gem install hastebin

Usage

Write via the Shell

$ hastebin --write "puts("hello")"

Upload Files via the Shell

$ hastebin --upload "./text.txt"

Download Files via the Shell

$ hastebin --download "wihuwavi"

Run Ruby Files via the Shell

$ hastebin --run "wihuwavi"

Read Files via the Shell

$ hastebin --read "wihuwavi"

Via the Ruby API

require 'hastebin'

# Write and Send
puts Hastebin.write("puts('Written with Hastebin CLI Ruby')") # return key

# Send Files
puts Hastebin.sendFile("./file.rb") # return key

# Read Files via hasteb.in
#                        key
puts Hastebin.readRaw('wihuwavi') # return raw

# Run Ruby File via hasteb.in
#                key
Hastebin.run('wihuwavi')

# Download File via hasteb.in
Hastebin.download('wihuwavi')

# Custom server
Hastebin.base_url = 'https://hastebin.com/'

puts Hastebin.base_url # https://hasteb.in/

puts Hastebin.domain # hasteb.in

puts Hastebin.ping # 450

License

This module is licensed under the MIT license.

About

CLI tool that uploads text to hasteb.in

License:Other


Languages

Language:Ruby 100.0%