Skip to content

Instantly share code, notes, and snippets.

@AI-nsley69
Created February 19, 2022 23:47
Show Gist options
  • Save AI-nsley69/a55918558b699de1d8887f8c2e7d3a8f to your computer and use it in GitHub Desktop.
Save AI-nsley69/a55918558b699de1d8887f8c2e7d3a8f to your computer and use it in GitHub Desktop.
log
#!/bin/bash
# Small script to upload files to https://mclo.gs, requires jq to be installed
# Example usage: log latest.log
# Example output: https://mclo.gs/ABCDEFG
content="content=$(cat $1)"
request=$(curl --location --request POST 'https://api.mclo.gs/1/log' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "$content" 2>/dev/null | jq -r '.id')
echo "https://mclo.gs/$request"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment