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 _ = require('underscore'); | |
| var x2js = require('xml2js'); | |
| function traverseJson(path, node){ | |
| function getElement(n, p){ | |
| var t = n[p]; | |
| if(_.isUndefined(t)){ | |
| return n['$'][p]; | |
| } | |
| return _.isArray(t) ? t[0] : t; |
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
| test |
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 httpProxy = require('http-proxy'); | |
| var proxy = httpProxy.createProxyServer(); | |
| http.createServer(function(req, res){ | |
| if(/^\/api/.test(req.url)){ | |
| req.url = req.url.replace(/^\/api/, ""); | |
| proxy.web(req, res, {target:'http://localhost:7889'}); | |
| } else { |
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 maybe = function(item) { | |
| var __internal = item; | |
| this.result = function(accessor, __default) { | |
| if (!__internal) { | |
| return new type(accessor).is_func() ? __default : accessor; | |
| } | |
| return new type(accessor).is_func() ? accessor(__internal) : __internal; | |
| }; | |
| this.select = function(accessor) { |
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 termDictionay = {"first":'text goes here'}; | |
| var localization = (function(terms) { | |
| var _terms = terms; | |
| var retVal = { | |
| stampValues : function (template, replacements) { | |
| /// <summary>Replaes tokens in a template string</summary> | |
| /// <param name="template">string that is to have values replaced in</param> |
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
| window.name = 'windo'; | |
| function Taco(name) { | |
| this.name = name; | |
| var nameCool = name + ' cool'; | |
| function PrintNameThis() { | |
| console.log(this.name); | |
| } | |
| this.showTheWindowScope = 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
| <html> | |
| <body> | |
| <div id="con"></div> | |
| </body> | |
| </html> |
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
| /** | |
| * User: ehouston | |
| */ | |
| var _ = require('underscore'); | |
| var localSub = function (text, data) { | |
| // TODO: Implement more efficient replace. | |
| // Loop through all keys and replace the data. | |
| var result = text; |