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
<script type="text/javascript"> | |
$('document').ready(function(){ | |
$('#form').validate({ | |
rules:{ | |
"contact_name":{ | |
required:true, | |
maxlength:40 | |
}, | |
"contact_email":{ |
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 xRequest1; | |
if (window.XMLHttpRequest) | |
{ | |
xRequest1 = new XMLHttpRequest(); | |
} else { | |
xRequest1 = new ActiveXObject("Microsoft.XMLHTTP"); | |
} | |
//Send the proper header information along with the request |
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
db.getCollectionNames().forEach(function(c) { | |
if(!c.match("^system.indexes")) { | |
db.getCollection(c).remove({}); | |
} | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
// campaigns: this.store.findAll('campaigns'), | |
model: function(){ | |
return Ember.RSVP.hash({ | |
campaigns: this.store.findAll('campaigns'), | |
leads: this.store.findAll('leads') | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
lastThreadsPage: false, | |
limit: 25, | |
offset: 0, | |
model: function(){ | |
var self = this; | |
return Ember.RSVP.hash({ |
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
ember new fuse-parakhi | |
cd fuse-parakhi | |
ember g http-mock project |
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
ember serve --port 8080 --live-reload-port 35735 |
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 mongoose = require('mongoose'); | |
//setup the url for the connection | |
mongoose.connect('mongodb://localhost/list'); | |
//create a connection | |
var db = mongoose.connection; | |
//if there is an error when logging in , print it | |
db.on('error', function(err){ | |
console.log(err); |
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 mongoose = require('mongoose'); | |
//setup the url for the connection | |
mongoose.connect('mongodb://localhost/list'); | |
//create a connection | |
var db = mongoose.connection; | |
//if there is an error when logging in , print it | |
db.on('error', function(err){ | |
console.log(err); |
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
{ | |
"name": "application-name" | |
, "version": "0.0.1" | |
, "private": true | |
, "dependencies": { | |
"express": "2.5.8" | |
, "jade": ">= 0.0.1" | |
,"mongodb": "*" | |
,"mongoose": "*" | |
} |
OlderNewer