Update about.md

This commit is contained in:
colin 2024-01-19 18:15:36 +00:00
parent f754da9ea0
commit 3e31a8fe0a
1 changed files with 60 additions and 40 deletions

100
about.md
View File

@ -1,61 +1,81 @@
# Haste
# About Hastebin - haste.nixc.us
Sharing code is a good thing, and it should be _really_ easy to do it.
A lot of times, I want to show you something I'm seeing - and that's where we
use pastebins.
Welcome to our Hastebin instance at [haste.nixc.us](http://haste.nixc.us). This site offers a simple, easy-to-use Pastebin where you can store text for a certain period. This service helps share snippets of code or text with others.
Haste is the prettiest, easiest to use pastebin ever made.
## Data Expiry and Handling
## Basic Usage
By default, pastes stored on haste.nixc.us have an expiry time of 90 days from the last access. After this period, the data is deleted from our database. Please note that this deletion process is not forensics-proof. Still, it effectively removes the data for most intents and purposes.
Type what you want me to see, click "Save", and then copy the URL. Send that
URL to someone and they'll see what you see.
It's important to understand that this service is purely plain text-based. Data is only encrypted during transit (using HTTPS), and we do not guarantee privacy, stability, or consistent uptime. While we aim to avoid data resets, they may occur under certain circumstances.
To make a new entry, click "New" (or type 'control + n')
## Repository
## From the Console
The source code for this Hastebin instance is available at our Git repository: [Nixius/hastebin](https://git.nixc.us/Nixius/hastebin.git). Feel free to explore, contribute, or use it to set up your own instance.
Most of the time I want to show you some text, it's coming from my current
console session. We should make it really easy to take code from the console
and send it to people.
## Tools for Uploading
`cat something | haste` # https://hastebin.com/1238193
### haste CLI Tool
You can even take this a step further, and cut out the last step of copying the
URL with:
We are ostensibly updating the original `haste` CLI tools, providing a convenient way to upload content directly from your terminal. Stay tuned for updates on this tool.
* osx: `cat something | haste | pbcopy`
* linux: `cat something | haste | xsel`
* windows: check out [WinHaste](https://github.com/ajryan/WinHaste)
### Using `curl`
After running that, the STDOUT output of `cat something` will show up at a URL
which has been conveniently copied to your clipboard.
In the meantime, you can still use `curl` to upload content to Hastebin. Here's a quick guide on how to do it:
That's all there is to that, and you can install it with `gem install haste`
right now.
* osx: you will need to have an up to date version of Xcode
* linux: you will need to have rubygems and ruby-devel installed
- To upload a file:
```bash
curl -X POST -s --data-binary @filename.txt https://haste.nixc.us/documents
```
## Duration
- To upload text directly:
```bash
curl -X POST -s --data-binary "Your text here" https://haste.nixc.us/documents
```
After uploading, you will receive a URL with your uploaded content, which you can share with others.
Pastes will stay for 30 days from their last view. They may be removed earlier
and without notice.
### Examples of Using `curl` with Pipes and Redirection
## Privacy
1. **Sending File Content with `cat`**:
```bash
cat filename.txt | curl -X POST -s --data-binary @- https://haste.nixc.us/documents
```
While the contents of hastebin.com are not directly crawled by any search robot
that obeys "robots.txt", there should be no great expectation of privacy. Post
things at your own risk. Not responsible for any loss of data or removed
pastes.
2. **Sending Command Output**:
For example, sending the output of `ls -l`:
```bash
ls -l | curl -X POST -s --data-binary @- https://haste.nixc.us/documents
```
## Open Source
3. **Directly Writing and Sending Text**:
```bash
echo "Your text here" | curl -X POST -s --data-binary @- https://haste.nixc.us/documents
```
Haste can easily be installed behind your network, and it's all open source!
In these examples, the `@-` tells `curl` to read from stdin.
* [haste-client](https://github.com/seejohnrun/haste-client)
* [haste-server](https://github.com/seejohnrun/haste-server)
### Adding Aliases to `.bashrc` and `.zshrc`
## Author
To simplify this process, you can add an alias to your `.bashrc` or `.zshrc` file. Here's an example alias:
Code by John Crepezzi <john.crepezzi@gmail.com>
Key Design by Brian Dawson <bridawson@gmail.com>
```bash
alias haste='curl -X POST -s --data-binary @- https://haste.nixc.us/documents'
```
After adding this alias, you can use `haste` in your terminal like this:
- **For files**:
```bash
cat filename.txt | haste
```
- **For command outputs**:
```bash
ls -l | haste
```
- **For direct text**:
```bash
echo "Your text here" | haste
```
To make these changes effective, you must reload your shell configuration with the command `source ~/.bashrc` or `source ~/.zshrc`, depending on which shell you use.