Skip to content

Instantly share code, notes, and snippets.

@rnewson
rnewson / explicit-recv.patch
Created August 25, 2015 12:06
Don't use the message queue
commit 944d2d81226c7d442ee8d6fa67b2e153e29b7d84
Author: Robert Newson <rnewson@apache.org>
Date: Tue Aug 25 12:57:39 2015 +0100
Don't use the message queue
diff --git a/src/mochiweb_http.erl b/src/mochiweb_http.erl
index 1ea1f15..9e32d7d 100644
--- a/src/mochiweb_http.erl
+++ b/src/mochiweb_http.erl
@rnewson
rnewson / dreyfus.patch
Created August 24, 2015 22:43
Adding dreyfus to couchdb
commit 9563a9e29de08105f99f2f2480ee807f8472bfde
Author: Robert Newson <rnewson@apache.org>
Date: 2015-08-24 23:34:49 +0100
Add dreyfus to couchdb
diff --git a/rebar.config.script b/rebar.config.script
index bd8d2b8..f54bf1a 100644
--- a/rebar.config.script
+++ b/rebar.config.script
diff --git a/src/setup.erl b/src/setup.erl
index aa2da56..3482b47 100644
--- a/src/setup.erl
+++ b/src/setup.erl
@@ -76,8 +76,8 @@ get_remote_request_options(Options) ->
_ ->
[
{basic_auth, {
- binary_to_list(couch_util:get_value(remote_current_user, Options)),
- binary_to_list(couch_util:get_value(remote_current_password, Options))
diff --git a/src/cassim_metadata_cache.erl b/src/cassim_metadata_cache.erl
index 920f748..ceb6c9e 100644
--- a/src/cassim_metadata_cache.erl
+++ b/src/cassim_metadata_cache.erl
@@ -162,6 +162,8 @@ listen_for_changes(Since) ->
fabric:changes(DbName, fun changes_callback/2, Since, Args).
+changes_callback(waiting_for_updates, Acc) ->
+ {ok, Acc};
# 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
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
commit 52161b7b5cbf24bce42e82b28dc8a7f284e951ac
Author: Robert Newson <rnewson@apache.org>
Date: Wed Jun 17 14:41:50 2015 +0100
Add _node_config, an endpoint to configure specific nodes from any node
diff --git a/src/chttpd.erl b/src/chttpd.erl
index 5d1f4ee..19d01ed 100644
--- a/src/chttpd.erl
+++ b/src/chttpd.erl
@rnewson
rnewson / gist:6e7bad37dd8a85d9de05
Created June 10, 2015 23:03
scan deps for updates
#!/usr/bin/env escript
-mode(compile).
main(_) ->
lists:foreach(fun({Dep, Vsn}) ->
fetch_dep(Dep),
show_dep(Dep, Vsn)
end, load_deps()).
➜ ~ curl 127.0.0.1:15984 -sv -H Origin:http://127.0.0.1:8000
* Rebuilt URL to: 127.0.0.1:15984/
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 15984 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.37.1
> Host: 127.0.0.1:15984
> Accept: */*
> Origin:http://127.0.0.1:8000
@rnewson
rnewson / Dockerfile
Last active August 29, 2015 14:21
ubuntu 14.04 build steps
FROM ubuntu:14.04
RUN apt-get -qq update && apt-get -y install \
build-essential \
erlang-base-hipe \
erlang-dev \
erlang-manpages \
erlang-eunit \
erlang-nox \
libicu-dev \
backend name_here
# Configure health checks
option httpchk GET path_to_health_check
http-check disable-on-404