Click collector, a part of kinsome project
Collector is designed to work in concert with the central Kinsome app.
############################## | |
# Colorized bash prompt | |
echo_git_branch() { | |
local branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) | |
if [[ ! -z "$branch" ]]; then | |
printf "(%s) " $branch | |
fi | |
} | |
PROMPT_DIRTRIM=3 |
killbranch = "!f(){ dialog --keep-tite --yesno \"Are you sure you want to delete branch $1?\" 6 60 && git branch -d \"$1\" && git push origin :\"$1\"; };f" |
var str = "A"; | |
mutate(str); | |
str += "C"; | |
console.log(str); | |
function mutate(str) { | |
str += "B"; | |
} |
http://emberjs.jsbin.com/qacatorixali/1/edit |
function decimalToCustom(decimal, alphabet) { | |
var alphabetSize = alphabet.length, | |
remainder, | |
result = []; | |
while (decimal > 0) { | |
remainder = decimal % alphabetSize, | |
decimal = Math.floor(decimal / alphabetSize); | |
result.unshift(alphabet[remainder]); | |
} | |
return result.join(''); |
// Easier than looking up in documentation... :-) | |
function test(chars) { | |
for (var i = 0; i < chars.length; i++) { | |
testSole(chars[i]); | |
testStart(chars[i]); | |
testMiddle(chars[i]); | |
} | |
function testSole(c) { |
# Alias command to quickly jump to any project on your machine. | |
# Advantage is given to recently altered projects and directories that hold .git repositories. | |
# | |
# Examples: | |
# gd # cd ~/dev/[most recently active project] | |
# gd project1 # cd ~/dev/c/project1 | |
# gd pr1 # cd ~/dev/c/project1 (fuzzy search) | |
# gd node # cd ~/dev/node/[most recently active node project] | |
# gd gdfgd # nothing (no candidate found) | |
# |