Skip to content

Instantly share code, notes, and snippets.

View mrkelly's full-sized avatar

Michael Kelly mrkelly

View GitHub Profile
@mrkelly
mrkelly / base.page.object.js
Created October 10, 2014 18:12
node lodash extend
'use strict';
var BasePageObject = function(arg1) {
this.arg1 = arg1;
};
BasePageObject.prototype.helloWorld = function() {
console.log('Hello, World!');
};
@mrkelly
mrkelly / base.page.object.js
Created October 10, 2014 18:07
Node util inherits
'use strict';
var BasePageObject = function(arg1) {
this.arg1 = arg1;
};
BasePageObject.prototype.helloWorld = function() {
console.log('Hello, World!');
};
@mrkelly
mrkelly / event.builder.js
Created August 6, 2014 19:44
Angular Logstash
angular.module('hf.events.builder', [
'app.resources',
'app.values'
])
.factory('EventBuilder', function ($injector, $window, apiUrl) {
var EventBuilder = function EventBuilder(message) {
this['@timestamp'] = new Date();
this['@message'] = message || '';
return this;
};
@mrkelly
mrkelly / gist:9401410
Created March 6, 2014 22:44
web-server.js with proxy. Use http-proxy version 0.10.2
#!/usr/bin/env node
var util = require('util'),
fs = require('fs'),
url = require('url'),
events = require('events'),
http = require('http'),
httpProxy = require('http-proxy'),
proxy = new httpProxy.RoutingProxy();