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
app.get('/plans/:plan_id', function (req, res) { | |
models.Plan.find({ | |
where: {id: req.param('plan_id')}, | |
include: [ | |
{ | |
model: models.Order, | |
as: "pending_orders" | |
}, | |
{ | |
model: models.Order, |
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
app.get('/plans/:plan_id', function (req, res) { | |
models.Plan.find({ | |
where: {id: req.param('plan_id')}, | |
include: [ | |
{ | |
as: "completed_orders", | |
model: models.Order, | |
where: {state: "completed"} | |
}, | |
{ |
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
[18670:1231/171313:INFO:CONSOLE(171)] ""SENSOR_0:0.15"", source: file:///tmp/.org.chromium.Chromium.gUnbNB/frameless_window.js (171) | |
[18670:1231/171313:INFO:CONSOLE(178)] ""SENSOR_1:106.77"", source: file:///tmp/.org.chromium.Chromium.gUnbNB/frameless_window.js (178) | |
[18670:1231/171313:INFO:CONSOLE(185)] ""SENSOR_2:2.47"", source: file:///tmp/.org.chromium.Chromium.gUnbNB/frameless_window.js (185) | |
[18670:1231/171313:INFO:CONSOLE(192)] ""SENSOR_3:1.45"", source: file:///tmp/.org.chromium.Chromium.gUnbNB/frameless_window.js (192) | |
[18670:1231/171318:INFO:CONSOLE(171)] ""SENSOR_0:1.07"", source: file:///tmp/.org.chromium.Chromium.gUnbNB/frameless_window.js (171) | |
[18670:1231/171318:INFO:CONSOLE(178)] ""SENSOR_1:106.74"", source: file:///tmp/.org.chromium.Chromium.gUnbNB/frameless_window.js (178) | |
[18670:1231/171318:INFO:CONSOLE(185)] ""SENSOR_2:2.18"", source: file:///tmp/.org.chromium.Chromium.gUnbNB/frameless_window.js (185) | |
[18670:1231/171318:INFO:CONSOLE(192)] ""SENSOR_3:-2.9"", source: file:///tmp/.org.chromiu |
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
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Booster Labs</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="/styles.css"/> | |
</head> | |
<body> |
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
Andres at and-mbp in ~/Projects/react-router-mega-demo on master | |
$ ./script/dev | |
Running node-supervisor with | |
program 'app.js' | |
--watch '.' | |
--extensions 'node,js' | |
--exec 'node' | |
Starting child process with 'node app.js' |
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 React = require('react'); | |
var CreatorBox = module.exports = React.createClass({ | |
render: function() { | |
return ( | |
<a href="#" className="btn btn-default" role="button">Button</a> | |
) | |
} | |
}) |
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
Spree::CheckoutController.class_eval do | |
def before_address | |
# If the user has a default address, a callback takes care of setting | |
# that; but if he doesn't, we need to build an empty one here. | |
# Regardless of checkout steps, build a shipping address | |
@order.bill_address ||= Spree::Address.build_default | |
@order.ship_address ||= Spree::Address.build_default | |
end |
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
// This is how it's called | |
<SubscriptionBuilder handleCartClick={this.props.handleCartClick} cart_workout={ this.state.cart_workout } cart_rest={ this.state.cart_rest }/> | |
. | |
. | |
. | |
var SubscriptionBuilder = React.createClass({ | |
render: function() { | |
var cart_items = function(product, index) { |
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 SupplementBox = React.createClass({ | |
render: function() { | |
var content; | |
if (this.props.selected_supplement == null || typeof this.props.selected_supplement.master === "undefined") { | |
content = function(){ | |
return( | |
<div></div> | |
) |
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 phidget = require('phidget'); | |
var bridge = new phidget.bridge(); | |
var scale = bridge.attach(function (err) { | |
console.log('\n0 ----------------\n'); | |
console.log(phidget.getValue(350222, function(data){ console.log(data) })); | |
console.log('\n1 ----------------\n'); | |
console.log(phidget.getValue(4, function(data){ console.log(data) })); | |
console.log('\n2 ----------------\n'); | |
console.log(phidget.getValue(-1, function(data){ console.log(data) })); | |
console.log('\n3 ----------------\n'); |