This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getDistantBrightnessColor = (function () { | |
// Calculate grayscale color (luma) according to ITU-R Recommendation BT. 709 | |
var grayscaleLuma709Color = function(color) { | |
return Math.round(0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b) | |
}; | |
var linearDiffColor = function(color1, color2) { | |
return Math.abs(color1.r - color2.r) + | |
Math.abs(color1.g - color2.g) + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var execIsolated = (function () { | |
var exec = function () { | |
arguments[0](arguments[1]); | |
}; | |
return function (funcname, args) { | |
args = args || []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./ -maxdepth 1 -type f | grep -E ".*\.[a-zA-Z0-9]*$" | sed -e 's/.*\(\.[a-zA-Z0-9]*\)$/\1/' | sort | uniq -c | sort -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get -y install numlockx | |
sudo sed -i 's|^exit 0.*$|# Numlock enable\n[ -x /usr/bin/numlockx ] \&\& numlockx on\n\nexit 0|' /etc/rc.local | |
# http://askubuntu.com/questions/155679/how-to-enable-numlock-at-boot-time-for-login-screen |
NewerOlder