Go to the egghead website, i.e. Building a React.js App
run
$.each($('h4 a'), function(index, video){
console.log(video.href);
});
/* | |
Find all companies that people with lastname "Robertson" have founded | |
*/ | |
var mongoose = require('mongoose'); | |
var PersonSchema = new mongoose.Schema { | |
firstname: String, | |
lastname: String | |
}; | |
var Person = mongoose.model('Person', PersonSchema); |
/* fetch all users user_totaldocs and user_totalthings values and want to sum those variables.*/ | |
var userSchema = mongoose.Schema({ | |
local : { | |
... | |
... | |
user_id : String, | |
user_totaldocs : Number, | |
user_totalthings : Number | |
.... |
/////////////////////////////////////////////////////// | |
// $ node txt-to-json-parser.js [file_you_want_to_parse] | |
/////////////////////////////////////////////////////// | |
var fs = require('fs'); | |
var arr = [] | |
var file_name = process.argv[2]; | |
var stream = fs.createReadStream(file_name + '.txt', { flags: 'r+', encoding: 'utf-8' }); | |
var buf = ''; |
/////////////////////////////////////////////////////// | |
// $ node unique-json-parser.js [file_you_want_to_parse] | |
/////////////////////////////////////////////////////// | |
var fs = require('fs'); | |
var file_name = process.argv[2]; | |
var obj = {} | |
fs.readFile(file_name + '.json', { encoding: 'utf8' }, function(err, obj) { |
Nodejs for Queues: | |
================= | |
https://github.com/caolan/async | |
https://www.npmjs.com/package/queue | |
https://github.com/Automattic/kue | |
https://github.com/OptimalBits/bull | |
https://github.com/twitter-archive/kestrel | |
https://github.com/nullobject/bokeh | |
https://github.com/NodeRedis/node_redis |
Go to the egghead website, i.e. Building a React.js App
run
$.each($('h4 a'), function(index, video){
console.log(video.href);
});
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="[add your bin description]"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>RxJs Basic Example</title> | |
</head> | |
<body> | |
<button>Click me</button> |
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 David Gomez-Urquiza | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |