This file contains 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
diff --git a/lib/uniform_notifier.rb b/lib/uniform_notifier.rb | |
index f362948..41e4022 100644 | |
--- a/lib/uniform_notifier.rb | |
+++ b/lib/uniform_notifier.rb | |
@@ -42,5 +42,13 @@ module UniformNotifier | |
def raise=(exception_class) | |
UniformNotifier::Raise.setup_connection(exception_class) | |
end | |
+ | |
+ def add_notifier(logger) |
This file contains 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 gulp = require('gulp') | |
var source = require('vinyl-source-stream') | |
var gutil = require('gulp-util') | |
var stylus = require('gulp-stylus') | |
var imagemin = require('gulp-imagemin') | |
var del = require('del') | |
var nib = require('nib') | |
var nodemon = require('gulp-nodemon') | |
var browserify = require('browserify') | |
var watchify = require('watchify') |
This file contains 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
app.get('/upload', checkAuth, function(req, res) { | |
res.render('upload'); | |
}); | |
app.post('/upload', checkAuth, function(req, res) { | |
console.log('Got Here'); | |
req.form.complete(function(err, fields, files) { | |
if (err) { | |
throw new Error('Upload failed'); |
This file contains 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
app.get('/upload', checkAuth, function(req, res) { | |
res.render('upload'); | |
}); | |
//Doesn't work (times out) if checkAuth is used as middleware, works fine without check auth | |
app.post('/upload', checkAuth, function(req, res, next) { | |
req.form.complete(function(err, fields, files){ | |
if (err) { | |
next(err); | |
} else { |
This file contains 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
App.Draw.findNode = function(e) { | |
var mousePos = new THREE.Vector3(0, 0, 1), | |
r, | |
matrix; | |
mousePos.x = (e.clientX / window.innerWidth) * 2 - 1; | |
mousePos.y = (e.clientY / window.innerHeight) * 2 + 1; | |
mousePos.z = 1; | |
r = new THREE.Ray(); |
This file contains 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'), | |
CONFIG = require('./config'), | |
Client = require('mysql').Client, | |
fs = require('fs'), | |
client = new Client(CONFIG), | |
TEST_DB = 'node_test', | |
TEST_TABLE = 'test', | |
count = 0; | |
client.connect(); |
This file contains 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
app.get('/jobs/:id', checkAuth, function(req, res, next) { | |
Job.findOne({ _id: req.params.id, user_id: req.session.user._id }, function(err, j) { | |
if (!j) return(new NotFound()); | |
res.render('jobs/show', { | |
locals: { | |
j: j, | |
user: req.session.user | |
} | |
}); |
This file contains 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
// with normalizing middleware | |
app.use(normalizeResponse) | |
app.get('/account', common, UserRead) | |
function UserRead(req, res, next) { | |
// do stuff and attach it onto the res object | |
// call next() when done | |
next() |
This file contains 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 app is full of fail | |
var express = require("express") | |
exports.createServer = function() { | |
var app = express.createServer() | |
app.get('/', function(req, res) { | |
process.exit(1) // obviously not going to get past this |
This file contains 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
request = require 'request' | |
_ = require 'underscore' | |
transformUrl = (host, url) -> | |
return host + url | |
onError = (err, req, res) -> | |
res.send "an error occurred", 500 | |
makeDefaults = (options) -> |