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
/** | |
* Calculate brightness value by RGB or HEX color. | |
* @param color (String) The color value in RGB or HEX (for example: #000000 || #000 || rgb(0,0,0) || rgba(0,0,0,0)) | |
* @returns (Number) The brightness value (dark) 0 ... 255 (light) | |
*/ | |
function brightnessByColor (color) { | |
var color = "" + color, isHEX = color.indexOf("#") == 0, isRGB = color.indexOf("rgb") == 0; | |
if (isHEX) { | |
var m = color.substr(1).match(color.length == 7 ? /(\S{2})/g : /(\S{1})/g); | |
if (m) var r = parseInt(m[0], 16), g = parseInt(m[1], 16), b = parseInt(m[2], 16); |
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 portrange = 45032 | |
function getPort (cb) { | |
var port = portrange | |
portrange += 1 | |
var server = net.createServer() | |
server.listen(port, function (err) { | |
server.once('close', function () { | |
cb(port) |
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
[ | |
{ | |
"_id": 7, | |
"assignmentDateFormats": {}, | |
"idAssignment": 29, | |
"assignmentDate": {}, | |
"currentAssignment": 0, | |
"idEmmployee": 24, | |
"idDwEnterprise": 85, | |
"idStock": 1, |
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
Installing git-diff-details to /home/rafael/.atom/packages REQUEST { method: 'GET', | |
url: 'https://atom.io/api/packages/git-diff-details', | |
json: true, | |
retries: 4, | |
proxy: null, | |
strictSSL: true, | |
headers: { 'User-Agent': 'npm/2.5.1 node/v0.10.35 linux x64' }, | |
uri: null, | |
callback: [Function] } | |
REQUEST make request https://atom.io/api/packages/git-diff-details |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |