Skip to content

Instantly share code, notes, and snippets.

@mikerhodes
mikerhodes / gist:8436475
Created January 15, 2014 13:44 — forked from tomblench/gist:8436408
Put this in .git/hooks/commit-msg for each git project
#!/usr/bin/env perl -w
my $file = $ARGV[0];
my $bad = 0;
open(my $FH, "<", $file);
while(<$FH>) {
if ((length) > 50) {
print("line $. too long\n");

1. Introduction to the replicator database

A database where you PUT/POST documents to trigger replications and you DELETE to cancel ongoing replications. These documents have exactly the same content as the JSON objects we used to POST to /_replicate/ (fields "source", "target", "create_target", "continuous", "doc_ids", "filter", "query_params".

Replication documents can have a user defined "_id". Design documents (and _local documents) added to the replicator database are ignored.

The default name of this database is _replicator. The name can be changed in the .ini configuration, section [replicator], parameter db.

2. Basics