hastebin/about.md

3.0 KiB

About Hastebin - haste.nixc.us

Welcome to our Hastebin instance at 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.

Data Expiry and Handling

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.

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.

Repository

The source code for this Hastebin instance is available at our Git repository: Nixius/hastebin. Feel free to explore, contribute, or use it to set up your own instance.

Tools for Uploading

haste CLI Tool

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.

Using curl

In the meantime, you can still use curl to upload content to Hastebin. Here's a quick guide on how to do it:

  • To upload a file:

    curl -X POST -s --data-binary @filename.txt https://haste.nixc.us/documents
    
  • To upload text directly:

    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.

Examples of Using curl with Pipes and Redirection

  1. Sending File Content with cat:

    cat filename.txt | curl -X POST -s --data-binary @- https://haste.nixc.us/documents
    
  2. Sending Command Output: For example, sending the output of ls -l:

    ls -l | curl -X POST -s --data-binary @- https://haste.nixc.us/documents
    
  3. Directly Writing and Sending Text:

    echo "Your text here" | curl -X POST -s --data-binary @- https://haste.nixc.us/documents
    

In these examples, the @- tells curl to read from stdin.

Adding Aliases to .bashrc and .zshrc

To simplify this process, you can add an alias to your .bashrc or .zshrc file. Here's an example alias:

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:

    cat filename.txt | haste
    
  • For command outputs:

    ls -l | haste
    
  • For direct text:

    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.