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
// Load configurations | |
var env = process.env.NODE_ENV || 'development' | |
, config = require('./config/config')[env]; | |
// Bootstrap db connection | |
mongoose.connect(config.db); | |
relations.use(relations.stores.redis, {client: redis.createClient(config.redis.port, config.redis.host)}); | |
// Setup App Version |
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 = { | |
development: { | |
root: require('path').normalize(__dirname + '/..'), | |
app: { | |
name: 'AppName Development', | |
nodefly: 'AppName Dev', | |
iosversion: "2.0.0", | |
androidversion: "0.6.0" | |
}, | |
db: 'mongodb://localhost/appdev', |
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
$('.bxslider').bxSlider({ | |
pagerCustom: '#bx-pager', | |
mode: 'horizontal', | |
startSlide: 0, | |
controls: 'false', | |
onSlideAfter: function($slideElement, oldIndex, newIndex) { | |
var newClass = $slideElement.attr('class'); | |
var oldClass = $('.bxslider li')[oldIndex].attr('class'); | |
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
$('.nav li a').click(function() { | |
// remove the extra classes before adding the current clicked class | |
$('.nav li a').each(function(i, el) { // iterate through all of the menu items | |
// get the current elements class | |
var removeClass = $(el).attr('class'); | |
// remove it from the body, if it has the class. | |
if($('body').hasClass(removeClass)) $('body').removeClass(removeClass); | |
}); |
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
<?php | |
/** | |
* Page Template | |
* | |
* … | |
* | |
* @package Thematic | |
* @subpackage Templates | |
*/ | |
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
$(window).resize(function() { | |
var w = $(window).width(); | |
if(w > 1024) { | |
fixDivsHeight(); | |
} else { | |
// do whatever mobile wants here... | |
} | |
}); | |
function fixDivsHeight() { |
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
exports.addCarPhoto = function(req, res) { | |
var userID = req.user._id; | |
var carsBaseURI = "http://sobrioapp.blob.core.windows.net/cars/"; | |
// setup photo meta data | |
var type = req.files.photo.type; | |
var filename = req.params.id + "-" + req.files.photo.name; | |
var path = req.files.photo.path; |
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
<section id="{{ID}}" class="parallax"> | |
<div class="container"> | |
<div class="col span_7"> | |
<h1>{{§ion_title}}</h1> | |
<p>{{paragraph}}</p> | |
<p class="more"><a href="{{link_to}}" class="button">{{button}}</a></p> | |
</div> | |
</div> | |
</section> |
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
<section id="efficiencyIncluded" class="parallax"> | |
<div class="container"> | |
<div class="col span_7"> | |
<h1>Efficiency <span>Included</span></h1> | |
<p>Advanced technology to connect healthcare providers and drive EFFICIENCY.</p> | |
<p class="more"><a href="#" class="button">Find Out More</a></p> | |
</div> | |
</div> | |
</section> |
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') | |
, Schema = mongoose.Schema | |
, crypto = require('crypto') | |
/** | |
* User Schema | |
*/ | |
var UserSchema = new Schema({ | |
createdAt: { type: Date, default: Date.now, required: true }, |