Skip to content

Instantly share code, notes, and snippets.

View RichardLitt's full-sized avatar

Richard Littauer RichardLitt

View GitHub Profile
var Hapi = require("hapi");
var Joi = require("joi");
var server = new Hapi.Server(8080, "localhost", {
cache: {
engine: "catbox-redis",
options: {
host: "localhost",
port: 8080,
park_features = {}
ParkFeature.where(park_id: @park.id).map{|ft| park_features[ft.feature_id] = Feature.where(id: ft.feature_id).select('id, title, icon')}
@features = park_features.values()
class ParkFeature < ActiveRecord::Base
self.table_name = 'parks_features'
belongs_to :park
belongs_to :feature
end
class Feature < ActiveRecord::Base
has_many :park_features
has_many :parks, through: :park_features
var test = {
filters: {
filterOne: [
{},
{},
],
filterTwo: [...]
}
},
otherkey: "",
var fs = require('fs');
var _ = require('underscore');
// Init
var sidebarOpen = false;
// TODO Enable Static Assets to go to other Views besides SideBar
function buildStaticAssets(modules){
// Init
var fs = require('fs');
var _ = require('underscore');
// Init
var sidebarOpen = false;
// TODO Enable Static Assets to go to other Views besides SideBar
function buildStaticAssets(modules){
// Init
## Places Model
Class Places
# I added through Houses, removed depdendent: :destroy (see comment)
has_many :campsites, dependent: :destroy
#has_many :days, dependent: :destroy
has_many :days, through: :houses
end
14:16 ~/src/beaglelabs/beagle $ npm ls
npm WARN unmet dependency /Users/richard/src/beaglelabs/beagle/node_modules/gulp-react requires react-tools@'^0.11.2' but will load
npm WARN unmet dependency /Users/richard/src/beaglelabs/beagle/node_modules/react-tools,
npm WARN unmet dependency which is version 0.12.1
npm WARN unmet dependency /Users/richard/src/beaglelabs/beagle/node_modules/browserify/node_modules/crypto-browserify/node_modules/sha.js requires buffer@'~2.3.2' but will load
npm WARN unmet dependency /Users/richard/src/beaglelabs/beagle/node_modules/browserify/node_modules/buffer,
npm WARN unmet dependency which is version 2.8.1
beagle@0.0.0 /Users/richard/src/beaglelabs/beagle
├─┬ beagle-altmetrics@0.0.2 -> /Users/richard/src/beaglelabs/beagle-altmetrics
│ ├─┬ accum-transform@1.0.2
14:18 ~/src/beaglelabs/beagle $ grep react node_modules/react*/package.json
node_modules/react-async/package.json: "name": "react-async",
node_modules/react-async/package.json: "react": "~0.11.0"
node_modules/react-async/package.json: "react": "~0.11.0",
node_modules/react-async/package.json: "url": "git://github.com/andreypopp/react-async"
node_modules/react-async/package.json: "react-component",
node_modules/react-async/package.json: "react"
node_modules/react-async/package.json: "url": "https://github.com/andreypopp/react-async/issues"
node_modules/react-async/package.json: "homepage": "https://github.com/andreypopp/react-async",
node_modules/react-async/package.json: "_id": "react-async@1.0.2",
var iterator = 10;
iLoop: for (var i = 0; i < iterator; i++) {
yLoop: for (var y = 0; y < iterator; y++ ) {
console.log('i and y:', i, y)
testing: if (y==5) {
console.log('This will break the outside loop!');
break iLoop;
console.log('This will never appear.');
}