Generate json schema definition (yaml format) from example snippt
#! /bin/bash
# npm install -g yamljs json-schema-generator
# json-pretty came from [here](https://gist.github.com/CatTail/fc172a7fe6f300528665e279592c6500)
cat "${1:-/dev/stdin}" | json-pretty | json-schema-generator | tail -n +2 | json2yaml -d 10 -