Skip to content

Instantly share code, notes, and snippets.

@strikeout
strikeout / cluster_observeChanges.js
Created January 9, 2014 16:50
please help me with my flawed logic on how to observeChanges in a clustered multi-server environment (with oplog-scaling).
// 200k entries and more
HugeCollection = new Meteor.Collection("HugeCollection");
// convenience collection to hold the computed stats of HugeCollection
StatsForHugeCollection = new Meteor.Collection("StatsForHugeCollection");
/**
* Observer
*/
@strikeout
strikeout / header.js
Created November 13, 2013 11:28
Attach Meteor HTTP Headers
/**
* HTTP Header Security
*
* enforce HTTP Strict Transport Security (HSTS) to prevent ManInTheMiddle-attacks
* on supported browsers (all, but IE)
* > http://www.html5rocks.com/en/tutorials/security/transport-layer-security
*
* @header Strict-Transport-Security: max-age=2592000; includeSubDomains
*/
@strikeout
strikeout / gist:5979392
Created July 11, 2013 21:24
WORKING server.js for openshift deployment of meteor app
////////// Requires //////////
var Fiber = require("fibers");
var fs = require("fs");
var http = require("http");
var path = require("path");
var url = require("url");
// connect (and some other NPM modules) use $NODE_ENV to make some decisions;