Skip to content

Instantly share code, notes, and snippets.

View shino's full-sized avatar

Shunichi Shinohara shino

View GitHub Profile
;; -*- mode: Emacs-Lisp; coding: utf-8-unix -*-
;;; migemo.el - Japanese incremental search trough dynamic pattern expansion
;; $Id: migemo.el.in,v 1.8 2006/09/22 08:43:33 shirai Exp $
;; Copyright (C) Satoru Takabayashi
;; Author: Satoru Takabayashi <satoru-t@is.aist-nara.ac.jp>
;; Keywords:
;; This file is free software; you can redistribute it and/or modify
-module(sample).
-compile(export_all).
-record(store, {key, value}).
main() ->
crypto:start(),
mnesia:start(),
mnesia:create_table(store,
@koh-t
koh-t / demo316open.R
Created March 16, 2011 03:27
福島原発のデータ fukushima*.csv ( http://oku.edu.mie-u.ac.jp/~okumura/stat/data/ ) をRでグラフにするスクリプトです.使い方についてはコメント欄を参照してください.
# -*- coding: utf-8 -*-
## 1)http://oku.edu.mie-u.ac.jp/~okumura/stat/data/
## で配布されている、fukushima1.csvをダウンロードします
## https://gist.github.com/869400
## で配布されているスクリプトでデータを整形します
## テキストエディタ等で次のファイルのようにデータを更に整形します
## https://gist.github.com/871960
@gburd
gburd / haproxy.conf
Last active July 5, 2022 13:34
Recommended haproxy settings to balance Riak protobuf and http interfaces (note: WORK IN PROGRESS)
# Documentation for HAProxy
# http://code.google.com/p/haproxy-docs/w/list
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt
# NOTES:
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems)
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
-module(timeit).
-compile(export_all).
%% @doc Dynamically add timing to MFA. There are various types of
%% timing.
%%
%% all - time latency of all calls to MFA
%%
%% {sample, N, Max} - sample every N calls and stop sampling after Max
%%
@kuenishi
kuenishi / beam.rst
Created July 26, 2012 16:22
Erlang BEAM memo

BEAM

assemble

$ erlc -S test.erl
@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:

@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>
@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')
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