Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lucko/paste

Repository files navigation

paste is a simple web app for writing & sharing code. It's my own take on conventional pastebin sites like pastebin.com or hastebin.

Anyone can use paste! The official/public instance can be accessed using the endpoints listed below, but you can also host your own if you like!

1) In a Web Browser

Just go to https://pastes.dev!

2) From the Command Line

You can submit content most easily using curl.

# Upload the contents of a file
> curl -T example.txt https://api.pastes.dev/post
# Upload the contents of a file and specify the language
> curl -T example.yml -H "Content-Type: text/yaml" https://api.pastes.dev/post
# Pipe in some output from any command
> echo "Hello world" | curl -T - https://api.pastes.dev/post
If you don't want to do so much typing, you can create a shorter alias.
# Add this to the end of `~/.bashrc` and run 'source ~/.bashrc'
paste() {
 curl -T 1ドル https://api.pastes.dev/post
}

then...

# Upload the contents of a file
> paste example.txt
# Pipe in some output from any command
> echo "Hello!" | paste -
3) From Code / Scripts

Please see the API Documentation. :)


About

The frontend (this repository) is written using the React framework. The backend data storage is handled by a separate web service called bytebin.

The user-interface is based on the Monaco Editor, the engine behind the popular Visual Studio Code text editor. It's quite simple; it supports syntax highlighting, automatic indentation, many supported languages, themes, zooming in/out, linking to specific lines or sections, and more!


Self-hosting

The easiest way to self-host is using Docker (& Docker Compose). You can run the following commands to get started:

git clone https://github.com/lucko/paste
cd paste
docker compose up -d

You should then (hopefully!) be able to access the application at http://localhost:8080/.

About

paste is a simple web app for writing & sharing code.

Topics

Resources

License

Stars

Watchers

Forks

Packages

Contributors 8

AltStyle によって変換されたページ (->オリジナル) /