Skip to content

Instantly share code, notes, and snippets.

consult_str(eof, Acc) ->
lists:reverse(Acc);
consult_str(B, Acc) ->
case erl_scan:tokens([], B, 0) of
{done, Result, Remaining} ->
case Result of
{ok, Tokens, _} ->
{ok, Term} = erl_parse:parse_term(Tokens),
consult_str(Remaining, [Term | Acc]);
{eof, _} ->
riak@domU-12-31-39-07-36-02.compute-1.internal)1> rp(riak_ring_manager:get_my_ring()).
{ok,{chstate,'riak@domU-12-31-39-07-36-02.compute-1.internal',
[{'riak@domU-12-31-39-06-B4-71.compute-1.internal',{415,
63430439006}},
{'riak@domU-12-31-39-07-34-31.compute-1.internal',{614,
63430438996}},
{'riak@domU-12-31-39-06-B9-12.compute-1.internal',{2,
63430438990}},
{'riak@domU-12-31-39-07-36-02.compute-1.internal',{1,
63430438963}},
#!/bin/bash
BASEDIR=`pwd`
if [ ! -f "$BASEDIR/services/riak/$1.jmx" ]; then
echo "Can't find JMX file for $1"
exit 1
fi
(cd jmeter && bin/jmeter -n -t $BASEDIR/services/riak/$1.jmx \
-module(dm).
-compile(export_all).
%%
%% Identify the initial call of a PID; look first in pdict for the
%% value set by OTP-compliant procs, or fallback to lower-level info
%% if that's not available.
%%
ic(Pid) when is_pid(Pid) ->
-module(riakringer).
-compile(export_all).
assign(Partition, ToNode) ->
F = fun(Ring, _) ->
{new_ring, riak_core_ring:transfer_node(Partition, ToNode, Ring)}
end,
{ok, _} = riak_core_ring_manager:ring_trans(F, undefined),
ok.
Hello Good Day,
This is Patrick Kelly With regards to your Company i am sending this email
Regards to order some (Rebar)I will like to know the type and sizes you
have in stock and get me the sales price of one so that i will
tell you the quantity i will be ordering, and if you accept credit card as a
form of payment..
Hope to read from you soon about my order request......
With Kind Regards.
-module(timeit).
-export([timeit/3,
timeit/4,
timeit/5]).
-export([simple_test/0]).
timeit(Mod, Fun, Arity) ->
timeit(all, Mod, Fun, Arity, undefined).

Today is my last day at Basho.

I've been staring at this buffer for twenty minutes now, trying to figure out how to capture the tumult of feelings I have on the topic. I've had the honor of working with some amazingly sharp people who have changed the way I look at teams, code and life. I leave Basho knowing that I'm a better, more complete person than when I joined and I'm deeply grateful for it. It's a bittersweet thing to turn and start a next adventure.

At the same time, I'm deeply excited to be joining the team at Singly and work to make the world a more connected place. I'm looking forward to getting back to my early-stage roots and all the uncertainty and promise these types of endeavours encompass.

So to my Basho coworkers, know that I leave with a grateful and humbled heart to have had the opportunity to work with you. I hope to work with many of you again in the future and believe you will go on to do great things in the world of distributed systems -- as you already have! Go

@task
def check_worker():
# Check the status URL on the loopback
r = run("wget --timeout=5 -t 1 -O- http://localhost:8041 2>&1 >/dev/null", warn_only=True, quiet=True)
if r.return_code != 0:
# Something went wrong; kill all hallwayd.js and attempt to start it
sudo("pkill -9 node", warn_only=True)
sudo("start hallway-worker", warn_only=True)
sudo("start statsd", warn_only=True)
@dizzyd
dizzyd / Diff
Last active December 16, 2015 23:08
Building Erlang R16B on SmartOS
diff -u otp_src_R16B.orig/lib/os_mon/c_src/ferrule.c otp_src_R16B/lib/os_mon/c_src/ferrule.c
--- otp_src_R16B.orig/lib/os_mon/c_src/ferrule.c 2013-02-25 19:21:31.000000000 +0000
+++ otp_src_R16B/lib/os_mon/c_src/ferrule.c 2013-05-03 17:15:04.154229600 +0000
@@ -50,7 +50,7 @@
#define FDS_STDIN 0
#define FDS_PIPE 1
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
/* usage: ferrule ownpath */