Skip to content

Instantly share code, notes, and snippets.

View accidentallyc's full-sized avatar
💭
What's happening?

CasseyCola accidentallyc

💭
What's happening?
  • Tower Insurance
View GitHub Profile
@accidentallyc
accidentallyc / OpenWithSublimeText2.bat
Last active August 29, 2015 14:25 — forked from mrchief/LICENSE.md
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)
@echo off
SET st2Path=C:\Program Files\Sublime Text 2\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f
@accidentallyc
accidentallyc / $REQUIRE.js
Last active August 29, 2015 14:25
REQUIRE a dom to be retrieved via jQuery. Useful for keeping projects in tact specially when changes keep happening.
/* Assumes that jQuery has been loaded */
window.$REQUIRE = function(s){
var e = jQuery.apply(this,arguments);
if( e.length ) return e;
else throw "DOM " + s + " is required but cannot be found";
};
@accidentallyc
accidentallyc / git-remove-local-branches.sh
Last active November 18, 2020 23:52
Git Remove Local Branches without remotes spell
# For squashed merged commits (with remotes deleted)
git branch -vv | grep ": gone]" | grep -v "*" | awk '{print $1}' | xargs git branch -D