Skip to content

Instantly share code, notes, and snippets.

View mocchira's full-sized avatar

yoshiyuki.kanno mocchira

  • tailor.tech
  • Tokyo Japan
View GitHub Profile
@mocchira
mocchira / gist:5317346
Last active December 15, 2015 20:19
result of eprof on a leo_gateway server.
erlang:demonitor/2 1713 0.00 16259 [ 9.49]
ets:safe_fixtable/2 748 0.00 17258 [ 23.07]
ets:next/2 2312 0.00 17622 [ 7.62]
erlang:crc32/2 562 0.01 19638 [ 34.94]
file:file_name_1/2 34643 0.01 20030 [ 0.58]
ets:lookup/2 4359 0.01 26580 [ 6.10]
erlang:monitor/2 4973 0.01 28380 [ 5.71]
ets:select/1 361 0.01 30265 [ 83.84]
erlang:send/3 1736 0.01 30438 [ 17.53]
erlang:crc32/1 842 0.01 39367 [ 46.75]
@mocchira
mocchira / briefly_result_1.md
Last active December 16, 2015 03:29
leofs0.14.0 with latest cherly0.12.6 benchmark results at 4/12 2013
  • conf_128K

    {mode, max}. {duration, 1000}. {concurrent, 64}.

    {driver, basho_bench_driver_leofs}. {code_paths, ["deps/ibrowse"]}.

{http_raw_ips, ["leofs03","leofs04"]}.

@mocchira
mocchira / curl_range.md
Last active October 17, 2024 10:14
HTTP GET with Range header by curl
  • normal(explicitly specified start AND end)
  curl -v -X GET -H "range: bytes=1-8" http://localhost:8080/bbb/test
  • specified ONLY start(end will be specified at the end of file)
  curl -v -X GET -H "range: bytes=10-" http://localhost:8080/bbb/test
  • specified ONLY one negative value(last N bytes of file will be retrieved)
-module(test).
-export([start/2, stop/1]).
-export([loop/2, loop_child/1]).
-define(NUM_OF_REC, 256).
-define(INTERVAL, 1).
%% public functions
start(ProcNum, _Table) when ProcNum < 1 ->
# PUT
curl -v -X PUT intel12:8080/isnews/photos/toyokeizai/toyokeizai_20130425_13796_0.jpg -d @toyokeizai_20130425_13796_0.jpg
@mocchira
mocchira / gist:5971363
Last active December 19, 2015 14:48
about git commands
# rollback remote branch
git push -f origin HEAD^:master
# rollback local branch
git reset --hard HEAD^
@mocchira
mocchira / replace_otp_vsn.sh
Created September 25, 2013 07:56
Replace require_otp_vsn value in rebar.config
find . -name rebar.config|xargs sed 's/require_otp_vsn,\s\+"\(.\+\)"/require_otp_vsn, "R15B03|R16B01|R16B02"/g'
@mocchira
mocchira / s3siggen.erl
Created October 23, 2013 08:59
calc AWS Auht header with leofs default user
-module(s3siggen).
-export([gen_sig/2]).
-include("leo_s3_auth.hrl").
-define(S3_ACC_KEY, "05236").
-define(S3_SEC_KEY, "802562235").
-define(S3_CONTENT_TYPE, "application/octet-stream").
@mocchira
mocchira / docs4swift.md
Last active August 29, 2015 14:03
Docs about Swift
@mocchira
mocchira / comparision_wps4rdbms.md
Last active August 29, 2015 14:18
Which wire protocol should Astra implement for providing odbc/jdbc connectivity?

Traditional RDBMS

source file explanation
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/net_serv.cc main logic to parse mysql protocol
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/protocol.h
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/protocol.cc reply data structure and logic