Skip to content

Instantly share code, notes, and snippets.


Christian Ekstam cekstam

  • Stockholm, Sweden
View GitHub Profile
cekstam / gist:a7758b8f315835d479f379715eebd0c3
Last active Jul 24, 2020
create valid JSON from git log using python and ast.literal_string
View gist:a7758b8f315835d479f379715eebd0c3
git log -n 10\
--pretty=format:'{"commit": "%H", "author": "%aN <%aE>", "date": "%ai", "message": """%B""", "notes": """%N""" },' \
$@ | awk 'BEGIN { print("[") } { print($0) } END { print("]") }' | python -u -c \
'import ast,json,sys; print(json.dumps(ast.literal_eval('

Keybase proof

I hereby claim:

  • I am cekstam on github.
  • I am cekstam ( on keybase.
  • I have a public key whose fingerprint is 0FA7 69C1 0C31 0993 BCEE 0695 2A09 CB8D 048A D60A

To claim this, I am signing this object:

You can’t perform that action at this time.