What are we trying to observe? Raw object data.
// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];
What are we trying to observe? Raw object data.
// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];
http://weblog.bocoup.com/javascript-object-observe/ | |
http://wiki.ecmascript.org/doku.php?id=harmony:observe | |
http://addyosmani.com/blog/the-future-of-data-binding-is-object-observe/ | |
https://gist.github.com/addyosmani/6951740 | |
https://github.com/samdutton/simpl/tree/master/observe | |
http://www.lucaongaro.eu/blog/2012/12/02/easy-two-way-data-binding-in-javascript/ |
NPM Run | |
NPM built-in task runner | |
Links: | |
http://substack.net/task_automation_with_npm_run/ | |
GRUNT | |
Created by Ben Alman | |
Links: |
app.all('*', function (req, res, next) { | |
res.header("Access-Control-Allow-Origin", req.headers.origin); | |
res.header("Access-Control-Allow-Credentials", true); | |
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); | |
res.header("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Authorization, Content-Length"); | |
if (req.method == 'OPTIONS') { | |
return res.send(200); | |
} |
var Promise = require('bluebird'), | |
User = require('./user'), | |
knex, query; | |
knex = User.prototype._builder(User.prototype.tableName); | |
query = function (q) { | |
q.distinct() | |
.innerJoin('orders', function () { | |
this.on('users.id', '=', 'orders.user_id') |
var sequence = require('when/sequence'); | |
// requires you to save your model in a seperate file | |
var PostModel = require('./models/post'); | |
var posts = [ | |
{title: 'Title 1', html: '<p>Lorem ipsum dolor sit amet, graeco efficiendi ne nec, no cibo possit vix</p>'}, | |
{title: 'Title 2', html: '<p>Lorem ipsum dolor sit amet, graeco efficiendi ne nec, no cibo possit vix</p>'}, | |
{title: 'Title 3', html: '<p>Lorem ipsum dolor sit amet, graeco efficiendi ne nec, no cibo possit vix</p>'}, |
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
#!/usr/bin/env node | |
var util = require('util'), | |
fs = require('fs'), | |
path = require('path'), | |
http = require('http'), | |
_ = require('lodash'), | |
url = require('url'); | |
var DEBUG = false, |
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
Verifying I am +qawemlilo on my passcard. https://onename.com/qawemlilo |