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
<!Doctype html> | |
<meta name="viewport" content="width=620" /> | |
<title>KnD-MApPA</title> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<article> | |
<p>Finding You...: <span id="status">Checking...</span> | |
</p> | |
</article> | |
<script> | |
var map = "", |
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
// programatic entry point for the server // | |
var router = require('./router.js'), | |
requestHandlers = require('./requestHandlers.js'), | |
webServer = require('./server.js'), | |
handle = {}; | |
// Unary referencing... each function maps -to- a specific request/params/method etc... // | |
handle['/'] = handle['/home'] = handle['/Home'] = handle['/index.html'] = handle['/Index.html'] = requestHandlers.startRoot; |
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
// caching script fetcher // | |
var futrs = {}; | |
var ajaxFetch = function( url, cBak ) { | |
if ( !futrs[ url ] ) { | |
futrs[ url ] = $.Deferred(function( defer ) { | |
$.getScript( url ) | |
.then( defer.resolve, defer.reject ); |
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
// GTRX geolocator | |
(function GTRX(window) { | |
var wndw = window, | |
var startG = function() { | |
if (wndw.navigator.geolocation) { | |
var trxLST = [], pID = "", cnt = 0, ipAddrs = ""; |
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
<html> | |
<head> | |
<title>Event Hub</title> | |
<script src="hub.js"></script> | |
<script> | |
var subscription = hub.subscribe('/go', function(params) { | |
console.log('one', params); | |
}); | |
var subscription2 = hub.subscribe('/go', function(params) { | |
console.log('two', params); |
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 http = require('http'); | |
var https = require('https'); | |
/** | |
* @name deviant.js | |
* @author Peter Lejeck <[email protected]> | |
* @description deviantJS, handles the process of logging in. | |
* @version 0.1 | |
*/ |
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() { | |
var f = []; | |
$.ajax({ | |
url: "imgz.js", | |
type: "GET", | |
contentType: "json", | |
cache: true, | |
success: function(data) { | |
var j = JSON.parse(data); | |
var $c = $("#container"); |
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
//store the URL | |
var url = "http://vimeo.com/71673549"; | |
//extract the ID | |
var rgx = /\/\/(www\.)?vimeo.com\/(\d+)($|\/)/; | |
//the ID: 71673549 | |
var id = url.match(rgx); | |
var width = '640'; |
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
// How to get client ip address with jQuery | |
$.getJSON("http://jsonip.appspot.com?callback=?",function(data){ | |
alert( "Your ip: " + data.ip); | |
}); | |
// How to parse XML with jQuery | |
// file.xml: |