Skip to content

Instantly share code, notes, and snippets.

@dizzyd
dizzyd / gist:5ac46500cfd69fa50966
Last active August 29, 2015 14:02
Travel Instructions from my boss

I will be traveling under an assumed name, and wearing false whiskers in the style of a Mennonite elder, with a broad black hat and a skinny tie. I will answer to the name Joshua or, alternately, Brother Joshua. When you approach, simply state that the weather is good for pot pies. I will pass the envelope to you and stand up, retrieving my stuffed wallabee, and walking away. When the clock in the stuffed iguana winds down past 30 seconds, yell "Happy Birthday" and run like you are being chased by a stuffed iguana. You will be.

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)