A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| // Type definitions for Meteor 1.3 | |
| // Project: http://www.meteor.com/ | |
| // Definitions by: Dave Allen <https://github.com/fullflavedave> | |
| // Definitions: https://github.com/borisyankov/DefinitelyTyped | |
| /** | |
| * These are the common (for client and server) modules and interfaces that can't be automatically generated from the Meteor data.js file | |
| */ | |
| interface EJSONable { |
#MongoDB 3.2.x Replica Sets on AWS EC2 A MongoDB replica set provides a mechanism to allow for a reliable database services. The basic replica set consists of three servers, a primary, a secondary and an arbitrator. The primary and secondary both hold a copy of the data. The arbitrator is normally a low spec server which just monitors the other servers and help with the failover process. In production, there can be more than three servers.
To setup mongo as a replica set on Amazon Web Services EC2 you need to first setup a security group with ssh on port 22 and mongodb on port 27017. You then need to create three servers. Select Ubuntu 14.04 LTS x64 and a micro (or bigger depending on your database size, ideally you should have enough memory to match your database size) instance for the primary and secondary and a nano instance for the arbitrator.
##Adjust the File System on each Server The operating system by default will update the last access time on a file. In a high data throughput database application
| /* | |
| Add package: | |
| meteor add votercircle:winston | |
| Then use in server or client code as | |
| logger.[debug|info|warn|error] | |
| */ | |
| if(Meteor.isServer) { | |
| //- Ref: https://atmospherejs.com/votercircle/winston | |
| //- Setup Winston logging |
| import * as mongoose from 'mongoose'; | |
| export let Schema = mongoose.Schema; | |
| export let ObjectId = mongoose.Schema.Types.ObjectId; | |
| export let Mixed = mongoose.Schema.Types.Mixed; | |
| export interface IHeroModel extends mongoose.Document { | |
| name: string; | |
| power: string; |
Cheatsheet for LaTex, using Markdown for markup. I use this with atom.io
and 📦markdown-preview-plus to write math stuff. 📦keyboard-localization
is necessary when using an international layout (like [swiss] german).
Further Reference and source: ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf
| """ | |
| Progress bar for rsync | |
| ======================== | |
| Shows file progress and total progress as a progress bar. | |
| Usage | |
| --------- | |
| Run rsync with -P and pipe into this program. Example:: |
| let clickStream = Rx.Observable.fromEvent(document.getElementById('link'), 'click'); | |
| clickStream | |
| .buffer(clickStream.debounce(250)) | |
| .map(list => list.length) | |
| .filter(x => x === 2) | |
| .subscribe(() => { | |
| console.log('doubleclick'); | |
| }) |