View create_labels.sh
#!/usr/bin/env bash | |
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/ | |
### | |
# Label definitions | |
### | |
declare -A LABELS | |
# Platform |
View Orignal solution to _.sortedIndex
_.sortedIndex = function(array, obj, iteratee, context) { | |
iteratee = cb(iteratee, context, 1); | |
var value = iteratee(obj) === undefined ? Infinity : iteratee(obj); | |
var low = 0, high = array.length; | |
while (low < high) { | |
var mid = Math.floor((low + high) / 2); | |
if (iteratee(array[mid]) <= value) low = mid + 1; else high = mid; | |
} | |
return low; | |
}; |