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 (exports) { | |
var shortCodeRegex = /\{\{\s*(.+?)\}\}/g, | |
hasWhitespaceRegex = /\s+/; | |
/** | |
* @param {string} input - Parsed string | |
* @param {object} [context] - context object defining shortcodes | |
* @param {object} [callContext] - call context for any functions called within any shortcode replacement | |
* | |
* Supported Inputs: |
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
'use strict'; | |
function ListBucket(size) { | |
this.array = []; | |
this.position = 0; | |
this.size = size; | |
this.length = 0; | |
} | |
ListBucket.prototype.toArray = 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
var timer; | |
timer = setTimeout(function () {console.log('first timer'); timeoutRun()}, 1000); | |
timer = setTimeout(function () {console.log('second timer'); timeoutRun()}, 1000); | |
clearTimeout(timer); | |
function timeoutRun() { | |
console.log('Timed out!'); | |
} |
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
// home value activation | |
(function () { | |
try { | |
var data = getApp().listing.data; | |
if (data.isHomeValue == true) { | |
activate(); | |
} | |
} catch (e) { |
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 GovernorAgent = require('governor-agent'), | |
agent = new GovernorAgent({some: 'connection settings to governor'}); | |
agent.consume('jobname', {some: 'options'}, function (job) { | |
// do work | |
return APromise(); | |
}); |
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
λ tmp $ ls -al node_modules | |
ls: node_modules: No such file or directory | |
λ tmp $ npm install [email protected] | |
[email protected] node_modules/hapi | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] | |
├── [email protected] |
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 Hapi = require('hapi'); | |
var server = new Hapi.Server(3000); | |
var fs = require('fs'); | |
server.route({ | |
method: 'GET', | |
path: '/', | |
handler: function (request, reply) { | |
var stream = fs.createReadStream('./test.js'); |
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
<VirtualHost *:80> | |
DocumentRoot c:\wamp\www\Portal\HomesCom | |
ServerName ebbersj.homes.com | |
Include C:\wamp\www\Portal\serverConfig\rewrites\portal.conf | |
setEnv ENVIRONMENT_LEVEL development | |
setEnv DEVELOPER ebbersj | |
</VirtualHost> |
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
#!/bin/bash | |
# call as if calling "git remote" | |
# | |
# ./gitRemote.sh add someuser [email protected]:someuser/repo.git | |
# ./gitRemote.sh remove someuser | |
ACTION=${@} | |
USERNAME=myuser |
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 bind (scope, func) { | |
return function () { | |
func.apply(scope, arguments); | |
}; | |
} | |
function A() { | |
this.console.log('hello A, I\'m logging my output via my this because it is bound to the global context'); | |
} |