Skip to content

Instantly share code, notes, and snippets.

@cjbrigato
Created December 21, 2024 02:56
Show Gist options
  • Select an option

  • Save cjbrigato/039aaf67e1ce9c1d4bf13fc8ccde6edf to your computer and use it in GitHub Desktop.

Select an option

Save cjbrigato/039aaf67e1ce9c1d4bf13fc8ccde6edf to your computer and use it in GitHub Desktop.
sprunge.sh but for hastebin
#!/bin/bash
# usage:
#
# $~ echo "whatever" | hastebin.sh
# paste url: https://hastebin.skyra.pw/raw/$key
#
key=$(curl -s 'https://hastebin.skyra.pw/documents' -H 'accept: application/json' -H 'content-type: text/plain' --data-binary @- | jq -r '.key')
echo "paste url: https://hastebin.skyra.pw/raw/$key"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment