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
///////// VIEW ////////////////////////// | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>MY MVC</title> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="stylz.css" /> | |
<script src="signals.js"></script> |
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 worker() { | |
setInterval(function() { | |
postMessage({foo: "bar"}); | |
}, 1000); | |
} | |
var code = worker.toString(); | |
code = code.substring(code.indexOf("{")+1, code.lastIndexOf("}")); |
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
//scribbles.js | |
var fs = require('fs'), | |
pth = require('path'), | |
cueMngr = {}; | |
function Scribbles(fileNm) { | |
this.handle = fileNm; | |
this.canWrite = false; |
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
/** | |
* Usage: phantomjs scrape.js URL [selector] | |
* selector defaults to `#content` | |
*/ | |
var page = require('webpage').create(), | |
system = require('system'); | |
if (system.args.length < 2 || system.args.length > 3) { |
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
// kacher.js ... this uses my Signals.js event module as a dependency | |
var signalCaster = require("./signals").Signals, | |
fs = require('fs'), | |
url = require("url"), | |
path = require("path"), | |
config = { | |
cache: [], |
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
// SignalsV2.js | |
(function () { | |
'use strict'; | |
function Signals () {}; | |
var exports = this, |
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
// SignalsBest2.js 8;] | |
var Signals = (function() { | |
'use strict'; | |
var sigCache = {}, singleRtnVal = false, | |
received = function(eventName, func) { | |
return wen(eventName, function(evnt) { | |
return func(evnt); | |
}); |
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 () { | |
'use strict'; | |
function KNDmitter() { } | |
var proto = KNDmitter.prototype; | |
var exports = this; | |
var originalGlobalValue = exports.KNDmitter; | |
function indexOfListener(listeners, listener) { | |
var i = listeners.length; | |
while (i--) { |
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
define(['knockout', 'jquery'], function (ko, $) { | |
return function (wifiInfo, wifiNetworks, SSIDList) { | |
var slf = this, SKT = skt || io.connect(), WifiInfo = wifiInfo || {}, | |
wirelessCollection = ko.observableArray(wifiNetworks) || ko.observableArray([]), | |
ssidCollection = ko.observableArray(SSIDList) || ko.observableArray([]), Abstract = { | |
isConnected: false, | |
BrioSSID: ko.observable(), | |
BrioPassword: ko.observable(), | |
BrioSecurityType: ko.observable(999), |
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
// simple request with a fallback | |
function getXHR() { | |
if (window.XMLHttpRequest) { | |
return new XMLHttpRequest(); | |
} | |
try { | |
return new ActiveXObject('MSXML2.XMLHTTP.6.0'); | |
} |
NewerOlder