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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Backbone Memory Management</title> | |
<link href="style.css"> | |
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div id="app" class="container"> | |
<h1>Zombie Destroyer 3000</h1> |
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 express = require('express') | |
, routes = require('./routes') | |
, home = require('./routes/home') | |
, user = require('./routes/user') | |
, http = require('http') | |
, mongodb = require('mongodb') | |
, mongoose = require('mongoose') | |
, path = require('path') | |
, passport = require('passport') | |
, LocalStrategy = require('passport-local').Strategy |
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
doctype 5 | |
html | |
head | |
meta(name='viewport', content='width=device-width, initial-scale=1') | |
title= title | |
link(rel='stylesheet', href='/css/bootstrap.css') | |
link(rel='stylesheet', href='/css/index.css') | |
body | |
block content | |
.container |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
<style type="text/css"> | |
.container { | |
margin-top: 50px; | |
} | |
</style> |
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 db = $.couch.db('https://username:[email protected]/crud'); | |
var doc = {"_id":"foo", "name": "bar"}; | |
db.saveDoc(doc, { | |
success: function(response, textStatus, jqXHR){ | |
console.log(response); | |
}, | |
error: function(jqXHR, textStatus, errorThrown){ | |
console.log(errorThrown); |
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
// Parse the json from the text area | |
var doc = $.parseJSON($('#newdoc').val()); | |
// "connect" to the database | |
var db = $.couch.db(user_db); | |
// insert the doc into the db | |
db.saveDoc(doc, { | |
success: function(response, textStatus, jqXHR){ | |
// do something if the save works | |
}, | |
error: function(jqXHR, textStatus, errorThrown){ |
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 App = Ember.Application.create(); | |
App.ApplicationView = Ember.View.extend({ | |
templateName: 'application' | |
}); | |
App.AllContributorsView = Ember.View.extend({ | |
templateName: 'contributors' | |
}); |
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
prompt: Is this ok?: (yes) y | |
info: Creating snapshot 0.1.1-6 | |
info Uploading: [=============================] 100% | |
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error | |
error: npm http GET https://registry.npmjs.org/express | |
npm http GET https://registry.npmjs.org/socket.io | |
npm http GET https://registry.npmjs.org/jade | |
npm http GET https://registry.npmjs.org/connect-flash | |
npm http GET https://registry.npmjs.org/connect-redis/1.4.5 |
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
error Wed, 19 Jun 2013 05:13:30 GMT | |
events.js:71 | |
throw arguments[1]; // Unhandled 'error' event | |
^ | |
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED | |
at RedisClient.on_error (/opt/haibu/apps/ahendy/Witness/package/node_modules/socket.io/node_modules/redis/index.js:149:24) | |
at Socket. (/opt/haibu/apps/ahendy/Witness/package/node_modules/socket.io/node_modules/redis/index.js:83:14) | |
at Socket.EventEmitter.emit (events.js:96:17) | |
at Socket._destroy.self.errorEmitted (net.js:329:14) | |
at process.startup.processNextTick.process._tickCallback (node.js:244:9) |
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
> [email protected] start /Users/andrew/witness | |
> app.js | |
sh: app.js: command not found | |
npm ERR! [email protected] start: `app.js` | |
npm ERR! `sh "-c" "app.js"` failed with 127 | |
npm ERR! | |
npm ERR! Failed at the [email protected] start script. | |
npm ERR! This is most likely a problem with the Witness package, | |
npm ERR! not with npm itself. |
OlderNewer