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
module.exports = "While you wait, how about some tasty bacon?\n\n"+ | |
" __ _.._ \n"+ | |
" .-'__`-._.'.--.'.__., \n"+ | |
" /--' '-._.' '-._./ \n"+ | |
" /__.--._.--._.'``-.__/ \n"+ | |
" '._.-'-._.-._.-''-..' \n"+ | |
"\n"; |
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
<h3>Beards grown this week: <span id='downloads' class='fa fa-circle-o-notch fa-spin'></span></h3> |
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'; | |
angular | |
.module('myApp', [ | |
'ngCookies', | |
'ngResource', | |
'ngSanitize', | |
'ngRoute' | |
]) | |
.config(function ($routeProvider) { |
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
//http://andrewdupont.net/2009/08/28/deep-extending-objects-in-javascript/ | |
Object.deepExtend = function(dst, src) { | |
for (var prop in src) { | |
if (src[prop] && src[prop].constructor && src[prop].constructor === Object) { | |
dst[prop] = dst[prop] || {}; | |
arguments.callee(dst[prop], src[prop]); | |
} else { | |
dst[prop] = src[prop]; | |
} | |
} |
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
// throws an error at the moment, need to fix it | |
var express = require('express'), | |
im = require('imagemagick-stream'), | |
request = require('request'), | |
httpProxy = require('http-proxy'), | |
fs = require('fs'); | |
var app = express(), | |
port = 8081; |
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
// File: client/scripts/controllers/main.js | |
// With this, you can use 'socket' very nicely (IMHO) | |
'use strict'; | |
angular.module('theApp') | |
.controller('MainCtrl', function ($scope, socket) { | |
$scope.now = 'loading...'; |
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 mongoose = require('mongoose'), | |
uuid = require('uuid'), | |
Schema = mongoose.Schema; | |
var ThingSchema = new Schema({ | |
_id: { type: String, default: function() { return uuid.v4(); } } | |
}, { | |
strict: false, | |
collection: 'things' | |
}); |
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 when = requrie('when'), | |
request = require('request'); | |
var getAll = when.all([ | |
promisedRequest({ url: 'http://google.com' }), | |
promisedRequest('http://yahoo.com'), | |
promisedRequest('https://foo.bar') | |
]); | |
function promisedRequest(options) { |
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
<span | |
class='fade' | |
ng-class='{ in: hover }' | |
ng-mouseenter='hover = true' | |
ng-mouseleave='hover = false'> | |
<button class='btn btn-default'> | |
<i class='fa fa-times'></i> | |
</button> | |
</span> |
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
// This could probably be accomplished with the basic http module, but I was lazy & leaned on Express | |
var request = require('request'), | |
express = require('express'); | |
var proxy = express(); | |
var apps = { | |
app1 : 'http://10.10.10.10:8000', | |
app2 : 'http://10.10.10.10:8001', | |
app3 : 'http://10.10.10.10:8002' |