Skip to content

Instantly share code, notes, and snippets.

@tjstebbing
Last active February 28, 2019 06:51
Show Gist options
  • Save tjstebbing/a0c3e60279c6883aebb468bbeb0249c5 to your computer and use it in GitHub Desktop.
Save tjstebbing/a0c3e60279c6883aebb468bbeb0249c5 to your computer and use it in GitHub Desktop.
pidgeonhole

weird idea for a public facing key-value store with delete-on-read and TTL

pdgnhol is an anonymous key-value store with limited free public access and extended paid access.

Create some data, get a key back

> echo 'Hi there this is the data that was stored, it's now been deleted, thanks for picking up your parcel!' | curl -X POST example.com/new
url: https://example.com/9e86a3b3-46fe-4eb1-a434-172f32e1055b
access-key: 9e86a3b3-46fe-4eb1-a434-172f32e1055b
edit-key: 573a838e-3210-4360-b7ba-0cedb8a3c0fa
expires: Sun, 01 Dec 2019 00:00:00 GMT
size: 100
cost: 0.00
>

read the data, now it's gone!

> curl example.com/9e86a3b3-46fe-4eb1-a434-172f32e1055b 
Hi there this is the data that was stored, it's now been deleted, thanks for picking up your parcel!
>

try again:

> curl -i example.com/9e86a3b3-46fe-4eb1-a434-172f32e1055b 
HTTP/1.1 404 Not Found
Content-Type: text/html; charset=UTF-8
Referrer-Policy: no-referrer
Content-Length: 0
Date: Thu, 28 Feb 2019 06:40:41 GMT

>

Paid features

Create some data, get a key back

> curl -X POST example.com/new/{APIKEY} < alotofdata.tgz
url: https://example.com/ca82949a-4fe9-4ab8-aa4b-9b8e2ac3b8f4
access-key: 438b716b-34c7-4db7-9c68-c7003e807048
expires: Sun, 01 Dec 2019 00:00:00 GMT
size: 13518753
cost: 0.02
>
  • API keys
  • more data
  • access control
  • retention beyond one lookup
  • analytics
  • stripe integration
  • no questions asked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment