(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /** | |
| * Locations.js | |
| * | |
| * @description :: TODO: You might write a short summary of how this model works and what it represents here. | |
| * @docs :: http://sailsjs.org/#!documentation/models | |
| */ | |
| module.exports = { | |
| seedData:[ |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| //<editor-fold desc="Node Requires, gulp, etc"> | |
| var gulp = require('gulp'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| clean = require('gulp-clean'), | |
| concat = require('gulp-concat'), | |
| csso = require('gulp-csso'), | |
| debug = require('gulp-debug'), | |
| footer = require('gulp-footer'), | |
| gutil = require('gulp-util'), | |
| gzip = require('gulp-gzip'), |
Work in progress, I'll write this up properly when I'm done.
Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.
Prerequisites:
| var mongoose = require("mongoose"); | |
| var Schema = mongoose.Schema; | |
| mongoose.connect("127.0.0.1", "mongoose_dbref", 27017); | |
| var PersonSchema = new Schema({ | |
| name : String | |
| , age : Number | |
| , stories : [{ type: Schema.ObjectId, ref: 'Story' }] | |
| }); | |
| var StorySchema = new Schema({ |
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 5) then: | |
| // ie === undefined | |
| // If you're in IE (>=5) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |