View DOMClass.js
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
HTMLElement = typeof(HTMLElement) != 'undefiend' ? HTMLElement : Element; | |
HTMLElement.prototype.addClass = function(string) { | |
if (!(string instanceof Array)) { | |
string = string.split(' '); | |
} | |
for(var i = 0, len = string.length; i < len; ++i) { | |
if (string[i] && !new RegExp('(\\s+|^)' + string[i] + '(\\s+|$)').test(this.className)) { | |
this.className = this.className.trim() + ' ' + string[i]; | |
} |
View blueprint.css
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
background-color : #4e9ad5; | |
background-size : 100px 100px, 100px 100px, 20px 20px, 20px 20px; | |
background-position : -11px -1px; | |
background-image : linear-gradient(rgba(255, 255, 255, .3) 1px, transparent 1px), linear-gradient(0, rgba(255, 255, 255, .3) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px), linear-gradient(0, rgba(255, 255, 255, .1) 1px, transparent 1px); | |
background-image : -webkit-linear-gradient(rgba(255, 255, 255, .3) 1px, transparent 1px), -webkit-linear-gradient(0, rgba(255, 255, 255, .3) 1px, transparent 1px), -webkit-linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px), -webkit-linear-gradient(0, rgba(255, 255, 255, .1) 1px, transparent 1px); | |
background-image : -moz-linear-gradient(rgba(255, 255, 255, .3) 1px, transparent 1px), -moz-linear-gradient(0, rgba(255, 255, 255, .3) 1px, transparent 1px), -moz-linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px), -moz-linear-gradient(0, rgba(255, 255, 255, .1) 1px, transparent 1px |
View jobsQueue.js
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
function jobsQueue(jobs) { | |
if (jobs && jobs instanceof Array && jobs.length > 0) { | |
var count = jobs.length; | |
var i = -1; | |
var next = function() { | |
if (++i < count) jobs[i](next); | |
} | |
next(); | |
} | |
} |
View wifi_rssi_windows.js
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 spawn = require('child_process').spawn; | |
wifiNetworksRSSI(function(err, data, raw) { | |
if (!err) { | |
console.log(data); // formatted data with SSID, BSSID, RSSI | |
// console.log(raw); // raw output from netsh | |
} else { | |
console.log(err); | |
} | |
}); |
View collection.js
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
'use strict'; | |
var Collection = this.Collection = exports.Collection = function Collection(key) { | |
this.list = [ ]; | |
this.length = 0; | |
this.key = key || null; | |
this.map = { }; | |
} |
View class.js
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
// base class | |
function Class() { } | |
// base class name | |
Class.prototype.className = 'Class'; | |
// lists all parent classes and outputs JSON with it | |
Class.prototype.toString = function() { | |
var str = ''; | |
var next = this.__proto__; |
View vec2.js
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
// degree to radians constant | |
var rd = Math.PI / 180.0; | |
// 2d vector [x, y] library | |
var Vec2 = { | |
cacheSize: 64, | |
cache: [ ], | |
clear: function() { | |
this.cache = [ ]; | |
}, |
View map-style.json
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
[ | |
{ | |
"elementType": "geometry.fill", | |
"stylers": [ | |
{ "visibility": "on" }, | |
{ "color": "#324447" } | |
] | |
}, { | |
"elementType": "geometry.stroke", | |
"stylers": [ |
View pc.angle.js
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
pc.Angle = function(degrees) { | |
this._theta = (degrees * pc.Angle.RA) || 0; | |
this._normalize(); | |
}; | |
// constant to convert between radians and degrees | |
pc.Angle.RA = 180 / Math.PI; | |
pc.Angle.prototype = { | |
copy: function(angle) { |