Skip to content

Instantly share code, notes, and snippets.

@13rac1
Created February 26, 2017 20:09
Show Gist options
  • Save 13rac1/6dcd5e2eba57caaeff7ef6898e6a6464 to your computer and use it in GitHub Desktop.
Save 13rac1/6dcd5e2eba57caaeff7ef6898e6a6464 to your computer and use it in GitHub Desktop.
Generate a Minecraft UUID ops.json with curl and jq given a comma separated list of usernames
#!/bin/sh
# 2017 https://github.com/eosrei/
OPS=${1-notch,jeb}
echo -n "$OPS" \
| jq --raw-input --slurp 'split(",")' - \
| curl -H "Content-type: application/json" \
-d @- \
https://api.mojang.com/profiles/minecraft \
| jq ".[].level = 4"
# Usage:
# ./get-ops-json.sh notch,jeb > ops.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment