Skip to content

Instantly share code, notes, and snippets.

An RSVP-list demo on top of Riak 2.0 Datatypes

This is a purely in-browser demo of Riak 2.0's sets datatype. The application code uses React.js and jquery.

To get started, make a 5-node devrel cluster of the 2.0 preview using these instructions. After your cluster is built, make a bucket-type for sets:

cd dev/dev1
bin/riak-admin bucket-type create sets '{"props":{"datatype":"set","allow_mult":true}}'
bin/riak-admin bucket-type activate sets

Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installing wxWidgets

var redisScan = require('redisscan');
var redis = require('redis');
var riak = require('riakpbc');
var async = require('async');
var args = require('optimist')
.usage('--import or --export Redis archives in Riak\nUsage: $0')
.boolean('import')
.boolean('export')
.boolean('debug')
.describe('import', "Import from Riak to Redis")
-module(helpers).
is_pid_alive(Pid) when node(Pid) =:= node() ->
is_process_alive(Pid);
is_pid_alive(Pid) ->
lists:member(node(Pid), nodes()) andalso
(rpc:call(node(Pid), erlang, is_process_alive, [Pid]) =:= true).
get_current_time() ->
Now = calendar:local_time(),
# Erlang R16B HiPE with Rebar
#
# VERSION 0.0.1
FROM base
MAINTAINER Son Tran-Nguyen "sntran@inhuman.io"
RUN apt-get update
RUN apt-get install -y git build-essential libncurses5-dev openssl libssl-dev curl
# For HiPE, requires M4
@nivertech
nivertech / x
Created November 5, 2013 18:49 — forked from vitaly/x
#!/bin/bash -x
N=$1; shift
if [ -z "$N" -o -z "$1" ]; then
cat <<_
Usage: $0 N COMMAND
_
exit 1
fi
APPDIRS := $(wildcard apps/*)
## Example hack to filter one out:
## APPDIRS := $(filter-out apps/fooapp, $(APPDIRS))
define PROXY_TARGET
$(1):
$(foreach appdir,$(APPDIRS),$(MAKE) -C $(appdir) $(1) ;)
endef
defmodule CommandSigil do
# 'x' is for 'execute'.
defmacro sigil_x({ :<<>>, _line, [string] }, []) when is_binary(string) do
string
|> Macro.unescape_string()
|> String.to_char_list!()
|> :os.cmd()
end