{"id":19909016,"url":"https://github.com/dyne/binnit","last_synced_at":"2025-05-03T02:31:32.391Z","repository":{"id":57538096,"uuid":"96109719","full_name":"dyne/binnit","owner":"dyne","description":"minimal no-fuss pastebin service clone in golang","archived":false,"fork":false,"pushed_at":"2019-01-30T12:00:04.000Z","size":38,"stargazers_count":31,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T10:35:45.081Z","etag":null,"topics":["go","golang","minimalism","pastebin","pastebin-service","web-app"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dyne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-03T12:43:18.000Z","updated_at":"2025-03-15T01:33:49.000Z","dependencies_parsed_at":"2022-09-07T16:41:14.489Z","dependency_job_id":null,"html_url":"https://github.com/dyne/binnit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyne%2Fbinnit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyne%2Fbinnit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyne%2Fbinnit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyne%2Fbinnit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyne","download_url":"https://codeload.github.com/dyne/binnit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252133719,"owners_count":21699585,"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":["go","golang","minimalism","pastebin","pastebin-service","web-app"],"created_at":"2024-11-12T21:14:10.761Z","updated_at":"2025-05-03T02:31:32.024Z","avatar_url":"https://github.com/dyne.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## binnit -- minimal pastebin clone in golang\n\nThat's just it. A minimalist, no-fuss pastebin clone server in\ngolang. It supports only two operations:\n\n* store a new paste, through a POST request\n* retrieve a paste using its unique ID, through a GET request\n\nwhat else do you need? \n\n## WTF?\n\n`binnit` is a single executable with **no dependencies**. You **don't\nneed** a web server. You **don't need** a SQL server. You **don't\nneed** any external library. \n\n`binnit` serves pastes in the format:\n\n    http://\u003cserver_name\u003e/abcdef1234567890\n\nand stores them in a folder on the server, one file per paste, whose\nfilename is identical to the paste ID. The unique ID of a paste is\nobtained from the SHA256 of the concatenation of title, time, and\ncontent. Rendering is minimal, on purpose, but based on a customisable\ntemplate.\n\n`binnit` is currently configured through a simple key=value\nconfiguration file, whose name can be specified on the command line\nthrough the option `-c \u003cconfig_file\u003e`. If no config file is specified,\n`binnit` looks for `./binnit.cfg`. The configurable options are:\n\n* server\\_name  (the FQDN where the service is reachable from outside)\n* bind\\_addr (the address to listen on)\n* bind\\_port (the port to bind)\n* paste\\_dir (the folder where pastes are kept)\n* templ\\_dir (the folder where HTML files and templates are kept)\n* max\\_size (the maximum allowed length of a paste, in bytes. Larger\n    pastes will be trimmed to that length.)\n* log_file (path to the logfile)\n\nAs with other pastebin-like services, you can send a paste to `binnit`\nusing `curl`. For instance, if your `binnit` server is running on\n`http://servername.net`, you can paste a file there using:\n\n\n    curl -F 'paste=\u003cmyfile' http://servername.net\n\n\nand obtain on output the ID associated to the newly created\npaste. Similarly\n\n    mylongcommand | curl -F 'paste=\u003c-' http://servername.net\n\nwill paste the output of `mylongcommand` to `http://servername.net`,\nand show on output the ID of the new paste.\n\n\n## Why another pastebin?\n\nThere are hundreds of pastebin-like servers in the wild. But the\noverwhelming majority of them is _overbloated_ software, depending on\nlots of libraries/frameworks/tools, providing a whole lot of useless\nfeatures, and implying a useless amount of complexity. \n\nA paste server must be able to do two things, 1) create a new paste\nand return its ID, and 2) retrieve an existing paste using its\nID. `binnit` does just and only these two things, in the simplest\npossible way, without any external dependency. If you need more than\nthat, then `binnit` is not for you. But do you really need anything\nmore?\n\n## About minimalism\n\n\u003e It seems that perfection is attained not when there is nothing more\n\u003e to add, but when there is nothing more to remove (Antoine de Saint\n\u003e Exupéry)\n\n`binnit` is intended to be truly minimal. It consists of about 500\nlines of golang source code in total, including:\n\n* ~110 lines for License statements (comments)\n* ~110 lines of core logic\n* ~90 blank lines\n* ~75 lines for template management\n* ~75 lines for config management\n* ~30 lines of pure comments\n\nIf you want to strip `binnit` down even further, you could consider\nremoving:\n\n* blank lines\n* the external configuration file\n* the template system \n* sanity checks and error management\n* logging \n* code comments\n\nYou **CANNOT** remove the licence statements on each source file.\n\n\n## LICENSE\n\n`binnit` is Copyright (2017) by Vincenzo \"KatolaZ\" Nicosia.\n\n`binnit` is free software. You can use, modify, and redistribute it\nunder the terms of the GNU Affero General Public Licence, version 3 of\nthe Licence or, at your option, any later version. Please see\nLICENSE.md for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyne%2Fbinnit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyne%2Fbinnit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyne%2Fbinnit/lists"}