Skip to content

Instantly share code, notes, and snippets.

Mike Morici himedlooff

Block or report user

Report or block himedlooff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@himedlooff
himedlooff / clickFileViewedViaRegex.js
Created Oct 10, 2019
When you have a lot of files to mark as viewed and you don't want to click them all...
View clickFileViewedViaRegex.js
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();
}
});
}
View git-alias-commands.md

List

git config --global -l

Recent

git config --global alias.recent 'for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"'
View show-hidden-files.md

Show hidden files on OSX

defaults write com.apple.finder AppleShowAllFiles true
killall Finder
@himedlooff
himedlooff / prefixing-scss.md
Last active Mar 9, 2018
Regex for finding SCSS variables and class declarations and prepending them with a prefix in Sublime Text
View prefixing-scss.md

SCSS

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

Should match these:

View inline-style-editor.html
<html>
<head style="display: block; width: 50%; height: 100%; float: left;">
<meta charset="UTF-8">
<title>Live CSS</title>
<style>
* {
box-sizing: border-box;
}
#style {
View svg-regex.md
 id="[a-z(-|_)]*"
\n[\s]*
@himedlooff
himedlooff / github-copy-file-path.js
Last active Oct 21, 2015
Paste this into your console to enable click-to-copy on GitHub.com file paths
View github-copy-file-path.js
(function(){
$('.file-info[title], .file-info [title]')
.css('cursor', 'pointer')
.click(function() {
var range = document.createRange();
$(this).html($(this).attr('title'));
range.selectNode(this);
window.getSelection().addRange(range);
try {
var successful = document.execCommand('copy');
View Grunt-tasks-diagram.xml
<?xml version="1.0" encoding="UTF-8"?>
<mxGraphModel dx="3239" dy="2042" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="826" style="default-style2" math="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="192" value="" style="edgeStyle=elbowEdgeStyle;entryX=0.5;entryY=0;exitX=0.5;exitY=1;strokeColor=#FFB366;elbow=vertical" parent="1" source="95" target="129" edge="1"><mxGeometry width="100" height="100" relative="1" as="geometry"><mxPoint x="-500" y="970" as="sourcePoint"/><mxPoint x="-400" y="870" as="targetPoint"/><Array as="points"><mxPoint x="-410" y="620"/></Array></mxGeometry></mxCell><mxCell id="176" value="" style="edgeStyle=none;exitX=0.5;exitY=1;entryX=0.5;entryY=0;strokeColor=#FFB366" parent="1" source="152" target="108" edge="1"><mxGeometry width="100" height="100" relative="1" as="geometry"><mxPoint x="-420" y="-594.5" as="sourcePoint"/><mxPoint x="-420" y="-415.5" as="targetPoint"/></mxGeometry></mxCell><mxCell
View namik-emoji-ascii.js
var n = [
':namik_smile::namik_smile::namik_smile:',
':namik_smile::spacer::namik_smile:',
':namik_smile::spacer::namik_smile:',
];
var a = [
':namik_smile::namik_smile::namik_smile:',
':namik_smile::spacer::namik_smile:',
':namik_smile::namik_smile::namik_smile::namik_smile:',
];
You can’t perform that action at this time.