This file contains hidden or 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 StringReference = function(scope, str) { | |
if(str===void 0) { str = scope; scope = window; }; | |
Object.defineProperty(scope, "__"+str, { | |
configurable: true, | |
enumerable: false, | |
get: function(){ | |
return scope[str]; | |
}, | |
set: function(val){ |
This file contains hidden or 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($,window,document,undefined) { | |
var PluginConfig = { | |
"name": "PluginName", | |
"defaults": { | |
"propertyName": "value" | |
} | |
}; | |
var Plugin = function(element, options) { | |
this.settings = $.extend( {}, this._defaults, options ); |
This file contains hidden or 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
/** | |
* @class ExecutableArray | |
* @extends Array.prototype | |
* @param {Array} arr Original Array (if any) | |
* @author Joseph Dalrymple <[email protected]> | |
* @description Implements `call` and `apply` on an Array-like object | |
*/ | |
var ExtNodeList = (function(){ | |
/** | |
* Constructor Function |
This file contains hidden or 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
div.carousel-container { | |
} | |
div.carousel-container > * { | |
display: inline-block; | |
vertical-align: middle; | |
} | |
div.carousel-container > button { | |
color: transparent; | |
border: 0px; |
This file contains hidden or 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 Chat = React.createClass({ | |
getInitialState: function() { | |
return { messages: {} }; | |
}, | |
getLatestMessages: function() { | |
if(this.getAjaxReq) this.getAjaxReq.abort(); | |
this.getAjaxReq = new XMLHttpRequest(); | |
this.getAjaxReq.onreadystatechange = function(){ |
This file contains hidden or 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
module.exports = [ | |
[ 'sterm.bluelogicteam.com', 8881 ], | |
[ /^(www\.)?bluelogicteam.com$/, 8882 ], | |
[ /^(www\.)?toggleswitch.tv$/, 8883 ] | |
]; |
This file contains hidden or 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 os = require('os'); | |
var fs = require('fs'); | |
global.Terminal.emit('echo', "Included OS, FS"); | |
global.Terminal.registerCommand('cat', function (parts, raw, terminal) { | |
terminal.emit('echo', fs.readFileSync(parts[1]) + os.EOL); | |
terminal.emit('commandExit'); | |
}); | |
global.Terminal.emit('echo', "Attempted to register command `cat`"); |
This file contains hidden or 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 Matrix; Matrix = (function(){ | |
var Constructor = function(inp) { | |
if(typeof inp !== "object" || !inp.length) { | |
throw new TypeError("Matrix required"); | |
} | |
this.matrix = inp; | |
this.length = { | |
y: this.matrix.length, |
This file contains hidden or 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 Matrix; Matrix = (function(){ | |
var Constructor = function(inp) { | |
this.length = Matrix.getMatrixDims(inp); | |
if(!this.length) { | |
throw new Error("Invalid matrix"); | |
} | |
this.matrix = inp; | |
}; |
This file contains hidden or 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
// The only thing HSHG expects a collidable object to have is a getAABB() method that | |
// returns an object with two properties, min and max, that should both have a single | |
// array with two numbers as coordinates. For example, an object at 10, 10 and | |
// height/width of 100 would return { min: [10, 10], max: [110, 110] } | |
function Vertex(args /*x, y, radius*/){ | |
var argProp; | |
for(argProp in args){ | |
if(args.hasOwnProperty(argProp)){ |
OlderNewer