The framework for turning ideas into webapps
- Manages client and server side.
- Things like Rails manage server side issues.
- Things like Ember & Angular provide front-end structure.
- Meteor helps out with both.
db.currentOp().inprog.forEach( | |
function(op) { | |
if(op.secs_running > 5) printjson(op); | |
} | |
) |
environment = process.env.NODE_ENV || "development"; | |
var settings = { | |
development: { | |
public: {}, | |
private: {} | |
}, | |
staging: { | |
public: {}, | |
private: {} |
// I wanted to know the top five largest collections in my MongoDB database in | |
// terms of document count. This MongoDB-specific JavaScript gets the job done. | |
// | |
// Edit variables in the config section, then execute like so: | |
// | |
// mongo --quiet topCollections.js | |
// config | |
var dbname = 'FIXME'; |
var collectionNames = db.getCollectionNames(), stats = []; | |
collectionNames.forEach(function (n) { stats.push(db[n].stats()); }); | |
stats = stats.sort(function(a, b) { return b['size'] - a['size']; }); | |
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); } |
# SSH tunnel script | |
# | |
# Set the following environment variables: | |
# | |
# SSH_TUNNEL_TARGET=user@hostname:port | |
# SSH_TUNNEL_KEY=RSA:{base64 private key} | |
# SSH_TUNNEL_FORWARDS=localaddr:localport:remoteaddr:remoteport,[...] | |
# | |
# Notes: | |
# |
db.currentOp( | |
{ | |
$or: [ | |
{ op: "query", "query.createIndexes": { $exists: true } }, | |
{ op: "insert", ns: /\.system\.indexes\b/ } | |
] | |
} | |
) |
/** | |
* Typewriter.js 0.0.1 | |
* @author Kyle Foster (@hkfoster) | |
* @license MIT (http://www.opensource.org/licenses/mit-license.php/) | |
*/ | |
var typewriter = ( function() { | |
var headline = document.querySelector( '.typewriter' ); |
development: | |
# Configure available database clients. (required) | |
clients: | |
# Defines the default client. (required) | |
default: | |
# Defines the name of the default database that Mongoid can connect to. | |
# (required). | |
database: my_db | |
# Provides the hosts the default client can connect to. Must be an array | |
# of host:port pairs. (required) |
JSON.pretty_generate(JSON.parse(obj.to_json)) |