Skip to content

Instantly share code, notes, and snippets.

View himedlooff's full-sized avatar

Mike Morici himedlooff

View GitHub Profile
@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();
}
});
}
@himedlooff
himedlooff / prefixing-scss.md
Last active April 21, 2024 13:28
Regex for finding SCSS variables and class declarations and prepending them with a prefix in Sublime Text

SCSS

Field Value
Find \$([a-z\-_]+)
Where -*.js,-*.woff,-*.woff2
Replace $newprefix-$1

Should match these: