Skip to content

Instantly share code, notes, and snippets.

View ksauzz's full-sized avatar

Kazuhiro Suzuki ksauzz

View GitHub Profile
@ksauzz
ksauzz / RiakCounterSample.java
Created September 5, 2013 03:19
riak-client-java counter sample
import com.basho.riak.client.IRiakClient;
import com.basho.riak.client.RiakFactory;
import com.basho.riak.client.bucket.Bucket;
import com.basho.riak.client.raw.config.Configuration;
import com.basho.riak.client.raw.http.HTTPClientConfig;
import com.basho.riak.client.raw.pbc.PBClientConfig;
public class RiakCounterSample {
@ksauzz
ksauzz / solr-memo.md
Last active December 17, 2015 11:39
Solrメモ
@ksauzz
ksauzz / sed-how-to.md
Last active December 17, 2015 05:48
sed note

基本コマンド

before -> after

sed s/before/after/ file.txt
sed s|before|after| file.txt

指定ファイルを直接書き換える

<!-- For Syntax Highlighting -->
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css"></link>
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script>
<script>
function styleCode() {
if (typeof disableStyleCode != 'undefined') { return; }
var a = false;
@ksauzz
ksauzz / instruction.md
Last active December 17, 2015 00:19
grunt note that is node js project management tool.
npm install -g grunt-cli
npm install -g grunt-init
git clone git@github.com:gruntjs/grunt-init-commonjs.git ~/.grunt-init/commonjs
grunt-init commonjs
@ksauzz
ksauzz / redbug.md
Created April 30, 2013 10:37
redbug
(riak1@127.0.0.1)70> redbug:start({riak_kv_put_fsm,start_link,[return, stack]},[{time,5000},{msgs,1},{max_msg_size,10000000}]).
ok

19:36:59 <{mochiweb_acceptor,init,3}> {riak_kv_put_fsm,start_link,
                                       [{raw,114183653,<0.11762.0>},
                                        {r_object,<<"bucket">>,<<"key1">>,
                                         [{r_content,
                                           {dict,7,16,16,8,80,48,
                                            {[],[],[],[],[],[],[],[],[],[],[],
@ksauzz
ksauzz / dependencies-erlang.md
Created April 20, 2013 16:52
Dependencies for building Erlang

Base

apt-get install build-essential libncurses5-dev openssl libssl-dev

with Java & WX

apt-get install freeglut3-dev libwxgtk2.8-dev wx2.8-headers wx-common java7-jdk
@ksauzz
ksauzz / pip.md
Created April 1, 2013 14:40
install riak-python-client from github.
pip install git+https://github.com/basho/riak-python-client.git
@ksauzz
ksauzz / redbug-sample.md
Last active December 15, 2015 11:19
Eper

sample

  • timeout(sec) : 5
  • message count: 2
(riak1@127.0.0.1)14> redbug:start(5000, 2, {riak_kv_keys_fsm,'_'}).
ok

16:23:32 <{riak_core_coverage_fsm,init,1}> {riak_kv_keys_fsm,init,
@ksauzz
ksauzz / ClusterConfSample.java
Created March 21, 2013 02:48
riak java client sample
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import com.basho.riak.client.IRiakClient;
import com.basho.riak.client.RiakFactory;
import com.basho.riak.client.bucket.Bucket;
import com.basho.riak.client.cap.DefaultRetrier;
import com.basho.riak.client.raw.pbc.PBClientConfig;
import com.basho.riak.client.raw.pbc.PBClusterConfig;