Skip to content

Instantly share code, notes, and snippets.

{
"riak": {
"framework-name": "riak",
"hostname": "riak.marathon.mesos",
"marathon": "m1.dcos:8080",
"master": "m1.dcos:5050",
"zk": "m1.dcos:2181",
"user": "root",
"role": "riak",
"auth-principal": "riak",
@drewkerrigan
drewkerrigan / README.md
Created November 21, 2018 16:54
Pandoc, Mactex, Markdown to PDF

I've had to install and configure these things a few times, and I always forget how to do it, so here it is for posterity:

@drewkerrigan
drewkerrigan / README.md
Last active September 21, 2024 19:19
Make Local Universe

Make Local Universe

Vagrant

Create a CentOS 7 VM:

mkdir centos7
cd centos7
vagrant init madorn/centos7
@drewkerrigan
drewkerrigan / README.md
Last active September 21, 2024 19:19
Erlang / Elixir in 5 Minutes or Less

Learning Erlang / Elixir Basics

Primitives

Erlang only has a few primitives that you need to worry about. Here they are below with corresponding Elixir examples.

  1. integer: Erlang: 123, Elixir: 123
  2. float: Erlang: 123.5, Elixir: 123.5
  3. atom: Erlang: hello, Elixir: :hello
  4. binary: Erlang: <<"hello">> or <<10,20>>, Elixir: "hello" or <<10,20>>
@drewkerrigan
drewkerrigan / README.md
Last active September 21, 2024 19:19
Setting open files limit in OSX 10.11.3

Download this gist, and then run:

chmod 755 open_files_limit_mac.sh
./open_files_limit_mac.sh

Restart the system, and then run:

@drewkerrigan
drewkerrigan / riakpbc.md
Last active September 21, 2024 19:19
A few snippets describing how to use the riakpbc node.js library

Put

var riakObj = {mykey1: "myvalue1"};

var data    = {
    key: 'my_key',
    bucket: 'my_bucket', 
    type: 'my_bucket_type',
    content = { 
@drewkerrigan
drewkerrigan / setup.md
Last active September 21, 2024 19:19
simple Riak default schema search setup

Simple Search 2.0 Setup

Create an index
curl -i -XPUT http://localhost:8098/search/index/my_index
Link the index to a bucket
@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"
@drewkerrigan
drewkerrigan / gist:2876196
Created June 5, 2012 16:51
Swift Usage Examples
Execute the following command and make a note of X-Auth-Token. You will need this token to use in all subsequent commands.
curl -v -H 'X-Storage-User: system:root' -H 'X-Storage-Pass: testpass' http://10.80.83.68:8077/auth/v1.0
In the following command examples we are using 'AUTH_tk65840af9f6f74d1aaefac978cb8f0899' as the X-Auth-Token. Replace this with the appropriate token you obtained in the above step.
To create a container:
curl -X PUT -H 'X-Auth-Token: AUTH_tk65840af9f6f74d1aaefac978cb8f0899' http://10.80.83.68:8077/v1/AUTH_system/mycontainer
To list all containers in current account:
#Minecraft server properties
allow-cheats=true
allow-flight=true
allow-nether=true
broadcast-console-to-ops=true
broadcast-rcon-to-ops=true
difficulty=easy
enable-command-block=false
enable-jmx-monitoring=false
enable-query=false