Command Line Basics
Find the full path of the folder you're in
pwd
Find your username on your machine
var five = require("johnny-five"); | |
var Spark = require("spark-io"); | |
var board = new five.Board({ | |
io: new Spark({ | |
token: "a81cf99a8c1fe45b74d749d521a32671eb443d5e", | |
deviceId: "53ff6f065067544840551187" | |
}) | |
}); |
Greetings couchdb pals, | |
__ | |
.'` `'. | |
/ \ _ | |
; __.'` `'. | |
| .'` `'. \ | |
; /Fauxton \ ; | |
\; UI ; | | |
| Redesign | ; _ | |
; is live ;-./-_-` '-. |
You might be used to thinking of a model like a prototype. | |
You know a Person in your DB will have the following attributes: Name, Age, Phone | |
in backbone you'd make a model for person like this | |
Person = Backbone.Model.extend({ | |
defaults: { | |
name:"Billy", | |
age:"33", | |
phone:"555-555-5555" |
[ | |
{ | |
"temporary": "FALSE", | |
"name": "Fan Pier", | |
"installed": "TRUE", | |
"terminalName": "A32000", | |
"lat": "42.353412", | |
"locked": "FALSE", | |
"lng": "-71.044624", | |
"id": "7" |
[[1,1,null],[1,2,null],[1,3,null],[1,4,null],[1,5,null],[1,6,null],[1,7,null],[1,8,null],[1,9,null],[1,10,null],[1,11,null],[2,1,null],[2,2,null],[2,3,null],[2,4,null],[2,5,null],[2,6,null],[2,7,null],[2,8,null],[2,9,null],[2,10,null],[2,11,null],[3,1,1.99],[3,2,2.32],[3,3,2.63],[3,4,2.79],[3,5,3.1],[3,6,3.28],[3,7,3.64],[3,8,3.94],[3,9,4.23],[3,10,4.84],[3,11,null],[4,1,2.05],[4,2,2.33],[4,3,2.63],[4,4,2.82],[4,5,3.2],[4,6,3.38],[4,7,3.72],[4,8,4.02],[4,9,4.29],[4,10,4.91],[4,11,null],[5,1,2.04],[5,2,2.33],[5,3,2.63],[5,4,2.83],[5,5,3.22],[5,6,3.39],[5,7,3.73],[5,8,4.02],[5,9,4.29],[5,10,4.88],[5,11,null],[6,1,2.04],[6,2,2.31],[6,3,2.63],[6,4,2.82],[6,5,3.18],[6,6,3.36],[6,7,3.71],[6,8,4.01],[6,9,4.29],[6,10,4.88],[6,11,null],[7,1,2.05],[7,2,2.34],[7,3,2.65],[7,4,2.84],[7,5,3.21],[7,6,3.41],[7,7,3.74],[7,8,4.03],[7,9,4.29],[7,10,4.87],[7,11,null],[8,1,2.07],[8,2,2.36],[8,3,2.67],[8,4,2.86],[8,5,3.23],[8,6,3.41],[8,7,3.75],[8,8,4.03],[8,9,4.29],[8,10,4.86],[8,11,null],[9,1,2.03],[9,2,2.34],[9,3,2.67],[9,4,2.8 |
[ | |
{ | |
"Date": "1/3/2005", | |
"1 Mo": "1.99", | |
"3 Mo": "2.32", | |
"6 Mo": "2.63", | |
"1 Yr": "2.79", | |
"2 Yr": "3.1", | |
"3 Yr": "3.28", | |
"5 Yr": "3.64", |
//---------------------------------------------------------------------------- | |
// createAGrid | |
// | |
// opts | |
// { | |
// height: width, | |
// width: depth, | |
// linesHeight: b, | |
// linesWidth: c, | |
// color: 0xcccccc |
function makeTextSprite( message, parameters ) | |
{ | |
if ( parameters === undefined ) parameters = {}; | |
var fontface = parameters.hasOwnProperty("fontface") ? | |
parameters["fontface"] : "Helvetica"; | |
var fontsize = parameters.hasOwnProperty("fontsize") ? | |
parameters["fontsize"] : 70; | |
[ | |
1, | |
1, | |
1.99 | |
], | |
[ | |
1, | |
2, | |
2.32 | |
], |