Git log as JSON array
git log \
--pretty=format:'{^^^^date^^^^:^^^^%ci^^^^,^^^^abbreviated_commit^^^^:^^^^%h^^^^,^^^^subject^^^^:^^^^%s^^^^,^^^^body^^^^:^^^^%b^^^^}' \
| sed 's/"/\\"/g' \
| sed 's/\^^^^/"/g' \
| jq -s '.'
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Git log as JSON array
git log \
--pretty=format:'{^^^^date^^^^:^^^^%ci^^^^,^^^^abbreviated_commit^^^^:^^^^%h^^^^,^^^^subject^^^^:^^^^%s^^^^,^^^^body^^^^:^^^^%b^^^^}' \
| sed 's/"/\\"/g' \
| sed 's/\^^^^/"/g' \
| jq -s '.'
This mainly demonstrates my goal of preparing a Raspberry Pi to be provisioned prior to its first boot. To do this I have chosen to use the same cloud-init that is the standard for provisioning servers at Amazon EC2, Microsoft Azure, OpenStack, etc.
I found this to be quite challenging because there is little information available for using cloud-init without a cloud. So, this project also servers as a demonstration for anyone on any version of Linux who may want to install from source, and/or use without a cloud. If you fall into that later group, you probably just want to read the code. It's bash
so everything I do, you could also do at the command line. (Even the for
loop.)