Skip to content

Instantly share code, notes, and snippets.

diff --git a/cookbooks/collectd/files/default/dbcore b/cookbooks/collectd/files/default/dbcore
index f4863da..2d6828e 100644
--- a/cookbooks/collectd/files/default/dbcore
+++ b/cookbooks/collectd/files/default/dbcore
@@ -85,6 +85,23 @@ def system(address, fqdn):
for k, v in info.iteritems():
fmt = (base, name, k, timestamp, v)
print '%s.packet_distribution.%s.%s %s:%s' % fmt
+ elif stat == "disk_queues":
+ for k in ("compaction", "low", "replicator"):
#!/usr/bin/env escript
%% -*- erlang -*-
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
@davisp
davisp / remsh.erl
Last active December 19, 2015 20:58
A remsh that logs every session to ~/.remsh.log
#! /usr/bin/env escript
%%! -hidden -noshell -noinput
-mode(compile).
-export([
init_shell_log/1
]).
#!/usr/bin/env python
import contextlib as ctx
import gzip
import re
import sys
def reconstruct(fname):
ret = {}
diff --git a/src/couch/rebar.config.script b/src/couch/rebar.config.script
index b92bde1..bbc8400 100644
--- a/src/couch/rebar.config.script
+++ b/src/couch/rebar.config.script
@@ -10,30 +10,32 @@
%% License for the specific language governing permissions and limitations under
%% the License.
-%% declare values
CouchJSName = case os:type() of
rcouch subtree split notes
==========================
Starting point:
c73144aaef7f86d169afd685dae121463efea658
This commit is huge and moves lots of things around. First step is
to reset to just before this commit to start our subtree extractions.
Splitting an RCouch App
=======================
$ git reset --hard add9173^
$ git subtree split -P src/couch_mrview/
# Snipped...
-n 3769/ 3771 (3768)
-n 3770/ 3771 (3769)
-n 3771/ 3771 (3770)
@davisp
davisp / a.c
Created November 13, 2014 01:06
Apparently char can be an unsigned data type?
#include <stdio.h>
int
main(int argc, char* argv[])
{
fprintf(stderr, "%d\r\n", (char) -1);
fprintf(stderr, "%lu\r\n", sizeof(char));
}
@davisp
davisp / lsi-test.cc
Created February 20, 2015 07:50
Trigger bug in libspatialindex index validation
#include <assert.h>
#include <stdio.h>
#include <spatialindex/capi/sidx_api.h>
void
insert_box(IndexH idx, int id, double x, double y, double l)
{
double mins[] = {x - l, y - l};
diff --git a/c_src/b64url.c b/c_src/b64url.c
index 842d82e..074d9a0 100644
--- a/c_src/b64url.c
+++ b/c_src/b64url.c
@@ -411,6 +411,7 @@ b64url_encode_cont(ErlNifEnv* env, int argc, const ENTERM argv[])
ErlNifBinary src;
b64url_priv* priv = (b64url_priv*) enif_priv_data(env);
b64url_st* st = NULL;
+ void* res = NULL;
int status;