Skip to content

Instantly share code, notes, and snippets.

View senhalil's full-sized avatar
🦧

Halil Sen senhalil

🦧
  • Equilibrium Energy
  • Bordeaux
  • X @hllsen
View GitHub Profile
@senhalil
senhalil / gist:fd5e06913523cb9d45b3123ebd186573
Last active October 3, 2023 11:47 — forked from Ricket/gist:78bcd681db86bcbb134558428c4c6cb4
git diff -- use json_xs to pretty-print the json before diffing it
sudo apt-get install libjson-xs-perl
echo "*.json diff=json" >> ~/.gitattributes
git config --global core.attributesfile ~/.gitattributes
git config --global diff.json.textconv "json_xs -e \"print JSON::XS->new->utf8->pretty->canonical->encode(\\\$_)\" -t none < \"\$1\""