Skip to content

ppok/nopaste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

NoPaste is a client-side paste service which works with no database, and no back-end code

Instead, 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

As a result, there is no risk of data being lost, censored or deleted. The data is stored entirely in the links and nowhere else!

Note: This project is a copy of Topaz's paste service, with a reworked design and a few additional features (syntax highlighting, line numbers, line wrapping, embedding...)

How it works

When you click on "Generate Link", NoPaste compresses the whole text using the LZMA algorithm, encodes it in Base64, and puts it in the optional URL fragment, after the first # symbol: nopaste.ml/#<your data goes here>

When you open a link, NoPaste reads, decodes, and decompresses whatever is after the #, and displays the result in the editor.

This process is done entirely in your browser, and the web server hosting NoPaste never has access to the fragment

Maximum sizes for links

NoPaste is great for sharing code snippets on various platforms.

These are the maximum link lengths on some apps and browsers.

App Max length
Reddit 10,000
Twitter 4,088
Slack 4,000
QR Code 2,610
Bitly 2,048
Browser Max length Notes
Google Chrome (win) 32,779 (mac) 10,000 Will not display, but larger links work
Firefox >64,000
Microsoft IE 11 4,043 Will not show more than 2,083
Microsoft Edge 2,083 Anything over 2083 will fail
Android 8,192
Safari Lots

Embedded NoPaste snippets

You can include NoPaste code snippets into your own website by clicking the Embed button and using the generated HTML code

This is what an embedded Paste snippet looks like

Feel free to edit the generated height and width attributes, so they suit your needs

Generate NoPaste links

NoPaste links can be created easily from your system's command line:

# Linux
echo -n 'Hello World' | lzma | base64 | xargs -0 printf "https://nopaste.ml/#%s"

# Mac
echo -n 'Hello World' | lzma | base64 -w0 | xargs -0 printf "https://nopaste.ml/#%s"

# Windows / WSL
echo -n 'Hello World' | xz --format=lzma | base64 -w0 | printf "https://nopaste.ml/#%s" "$(cat -)"

About

📋 Client-side paste service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 43.5%
  • HTML 31.6%
  • CSS 24.5%
  • Makefile 0.4%