When a temporary clip is the right tool
Sometimes you need to get a few lines from one place to another and a repository would be overkill:
- Copying a command from your phone to a terminal on a server you are logged in to.
- Sending a stack trace to a colleague while you are on a call.
- Moving a config block to a fresh virtual machine that has a browser but no clipboard sharing.
- Handing someone a snippet in a chat that mangles code with smart quotes.
- Getting output off a locked-down machine where you cannot install tools or sign in.
In each case you want it fast, with no sign-up, and gone afterwards.
How to share a snippet
- Copy the code in your editor or terminal.
- Open this site and paste it into Send text. The box uses a monospaced font so you can check indentation at a glance.
- Choose an expiry. For a live debugging session, 10 minutes or 1 hour is plenty.
- Press Save to clipboard and share the 6-digit code, the link or the QR code.
- The other person opens it and presses Copy or Download .txt.
If you are sending between two machines of your own, scanning the QR code on a phone and opening the link on the second machine avoids typing six digits.
Keeping the code intact
- Tabs and spaces are kept. What you paste is what is stored. Be aware that some terminals convert tabs to spaces on paste.
- Plain text only. Anything copied from a web page with formatting is flattened to text, which is what you want for code.
- Smart quotes are the usual culprit when a command fails after pasting from a chat app. If your command suddenly errors with strange characters, paste it through the clipboard and compare, or retype the quotes.
- Line endings. A snippet copied on Windows can have different line endings from one copied on Linux. For shell scripts, make sure the final file uses the endings your system expects.
- Download as a file. Use Download .txt if you need the content as a file, then rename it with the right extension.
Keep secrets out
Code snippets often carry things that should not travel: API keys, access tokens, private keys, database passwords and connection strings. A few rules:
- Remove the secret first. Replace it with a placeholder such as
YOUR_API_KEY. - If you must send it, add a password, set a 10-minute expiry and turn on Delete after the first view. The password encrypts the text in your browser before upload, so the server never holds it in readable form.
- Send the password separately from the code, on a different channel.
- Rotate it afterwards. Treat any secret that has been transferred outside your secrets manager as exposed, and replace it.
This is a quick-transfer tool, not a secrets manager, so use a proper one whenever you can.
Sharing logs and error messages
When you ask for help with a bug, the person helping needs the whole error message, not a screenshot of it. Paste the full stack trace into a clip, add the command you ran above it, and share the link. Before you do, check the output for:
- Usernames and home directory paths.
- Hostnames and internal IP addresses.
- Tokens in URLs or headers.
- Email addresses and other personal data.
Clip, gist or repository?
| Need | Best choice |
|---|---|
| Move a snippet once, between machines or people | Online clipboard |
| Share a snippet that should have a permanent link | A code hosting snippet service |
| Work on code with history and review | A repository |
| Share a secret | A secrets manager |
Small workflow tips
- Keep a clip open in a browser tab on your second machine so you can refresh and fetch the newest code.
- Put a comment on the first line, such as
# restart nginx on staging, so the snippet explains itself when opened. - If you are sending several commands, put each on its own line with a blank line between groups.
- Download a
.txtcopy if you want to keep the snippet; the clip itself will not last.