all repos — NoPaste @ af22dc42f8299ee1e1d5d16b05c41bea88f678e1

Resurrected - The PussTheCat.org fork of NoPaste

README.md (view raw)

 1[![Intro](https://github.com/bokub/nopaste/raw/images/intro.png)][intro-img]
 2
 3[NoPaste](https://nopaste.ml/) is a client-side paste service which works with **no database**, and **no back-end code**
 4
 5Instead, the data is **compressed** then **stored** into a unique URL that can be shared and decoded later. For example, [this is the CSS code used by NoPaste][example]
 6
 7As a result, there is no risk of data being lost, censored or deleted. The data is stored entirely **in the links** and nowhere else!
 8
 9**Note:** This project is a copy of [Topaz's paste service][topaz-example], with a reworked design and a few additional features (syntax highlighting, line numbers, line wrapping, embedding...)
10
11## How it works
12
13When you click on "Generate Link", NoPaste compresses the whole text using the
14[LZMA algorithm](https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Markov_chain_algorithm), encodes it in
15[Base64](https://en.wikipedia.org/wiki/Base64), and puts it in the optional URL fragment, after the first `#` symbol: `nopaste.ml/#<your data goes here>`
16
17When you open a link, NoPaste reads, decodes, and decompresses whatever is after the `#`, and displays the result in the editor.
18
19This process is done entirely **in your browser**, and the web server hosting NoPaste [never has access to the fragment](https://en.wikipedia.org/wiki/Fragment_identifier)
20
21## Maximum sizes for links
22
23NoPaste is great for sharing code snippets on various platforms.
24
25These are the maximum link lengths on some apps and browsers.
26
27| App     | Max length |
28| ------- | ---------- |
29| Reddit  | 10,000     |
30| Twitter | 4,088      |
31| Slack   | 4,000      |
32| QR Code | 2,610      |
33| Bitly   | 2,048      |
34
35| Browser         | Max length                | Notes                                   |
36| --------------- | ------------------------- | --------------------------------------- |
37| Google Chrome   | (win) 32,779 (mac) 10,000 | Will not display, but larger links work |
38| Firefox         | >64,000                   |                                         |
39| Microsoft IE 11 | 4,043                     | Will not show more than 2,083           |
40| Microsoft Edge  | 2,083                     | Anything over 2083 will fail            |
41| Android         | 8,192                     |                                         |
42| Safari          | Lots                      |                                         |
43
44## Embedded NoPaste snippets
45
46You can include NoPaste code snippets into your own website by clicking the _Embed_ button and using the generated HTML code
47
48[This is what an embedded Paste snippet looks like](https://jsfiddle.net/bokub/nwtcdrph/show)
49
50Feel free to edit the generated `height` and `width` attributes, so they suit your needs
51
52## Generate NoPaste links
53
54NoPaste links can be created easily from your system's command line:
55
56```bash
57# Linux
58echo -n 'Hello World' | lzma | base64 | xargs -0 printf "https://nopaste.ml/#%s"
59
60# Mac
61echo -n 'Hello World' | lzma | base64 -w0 | xargs -0 printf "https://nopaste.ml/#%s"
62
63# Windows / WSL
64echo -n 'Hello World' | xz --format=lzma | base64 -w0 | printf "https://nopaste.ml/#%s" "$(cat -)"
65```
66
67[intro-img]: https://nopaste.ml/?lang=python#XQAAAQA6BAAAAAAAAAAFYH9Ev4Ly6wIDoAZQ25VXENWodOrWpmx8bfd8j6jeNeL/0fGICEpU6gh9GhXuFjqBBpJFOvefaxUXJquUWRQarmV+S0SHFOLUFyg/dw8OQI6RB6Y1yliOBWGL916HxAGqgwyLqjkH4w450OLk+q9oJYS6PrZfXU5uBC5DLe76OkG25ibvbsasKN51JuVyRedgoF/d7F9d6L7p02q0jHAM9pnPpKOKqlIVsNnXwYKXK10tnZ0GdiwJ3EeT//52uhw=
68[example]: https://nopaste.ml/?lang=css#XQAAAQB2DQAAAAAAAAAXioAj/ZZaukKWizx++f8w08qY+xe+w0AeNB0EtEDMR1jPECOrMSz2rcy5XqUVTzusmFXo407ujwufsB1Va3cy02BV4Chx15I+SbM8Ei2WS8/MaZa0wIOjHf0s6B9Kcwi1J73qYeIcKm39PEWGnBM4Ym5aXFOF1Irrn1N95vEcl4YI+98rydudZHmsNCmt995GvCpLImwH7yj3SlMadWaQA0jHCrY1ZBvhjSJ9mAAdYjCJLduITZuXomgpqtr3sYI1WKeRGNmPSD8J8WRLtCx0BZl3yWZZrUxJbmVod8cYiPJnlO+CzQA03qA/GZnxhMYd9TPc2Xlq8UIhBX6gmvo/xhHJc/WHnuBFB32xJ37O5FZlZuXGy6wFE/lakVteoqEqgvyan4Lf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