Giter VIP home page Giter VIP logo

nopaste's Introduction

Intro

What is NoPaste?

NoPaste is an open-source website similar to Pastebin where you can store any piece of code, and generate links for easy sharing

However, what makes NoPaste special is that it works with no database, and no back-end code. Instead, the data is compressed and stored entirely in the link that you share, nowhere else!

Note

Because all .ml domains have been taken down on July 17th, 2023, NoPaste has moved from nopaste.ml to nopaste.boris.sh

You may still be able to visit nopaste.ml if your visited it before with the same browser (thanks to the offline usage feature), but it will not work for new visitors.

Of course, all of your old links will continue to work if you just replace nopaste.ml with nopaste.boris.sh!

Sorry for the disturbance, and thanks for your understanding!

Because of this design:

  • πŸ—‘οΈ Your data cannot be deleted from NoPaste
  • πŸ”ž Your data cannot be censored
  • πŸ‘οΈ The server hosting NoPaste (or any clone of it) cannot read or access your data
  • ⏳ Your data will be accessible forever (as long as you have the link)
  • πŸ”€ You can access your data on every NoPaste clone, including your own
  • πŸ” Google will not index your data, even if your link is public

Note: This project is a copy of Topaz's paste service, with a reworked design and a few additional features (syntax highlighting, line numbers, offline usage, 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.boris.sh/#<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

For example, this is the CSS code used by NoPaste

Other features

Embedded NoPaste snippets

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

Here is an example of generated code and how it looks (click on the screenshot to see the interactive version)

<iframe
    width="100%"
    height="243"
    frameborder="0"
    src="https://nopaste.boris.sh/?l=py#XQAAAQAbAQAAAAAAAAA0m0pnuFI8c+qagMoNTEcTIfyUWbZjtjmBYcmJSzoNwS5iVMWHzvowv3IPM0vOG5cjrtDRTSVP/0biTIrrahfmbkuMQBBeSiSGpaJOqYJiKmUDYn2Gp1RtWE6gm8fLHMB4eyZ3+rEbUQwWyMcmWqvZ7m96RUeFyZdYbE85JGvhghqF8cyPB0ZjV0OQWsDxn5O5ysMrIcL+pKPk89EtLjAHhA1LZL9F3hzAtTx7I+GlyrxhhXGxAN//CvtaAA=="
></iframe>

iframe

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

Offline usage

When you visit NoPaste for the first time, its code is saved in your browser cache. After that, every NoPaste link you open will load really quick, even if your internet connection is slow.

What if you have no internet connexion at all? No problem, NoPaste will still work perfectly!

Editor features

  • Syntax highlighting (use the language selector)
  • Enable / disable line wrapping (use the button next to the language selector)
  • Delete line (Ctrl+D)
  • Multiple cursors (Ctrl+Click)
  • Usual keyboard shortuts (Ctrl+A, Ctrl+Z, Ctrl+Y...)

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
TinyURL 32,000
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

Generate NoPaste links

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

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

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

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

Deploy your own version of NoPaste

NoPaste is just a bunch of static files, making it really easy to deploy on any kind of file server.

Read the wiki to see how you can deploy your own version of NoPaste for free using Github Pages

nopaste's People

Contributors

bokub avatar wrtrteyteey23ee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nopaste's Issues

syntax formatting for m4

I noticed that while you have syntax formatting for a number of languages, you are lacking it for m4. There are a few keywords (such as define, incr, substr, ...), comments (# to newline), as well as substitutions like $1, $2 which at least the emacs mode for m4 is able to colorize. m4's heavy use of nested `' strings is not worth colorizing. Adding color to be similar to emacs would make this code easier to read

optional url-shortener api support

please, add url-shortener button support with predefined link/domain with selfhosted

urlshortener = "https://shortener.example.com/api?link="

and display pasted short link

cdn dependency

I just came across NoPaste. The concept of not "storing" the data at all seems very appealing to me.

Relaying on external CDNs to ship most of the required files seems counter-intuitive to me.

Have you ever considered creating a deployable package which includes the dependencys so that they are shipped from the local host?

Question: How did you manage to generate links

First of all, I am impressed by NoPaste because I want to make a code-editor for schools or teams to collaborate live.

But I have a question How did you manage to generate links? I saw the app generate links by adding '#' and generate random id to it but when I looked at your code I did not manage to understand how you did it. Did you use a library or is it a simple thing I don't know because I'm a beginner? πŸ˜ƒπŸ€”

Thank you again for your interest.

  • Derin Onder Eren (d3r1n)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.