Click collector, a part of kinsome project
Collector is designed to work in concert with the central Kinsome app.
# 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) | |
# |
// 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) { |
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(''); |
http://emberjs.jsbin.com/qacatorixali/1/edit |
var str = "A"; | |
mutate(str); | |
str += "C"; | |
console.log(str); | |
function mutate(str) { | |
str += "B"; | |
} |
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" |
############################## | |
# 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 |
var exec = require('child_process').exec, | |
util = require('util'); | |
var target = process.argv[2]; | |
if (!target) { | |
return usage(1); | |
} | |
var FIELDS = ['pid', 'command', 'uid', 'lock']; | |
var FIELD_OPTIONS = { |
#!/usr/bin/env node | |
var fs = require('fs'); | |
var util = require('util'); | |
var DEFAULT_BPS = 10 * 1000; // 10 kb / sec | |
var source = process.argv[2]; | |
if (!source) { | |
return usage(1); |