Skip to content
/ bin Public
forked from w4/bin

🗑️ a paste bin.

License

Unknown and 3 other licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING
0BSD
LICENSE-0BSD
WTFPL
LICENSE-WTFPL
Notifications You must be signed in to change notification settings

31KM/bin

 
 

bin

a paste bin.

A paste bin that's actually minimalist. No database requirement, no commenting functionality, no self-destructing or time bomb messages and no social media integration—just an application to quickly send snippets of text to people.

bin is written in Rust in around 200 lines of code. It's fast, it's simple, there's code highlighting and you can ⌘+A without going to the 'plain' page. It's revolutionary in the paste bin industry, disrupting markets and pushing boundaries never seen before.

so how do you get bin?

Download the latest version from the releases page, extract it and run the ./bin executable. You can also compile it from source using Cargo if you swing that way:

# nix-shell provides an environment with rust/cargo installed
$ nix-shell

[nix-shell:~/Code/bin]$ cargo build --release
   Compiling bin v1.0.0 (/Users/jordanjd/Code/bin)
    Finished release [optimized] target(s) in 3.61s

[nix-shell:~/Code/bin]$ ./target/release/bin
    ...
how do you run it?
$ ./bin
funny, what settings are there?

bin uses rocket so you can add a rocket config file if you like. You can set ROCKET_PORT in your environment if you want to change the default port (8820).

bin's only configuration value is BIN_BUFFER_SIZE which defaults to 2000. Change this value if you want your bin to hold more pastes.

is there curl support?
$ curl -X PUT --data 'hello world' https://bin.gy
https://bin.gy/cateettary
$ curl https://bin.gy/cateettary
hello world
how does syntax highlighting work?

To get syntax highlighting you need to add the file extension at the end of your paste URL.

running it behind Apache httpd as reverse proxy

Add the following to your httpd.conf file:

LoadModule substitute_module modules/mod_substitute.so
...
<Location /bin/>
    ProxyPass http://localhost:80/
    ProxyPassReverse /
    AddOutputFilterByType SUBSTITUTE text/html
    Substitute "s|action=\"/\"|action=\"/bin/\"|"
</Location>

It exposes bin on http://HOST/bin

About

🗑️ a paste bin.

Resources

License

Unknown and 3 other licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING
0BSD
LICENSE-0BSD
WTFPL
LICENSE-WTFPL

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 54.4%
  • HTML 19.3%
  • Shell 15.7%
  • Nix 4.2%
  • PowerShell 3.8%
  • Dockerfile 2.6%