Skip to content

Instantly share code, notes, and snippets.

View voluntas's full-sized avatar
🎲
Focusing

V voluntas

🎲
Focusing
View GitHub Profile
@voluntas
voluntas / gist:2404659
Created April 17, 2012 08:42
nodetool
%%
%% Given a string or binary, parse it into a list of terms, ala file:consult/0
%%
consult(Str) when is_list(Str) ->
consult([], Str, []);
consult(Bin) when is_binary(Bin)->
consult([], binary_to_list(Bin), []).
consult(Cont, Str, Acc) ->
case erl_scan:tokens(Cont, Str, 0) of
3> binpp:pprint(crypto:rand_bytes(128)).
B9 35 7E 53 D6 4C 54 AF FF 08 2F D2 12 05 26 66 ¹5~SÖLT¯ÿ./Ò..&f
D2 A3 FB 68 E5 68 0C 57 6C CC F2 F0 C8 47 E1 B8 Ò£ûhåh.WlÌòðÈGá¸
0E CA 78 04 28 4A A6 28 9E 1E E8 2D D2 0E 9F EB .Êx.(J¦(ž.è-Ò.Ÿë
63 5D 5B FD 58 24 A8 93 FB 71 31 71 96 67 48 66 c][ýX$¨“ûq1q–gHf
56 B1 6A 98 F4 E3 6E 2C CA 03 01 9E 38 42 E8 65 V±j˜ôãn,Ê..ž8Bèe
42 3B 7E CB D8 04 4E D8 B4 7D E3 EC EB FA E1 A9 B;~ËØ.NØ´}ãìëúá©
20 74 89 01 73 25 A0 C0 0F AE 5D EC 9D 19 B2 B7 t‰.s% À.®]ì.²·
22 E8 69 3F C3 5A 8F A5 EC 3F C3 30 B7 F2 A4 0D "èi?ÃZ¥ì?Ã0·ò¤.
@voluntas
src/msgpack.erl:399:<0.72.0>: serialize: 7.934 s
src/msgpack.erl:400:<0.72.0>: deserialize: 5.945 s
src/msgpack.erl:401:<0.72.0>: for 18554 KB test data.
@kuenishi
src/msgpack.erl:349:<0.197.0>: serialize: 6.278 s
src/msgpack.erl:350:<0.197.0>: deserialize: 7.570 s
src/msgpack.erl:351:<0.197.0>: for 18554 KB test data.
@voluntas
voluntas / gist:3130310
Created July 17, 2012 16:05
yet-another-msgpackrpc-client
-type type() :: tcp | udp | sctp.
-type name() :: atom().
-type args() :: [msgpack:msgpack_term()].
%% シングルコネクション
-spec msgpackrpc_client:connect(type(), inet:ip_address(), inet:port_number()) -> {ok, pid()} | {error, term()}.
-spec msgpackrpc_client:close(pid()) -> ok | {error, term()}.
-spec msgpackrpc_client:sync_call(pid(), name(), args()) -> {ok, any()} | {error, term()}.
@voluntas
voluntas / gist:73efe2f36ac1513c02a8
Created August 5, 2012 16:13
レビューのススメ?

レビューのススメ?

typo 死ぬほど多いので突っ込みまってます

バージョン:0.2.3
作者:@voluntas

考え方はコロコロ変わるタイプなのですが、最近はレビューが実はとても大事でとにもかくにもレビューなのでは?と思い始めてきています。

@voluntas
voluntas / upload.py
Created September 15, 2012 03:09
boto/glacier サンプル
import sys
from boto.glacier import connect_to_region
"""
$ python upload.py /path/to/file
"""
REGION = 'ap-northeast-1'
VAULT = 'spam'
@voluntas
voluntas / meck.rst
Last active February 17, 2021 12:40
meck コトハジメ

meck コトハジメ

更新:2014-04-14
バージョン:0.1.1
作者:@voluntas
URL:http://voluntas.github.io/

Erlang の mock/stub ライブラリである meck の使い方をまとめました

@voluntas
voluntas / erlang_release.rst
Last active April 7, 2016 13:30
Erlang リリース コトハジメ

Erlang リリース コトハジメ

更新:2014-04-10
バージョン:0.2.1
作者:@voluntas
URL:http://voluntas.github.io/

reltool 周りについて勉強がてらまとめてみました

@voluntas
voluntas / riak.rst
Last active June 12, 2019 08:34
Riak コトハジメ

Riak コトハジメ

更新:2013-05-03
バージョン:0.3.2
作者:@voluntas

環境

@voluntas
voluntas / erlang_app.rst
Created December 9, 2012 07:34
Erlang アプリケーション コトハジメ

Erlang アプリケーション コトハジメ

更新:2012-09-15
作者:@voluntas
バージョン:0.1.0

Gist で書いてみたシリーズ