Skip to content

Instantly share code, notes, and snippets.

View maxnathaniel's full-sized avatar

Max Ho maxnathaniel

View GitHub Profile
<!-- list of draft survey questions -->
<div class="questionList" ng-repeat="question in draftQuestionBank | orderBy: 'order'">
<div ng-if="question.type === 'textField'" class="survey-class">
<text-field title="question.question" survey-title="question.mainTitle" draft-index="question.order" edit-state="true"></text-field>
</div>
<div ng-if="question.type === 'textArea'">
<text-area-field title="question.question" survey-title="question.mainTitle" index="{{ $index + 1 }}"></text-area-field>
</div>
<div ng-if="question.type === 'multipleChoice'">
<mcq title="question.question" survey-title="question.mainTitle" index="{{ $index + 1 }}"></mcq>
/*global TodoMVC: true, Backbone */
var TodoMVC = TodoMVC || {};
(function () {
'use strict';
var searchChannel = Backbone.Radio.channel('search');
// Todo List Item View
@maxnathaniel
maxnathaniel / User.js
Created October 14, 2015 15:52
User Model
var bcrypt = require('bcrypt-nodejs');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('users', {
username: {
type: DataTypes.STRING,
unqiue: true
},
password: DataTypes.STRING,
role: DataTypes.STRING
@maxnathaniel
maxnathaniel / app.js
Created October 14, 2015 15:51
My first node app
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var bodyParser = require('body-parser');
var lusca = require('lusca');
var flash = require('express-flash');
var methodOverride = require('method-override');