Skip to content

Instantly share code, notes, and snippets.

@alan-null
alan-null / context.getCommands.js
Created May 13, 2016 23:09
Display all available commands for current context
[].forEach.call(scExtManager.getModule(SitecoreExtensions.Modules.Launcher.LauncherModule).commands.filter(function (c, i, a) {
return c.canExecute();
}), function(c) {
console.log(c.name + " | " + c.description)
})
@alan-null
alan-null / notepad regex
Created July 14, 2015 15:37
Collection of regex used in notepad to improve productivity
# Cach style tag insige HTML elements.
style="(.)+?"
@alan-null
alan-null / git checkout master
Created July 14, 2015 15:36
A clink script for supporting tab-completion of git branches when using "git checkout"
function git_checkout_match_generator(text, first, last)
found_matches = false;
if rl_state.line_buffer:find("^git checkout ") then
has_start_branch = not rl_state.line_buffer:find("^git checkout[ ]*$")
for line in io.popen("git branch 2>nul"):lines() do
local m = line:match("[%* ] (.+)$")
if m then
if not has_start_branch then
clink.add_match(m)