- insert
- remove
- rename
- save
- update
- distinct
- count
- drop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>video - wall</title> | |
<style> | |
body { | |
padding: 0; | |
margin: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var padding = { | |
'128': pad(128), | |
'512': pad(512) | |
}; | |
collection.insert({ | |
aliases: [ padding['128'] ], | |
profile: { 'noop': padding['512'] }, | |
}, function(err, doc){ | |
var query = { _id: doc._id }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
express.logger.format('verbose', '' | |
+ ':date - ' | |
+ ':remote-addr - ' | |
+ ':user-agent -- ' | |
+ ':method - ' | |
+ ':url - ' | |
+ ':status -- ' | |
+ ':req[dnt] - ' | |
+ ':req[x-do-not-track] - ' | |
+ ':req[x-forwarded-for] - ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('assert') | |
, result; | |
function toArgs(val){ | |
if (Array.isArray(val[0])) return val[0]; | |
var len = val.length; | |
var ret = new Array(len); | |
for (var i = 0; i < len; ++i) { | |
ret[i] = val[i]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose') | |
, revision = require('..') | |
, Schema = mongoose.Schema; | |
mongoose.connect('localhost', 'sandbox'); | |
var schema = new Schema({ | |
title: String, | |
content: String | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://amix.dk/blog/post/19714#bitmapist-Powerful-realtime-analytics-with-Redis-2-6s-bitmaps-and | |
var bitcrunch = require('bitcrunch') | |
, client = bitcrunch.connect(); | |
// mark user 123 as active and has played a song: | |
client.mark('active', 123, fn); | |
client.mark('song:played', 123, fn); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var constraint = require('constraint'); | |
var assert = require('assert'); | |
// create engine | |
var engine = constraint() | |
.contains('whatever', 'red') | |
.equals('some.thing.really.nested', 'works'); | |
// need a custom rule? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Deps. | |
*/ | |
var redis = require('redis') | |
, fs = require('fs') | |
, csv = require('csv') | |
, rc = redis.createClient(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"redis host": "localhost", | |
"redis port": 6379, | |
"fluent buffer": "/tmp/buffer" | |
} |