pb.plz.ac

pb.plz.ac is a clean pastebin service deployed on Cloudflare.

Supports quick sharing of text and images, data will automatically expire and be deleted after 24 hours.

Table of Contents

Abstract

Create new paste from command output:

cmd | curl -X POST --data-binary @- "https://pb.plz.ac/"

Also provides a web form for convenient upload of text and images from browser.

API Specification

POST /

Upload text content or image files

Text upload:

Content-Type: text/plain
Body: text content

Image upload:

Content-Type: multipart/form-data
Body: file=@image.jpg

Response:

https://pb.plz.ac/{id}

GET /{id}

Retrieve paste content

Response:

Content-Type: text/plain or image/*
Body: original content

Usage Examples

Creating Pastes

Create paste from 'dmesg' command output:

$ dmesg | curl -X POST --data-binary @- "https://pb.plz.ac/"
https://pb.plz.ac/abc123

Upload file content:

$ curl -X POST --data-binary @file.txt "https://pb.plz.ac/"
https://pb.plz.ac/def456

Retrieving Content

Get the paste created above:

$ curl "https://pb.plz.ac/abc123"

Uploading Images

Upload image files:

$ curl -X POST -F "file=@screenshot.png" "https://pb.plz.ac/"
https://pb.plz.ac/img789

Supported image formats: JPEG, PNG, GIF, WebP, SVG

More curl Examples

Upload clipboard content (macOS):

$ pbpaste | curl -X POST --data-binary @- "https://pb.plz.ac/"

Upload clipboard content (Linux):

$ xclip -o | curl -X POST --data-binary @- "https://pb.plz.ac/"

Save content to file:

$ curl "https://pb.plz.ac/abc123" > saved_content.txt

Update existing content:

$ echo "Updated content" | curl -X PUT --data-binary @- "https://pb.plz.ac/abc123"
https://pb.plz.ac/abc123 updated.

Delete content:

$ curl -X DELETE "https://pb.plz.ac/abc123"
https://pb.plz.ac/abc123 deleted.

Web Form

For convenient browser uploads, visit: /upload

The upload page provides a user-friendly interface for:

Shell Functions

For easier usage, add these functions to your ~/.bashrc or ~/.zshrc:

# Basic functions
pb() { curl -X POST --data-binary @- "https://pb.plz.ac/"; }
pbi() { curl -X POST -F "file=@$1" "https://pb.plz.ac/"; }
pbget() { curl "https://pb.plz.ac/$1"; }
pbupdate() { curl -X PUT --data-binary @- "https://pb.plz.ac/$1"; }
pbdel() { curl -X DELETE "https://pb.plz.ac/$1"; }

# Usage examples:
echo "Hello World" | pb
ls -la | pb  
pbi screenshot.png
pbget abc123
echo "Updated" | pbupdate abc123
pbdel abc123
Important Notes: