Skip to content

Instantly share code, notes, and snippets.

View himedlooff's full-sized avatar

Mike Morici himedlooff

View GitHub Profile

List

git config --global -l

Recent

git config --global alias.recent 'for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"'
@himedlooff
himedlooff / clickFileViewedViaRegex.js
Created October 10, 2019 18:02
When you have a lot of files to mark as viewed and you don't want to click them all...
function clickFileViewedViaRegex(regex, markAsViewed = true) {
document.querySelectorAll('.file').forEach((item) => {
if (item.querySelector('.file-header a[title]').getAttribute('title').match(regex)) {
var checkbox = item.querySelector('.js-reviewed-checkbox');
if (markAsViewed && !checkbox.checked) checkbox.click();
if (!markAsViewed && checkbox.checked) checkbox.click();
}
});
}