Skip to content

Instantly share code, notes, and snippets.

@drewkerrigan
drewkerrigan / .emacs
Last active December 29, 2015 08:29
Aquamacs / Terminal .emacs for Mac OS X
;;;; .emacs Customizations, Functions, and Packages
;;; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;;; Packages and Initialization
;;; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;;; Color Theme (http://download.savannah.gnu.org/releases/color-theme/)
(add-to-list 'load-path "~/.emacs.d/packages/color-theme/")
(require 'color-theme)
(color-theme-initialize)
@drewkerrigan
drewkerrigan / .emacs
Created December 3, 2013 15:49
Emacs custom functions and config.
;;;; .emacs Customizations, Functions, and Packages
;;; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;;; Packages and Initialization
;;; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(require 'package)
;; Add the original Emacs Lisp Package Archive
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
@drewkerrigan
drewkerrigan / README.md
Last active December 30, 2015 07:19
Install Erlang R16B02 using Kerl

You can install different Erlang versions in a simple manner with the kerl script. This is probably the easiest way to install Erlang from source on a system, and typically only requires a few commands to do so. Install kerl by running the following command:

curl -O https://raw.github.com/spawngrid/kerl/master/kerl; chmod a+x kerl

To compile Erlang as 64-bit on Mac OS X, you need to instruct kerl to pass the correct flags to the configure command. The easiest way to do this is by creating a ~/.kerlrc file with the following contents:

KERL_CONFIGURE_OPTIONS="--disable-hipe --enable-smp-support --enable-threads
basho-samurai:riak andrewkerrigan$ dd if=/dev/zero of=/tmp/output bs=25k count=1k
1024+0 records in
1024+0 records out
26214400 bytes transferred in 0.043722 secs (599567916 bytes/sec)
basho-samurai:riak andrewkerrigan$ for i in {1..10}; do time curl -X PUT localhost:8098/riak/foo/a --data-binary @/tmp/output > foo; done
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 25.0M 0 0 100 25.0M 0 54.7M --:--:-- --:--:-- --:--:-- 54.8M
real 0m0.479s
@drewkerrigan
drewkerrigan / README.md
Created December 10, 2013 21:45
Riak CRDT Demo

Erlang

Install Erlang R16B02 using kerl

curl -O https://raw.github.com/spawngrid/kerl/master/kerl; chmod a+x kerl

Create ~/.kerlrc

@drewkerrigan
drewkerrigan / workflow.txt
Last active December 31, 2015 00:09
Actor based counter example values
1) Actor 1 writes transaction
_key_____________|_value________________________________________________________
player1_balance | {actor1: {operations: [{txnid: 1, value: +10}]}}
2) Actor 2 writes transaction
_key_____________|_value________________________________________________________
player1_balance | sibling1 -> {actor1: {operations: [{txnid: 1, value: +10}]}}
sibling2 -> {actor2: {operations: [{txnid: 2, value: +20}]}}
@drewkerrigan
drewkerrigan / YOKOZUNA.md
Last active September 21, 2024 19:19
Yokozuna Setup

Create a schema based on the default one

https://github.com/basho/yokozuna/blob/develop/priv/default_schema.xml

Upload your schema

curl -XPUT -H 'Content-Type: application/xml'  http://localhost:8098/search/schema/drew_schema --data-binary @"my_schema.xml"
;;;; .emacs Customizations, Functions, and Packages
;;; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;;; Packages and Initialization
;;; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@drewkerrigan
drewkerrigan / options.md
Last active August 29, 2015 13:56
RiakJson Installation Options

Build Riak from source

  1. Download a branch of Riak that contains RJ dependencies in rebar.config, and startup changes in reltool.config
  2. Run make relclean && make rel
  3. Start Riak
Pros
  • Least manual commands and configuration
@drewkerrigan
drewkerrigan / docker_install_notes.md
Last active December 10, 2020 06:17
Some notes on my experience installing Docker on OS X 10.9.2