Skip to content

Instantly share code, notes, and snippets.

View shino's full-sized avatar

Shunichi Shinohara shino

View GitHub Profile
#!/usr/bin/env escript
%% -*- coding: utf-8 -*-
%%! -pa /usr/lib64/riak-cs/lib/riakc-1.4.1/ebin /usr/lib64/riak-cs/lib/riak_pb-1.4.4.0/ebin /usr/lib64/riak-cs/lib/protobuffs-0.8.1/ebin /usr/lib64/riak-cs/lib/riak_cs-1.4.5/ebin /usr/lib/riak-cs/lib/riakc-1.4.1/ebin /usr/lib/riak-cs/lib/riak_pb-1.4.4.0/ebin /usr/lib/riak-cs/lib/protobuffs-0.8.1/ebin /usr/lib/riak-cs/lib/riak_cs-1.4.5/ebin
%%! -pa /usr/lib64/riak-cs/lib/riakc-1.3.1.1/ebin /usr/lib64/riak-cs/lib/riak_pb-1.3.0/ebin /usr/lib64/riak-cs/lib/protobuffs-0.8.0/ebin /usr/lib/riak-cs/lib/riakc-1.3.1.1/ebin /usr/lib/riak-cs/lib/riak_pb-1.3.0/ebin /usr/lib/riak-cs/lib/protobuffs-0.8.0/ebin /usr/lib/riak-cs/ebin
%%! -pa /Users/kelly/basho/repos/riak_cs/deps/riakc/ebin /Users/kelly/basho/repos/riak_cs/deps/riak_pb/ebin /Users/kelly/basho/repos/riak_cs/deps/protobuffs/ebin /Users/kelly/basho/repos/riak_cs/deps/riakc/ebin /Users/kelly/basho/repos/riak_cs/deps/riak_pb/ebin /Users/kelly/basho/repos/riak_cs/deps/protobuffs/ebin /Users/kelly/basho/repos/riak_cs/dep
@slfritchie
slfritchie / presentation.md
Created March 18, 2014 09:22
Erlang tracing, for the Riak source code reading series, 2014-03-18, Tokyo, Japan

Erlang Tracing: more than you wanted to know

Rough Outline

  • What can be traced?
  • How can trace events be specified?
  • "match specifications": twisty passages, all alike
  • WTF, can I just use DTrace and drink my coffee/beer/whisky in peace?
  • Trace delivery mechanisms: pick one of two
@slfritchie
slfritchie / SLF.+zdss.patch
Last active December 17, 2015 14:29
Erlang/OTP R15B0x and R16B patch for the +zdss flag.
Purpose: To prevent scheduler collapse by disabling scheduler sleep periods.
This patch is relative to R16B01 pre-release but may be applied (with "fuzz")
on R15B01 and R15B03-1 without difficulty.
The new flag, "+zdss", must be used with "+scl false" flag to be successful.
See the erl.xml document for a description. Example use:
erl +scl false +zdss 500:500
Note that this flag used to be called "+zdnfgtse"

go 1.1 scheduler

where

src/pkg/runtime proc.c asm_*.s

design

FAIL: s3tests.functional.test_s3.test_object_read_notexist
FAIL: s3tests.functional.test_s3.test_object_set_get_non_utf8_metadata
FAIL: s3tests.functional.test_s3.test_object_set_get_metadata_empty_to_unreadable_prefix
FAIL: s3tests.functional.test_s3.test_object_set_get_metadata_empty_to_unreadable_suffix
FAIL: s3tests.functional.test_s3.test_object_set_get_metadata_empty_to_unreadable_infix
FAIL: s3tests.functional.test_s3.test_object_set_get_metadata_overwrite_to_unreadable_prefix
FAIL: s3tests.functional.test_s3.test_object_set_get_metadata_overwrite_to_unreadable_suffix
FAIL: s3tests.functional.test_s3.test_object_set_get_metadata_overwrite_to_unreadable_infix
FAIL: s3tests.functional.test_s3.test_object_raw_response_headers
FAIL: s3tests.functional.test_s3.test_object_raw_authenticated_object_acl
@jj1bdx
jj1bdx / records_rb.py
Created March 14, 2013 08:18
A crude example of dumping reversebeacon.net CSV files to Riak via riak-python-client
#!/usr/local/bin/python
import sys
import json
import csv
import riak
#client = riak.RiakClient()
cl = riak.RiakClient(host=YOURHOST, pb_port=YOUR_PB_PORT, protocol='pbc')
b = cl.bucket('records_rb')
@vinoski
vinoski / fd_setsize_on_osx.md
Last active November 7, 2017 06:20
How to raise the maximum number of file descriptors when building Erlang/OTP on OS X.

When you build Erlang/OTP on OS X, it unfortunately defaults to handling a maximum of 1024 file descriptors. You can get around this limitation with the right combination of configuration options and manual changes to a generated config file.

First, go into your unpacked Erlang/OTP source directory and run the following command, replacing the value 10000 with whatever value you want for max file descriptors:

perl -i -pe 's/(define\s+FD_SETSIZE\s+)\d+/\1 10000/' erts/config.h.in 

Next, when you run configure in your Erlang/OTP source directory, be sure to include the right CFLAGS setting, as shown below:

CFLAGS='-DREDEFINE_FD_SETSIZE -DFD_SETSIZE=15000 -D_DARWIN_UNLIMITED_SELECT' ./configure --enable-kernel-poll <other options>
@bsparrow435
bsparrow435 / gist:3563993
Created September 1, 2012 04:44
Riak MDC cheat sheet

#Riak Multi DC Repl Cheat Sheet


##Types There are two types of multi data center replication in Riak.

  1. Fullsync

    Operation is triggered by connection creation between clusters, running riak-repl start-fullsync on the listener leader, or every fullsync_interval minutes. Relevant app.config settings:

@kuenishi
kuenishi / beam.rst
Created July 26, 2012 16:22
Erlang BEAM memo

BEAM

assemble

$ erlc -S test.erl