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
var Hapi = require("hapi"); | |
var Joi = require("joi"); | |
var server = new Hapi.Server(8080, "localhost", { | |
cache: { | |
engine: "catbox-redis", | |
options: { | |
host: "localhost", | |
port: 8080, |
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
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() |
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
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 |
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
var test = { | |
filters: { | |
filterOne: [ | |
{}, | |
{}, | |
], | |
filterTwo: [...] | |
} | |
}, | |
otherkey: "", |
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
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 |
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
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 |
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
## 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 |
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
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 |
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
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", |
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
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.'); | |
} |
OlderNewer