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
'use strict'; | |
var request = require('request'); | |
var fs = require('fs'); | |
var jade = require('jade'); | |
exports.sendWelcome = function(data, fn){ | |
send({from:'[email protected]', to:data.to, subject:'Welcome to AirBnB', template:'welcome'}, fn); | |
}; |
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
function initMap(lat, lng, zoom){ | |
var mapOptions = {center: new google.maps.LatLng(lat, lng), zoom: zoom, mapTypeId: google.maps.MapTypeId.ROADMAP}; | |
map = new google.maps.Map(document.getElementById('map'), mapOptions); | |
} | |
function addMarker(location){ | |
var position = new google.maps.LatLng(location.lat, location.lng); | |
var marker = new google.maps.Marker({map:map, position:position, title:location.address}); | |
markers.push(marker); | |
} |
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
exports.db = function(fn){ | |
MongoClient.connect(mongoUrl, function(err, db) { | |
if(err){throw err;} | |
global.nss = {}; | |
global.nss.db = db; | |
global.nss.db.collection('listings').ensureIndex({'coordinates':'2dsphere'}, function(err, indexName){ | |
console.log('Connected to MongoDB'); | |
fn(); | |
}); | |
}); |
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
install java | |
sudo npm install -g protractor | |
sudo webdriver-manager update | |
touch root/test/protractor.conf.js | |
exports.config = { | |
specs: [ | |
'./e2e/**/*.spec.js' | |
], | |
baseUrl: 'http://localhost:4000' |
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
txtblk='\[\e[0;30m\]' # Black | |
txtred='\[\e[0;31m\]' # Red | |
txtgrn='\[\e[0;32m\]' # Green | |
txtylw='\[\e[0;33m\]' # Yellow | |
txtblu='\[\e[0;34m\]' # Blue | |
txtpur='\[\e[0;35m\]' # Purple | |
txtcyn='\[\e[0;36m\]' # Cyan | |
txtwht='\[\e[0;37m\]' # White | |
txtrst='\[\e[0m\]' # Text Reset |
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
https://drive.google.com/#folders/0B4iPWDqbzCMARlQtQWFNUXc5TTA |
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
'use strict'; | |
module.exports = function(grunt){ | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
// ---------------------------------------------------------------------- // | |
watch: { | |
code: { | |
files: ['app/js/es6/**/*.js', 'app/js/es5/**/*.js', 'Gruntfile.js'], | |
tasks: ['jshint:all', 'copy:es6', 'copy:es5', 'traceur'] |
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": "client-template", | |
"version": "0.0.1", | |
"private": true, | |
"scripts":{ | |
"start": "node app.js;", | |
"traceur": "git clone https://github.com/google/traceur-compiler tools/traceur-compiler;cd tools/traceur-compiler;npm install;cp bin/traceur.js ../../app/js/vendor;", | |
"nss": "atom;npm install;npm run traceur;grunt build;PORT=3000 node app.js;" | |
}, | |
"dependencies":{ |
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
Show hidden characters
{ | |
"camelcase": true, | |
"curly": true, | |
"eqeqeq": true, | |
"immed": true, | |
"indent": 2, | |
"latedef": "nofunc", | |
"newcap": true, | |
"noarg": true, | |
"noempty": true, |
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
.DS_Store | |
node_modules/ | |
public/ | |
tools/traceur-compiler/ | |
traceur.js |