Skip to content

Instantly share code, notes, and snippets.

View CholoTook's full-sized avatar

Dan Bolser CholoTook

  • Geromics
  • Cambridge
View GitHub Profile
@4cyc
4cyc / refresh-gmail.js
Last active January 4, 2023 09:57
bookmarklet to refresh Gmail POP3 accounts
javascript:
(function () {
const gmailWindow = window;
if(gmailWindow.location.href.indexOf("https://mail.google.com/") === -1){
alert('You have to run the bookmarklet from a Gmail window');
return;
}
gmailWindow.location.assign('https://mail.google.com/mail/u/0/#settings/accounts');
const xpath = "//span[text()='Check mail now']";
@oscherler
oscherler / README.md
Last active April 6, 2023 10:03
Diff JSON in Git using gron

jsondiff: diff JSON in Git using gron

gron is an incredible tool that makes JSON greppable. But it also makes it diffable, which is great if you have JSON files in Git.

To use gron to diff JSON in Git, save the json-diff script below and make it executable. Then add a difftool as shown in gitconfig, and optionally create an alias to invoke it more easily. Then try it:

git init
echo '{"foo":42,"bar":"hello"}' > foo.json
git add foo.json && git commit -m 'Initial commit.'