{"id":13473026,"url":"https://github.com/lucko/paste","last_synced_at":"2025-04-12T06:08:10.009Z","repository":{"id":45097076,"uuid":"351922215","full_name":"lucko/paste","owner":"lucko","description":"paste is a simple web app for writing \u0026 sharing code.","archived":false,"fork":false,"pushed_at":"2025-03-15T13:36:29.000Z","size":831,"stargazers_count":281,"open_issues_count":10,"forks_count":57,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T06:08:04.223Z","etag":null,"topics":["paste","pastebin"],"latest_commit_sha":null,"homepage":"https://pastes.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-26T22:01:02.000Z","updated_at":"2025-04-10T22:30:54.000Z","dependencies_parsed_at":"2024-08-24T11:27:28.095Z","dependency_job_id":"18e2adcc-5981-4827-b9b5-e64e5bf030e8","html_url":"https://github.com/lucko/paste","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fpaste","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fpaste/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fpaste/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucko%2Fpaste/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucko","download_url":"https://codeload.github.com/lucko/paste/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525142,"owners_count":21118618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["paste","pastebin"],"created_at":"2024-07-31T16:01:00.031Z","updated_at":"2025-04-12T06:08:09.983Z","avatar_url":"https://github.com/lucko.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/banner.svg\"\u003e\n\u003c/p\u003e\n\n**paste is a simple web app for writing \u0026 sharing code.** It's my own take on conventional pastebin sites like _pastebin.com_ or _hastebin_.\n\nAnyone can use paste! The official/public instance can be accessed using the endpoints listed below, but you can also [host your own](#self-hosting) if you like!\n\n##### 1) In a Web Browser\nJust go to https://pastes.dev!\n\n##### 2) From the Command Line\nYou can submit content most easily using [curl](https://curl.se/docs/manpage.html).\n\n```shell\n# Upload the contents of a file\n\u003e curl -T example.txt https://api.pastes.dev/post\n\n# Upload the contents of a file and specify the language\n\u003e curl -T example.yml -H \"Content-Type: text/yaml\" https://api.pastes.dev/post\n\n# Pipe in some output from any command\n\u003e echo \"Hello world\" | curl -T - https://api.pastes.dev/post\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eIf curl isn't installed on your system, you can also post using \u003cb\u003enetcat\u003c/b\u003e.\u003c/summary\u003e\n  \n  ```shell\n  # Pipe in some output from any command\n  \u003e echo \"Hello world\" | nc nc.pastes.dev 1337\n  \n  # Upload the contents of a file\n  \u003e cat example.txt | nc nc.pastes.dev 1337\n  ```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eIf you don't want to do so much typing, you can create a shorter \u003cb\u003ealias\u003c/b\u003e.\u003c/summary\u003e\n  \n  ```bash\n  # Add this to the end of `~/.bashrc` and run 'source ~/.bashrc'\n  paste() {\n    curl -T $1 https://api.pastes.dev/post\n  }\n  ```\n\n  then...\n\n  ```shell\n  # Upload the contents of a file\n  \u003e paste example.txt\n\n  # Pipe in some output from any command\n  \u003e echo \"Hello!\" | paste -\n  ```\n\u003c/details\u003e\n\n##### 3) From Code\nSend GET/POST/PUT requests to `https://api.pastes.dev/`. More info [below](#pastesdev-api).\n\n___\n\n### About\nThe frontend _(this repository)_ is written using the React framework. The backend data storage is handled by a separate web service called [bytebin](https://github.com/lucko/bytebin).\n\nThe user-interface is based on the [Monaco Editor](https://microsoft.github.io/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!\n\n### pastes.dev\n\nI host a public instance at https://pastes.dev. Please feel free to use it to share code/configs/whatever!\n\nPlease note that the following (very-non-legally worded) [terms of service](https://github.com/lucko/bytebin#public-instances) apply.   \nIf you come across any content which is illegal or infringes on copyright, please [get in touch](https://lucko.me/contact) and let me know so I can remove it.\n\nUploaded content is retained for 90 days then deleted.\n\n### pastes.dev API\n\n* To **read** content, send a HTTP `GET` request to `https://api.pastes.dev/\u003ckey\u003e`.\n  * Replace `\u003ckey\u003e` with the id of the paste.\n  * The content is returned in the response body.\n  * The `Content-Type` header is `text/\u003clanguage\u003e`, where language is the id of the language the paste was saved with.\n* To **upload** content, send a HTTP `POST` request to `https://api.pastes.dev/post`.\n  * Include the content in the request body.\n  * Specify the language with the `Content-Type: text/\u003clanguage\u003e` header, and please provide a `User-Agent` header too.\n  * The paste \"key\" is returned in the `Location` header, or in the response body as a JSON object in the format `{\"key\": \"\u003ckey\u003e\"}`.\n\nThe API is powered by the [bytebin](https://github.com/lucko/bytebin) service, so more information about how it works can be found there.\n\n___\n\n### Self-hosting\n\nThe easiest way to self-host is using Docker (\u0026 Docker Compose). You can run the following commands to get started:\n\n```bash\ngit clone https://github.com/lucko/paste\ncd paste\ndocker compose up -d\n```\n\nYou should then (hopefully!) be able to access the application at `http://localhost:8080/`.\n","funding_links":[],"categories":["TypeScript","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucko%2Fpaste","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucko%2Fpaste","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucko%2Fpaste/lists"}