Skip to content

Instantly share code, notes, and snippets.

View masayuki038's full-sized avatar

Masayuki Takahashi masayuki038

View GitHub Profile
/*
The MIT License (MIT)
Copyright (c) 2014 Ismael Celis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@sritchie
sritchie / WholeFile.java
Created February 2, 2011 17:32
Hadoop input format for swallowing entire files.
package forma;
import forma.WholeFileInputFormat;
import cascading.scheme.Scheme;
import cascading.tap.Tap;
import cascading.tuple.Fields;
import cascading.tuple.Tuple;
import cascading.tuple.TupleEntry;
import java.io.IOException;
import org.apache.hadoop.mapred.JobConf;
@max-mapper
max-mapper / readme.md
Created September 28, 2011 02:01
SLEEP - syncable.org

Your API does REST, but can it SLEEP?

SLEEP (Syncable Lightweight Event Emitting Persistence) is an emerging standard for distributed data sync using HTTP and JSON. A generalized version of CouchDB's much lauded built-in replication, SLEEP extends the REST architecture to define a way in which databases can offer syncable JSON APIs that foster open data innovation by allowing developers to replicate entire databases over the net.


SLEEP comes from the Apache CouchDB project which is now widely known for it's multi-master streaming HTTP + JSON replication. This is possible in part because of the CouchDB _changes feed, which is a particular API that lets you see if there have been any changes made to the database since last time you synchronized. CouchDB can efficiently implement the _changes feed because of one subtle difference between it and most other databases: it stores a history of all changes that happen to the database, including deletes.

If you synchronize data from a remote source and then the

@nuna
nuna / rename.rb
Created November 25, 2011 02:37
指定したディレクトリ以下の特定のファイルを再帰的にリネーム
#!/usr/bin/ruby
require 'find'
require 'fileutils'
dir = ARGV.shift
Find.find(dir) do |f|
if File.file?(f) and /20111123.*\.xls$/ =~ f
FileUtils.mv(f, f.sub(/20111123/, '20111124'), { :noop => false, :verbose => true })
@matope
matope / Dynamo: Amazonの高可用性Key-value Store.markdown
Last active November 18, 2022 17:54
Dynamo: Amazonの高可用性Key-value Store[和訳]
@hiroeorz
hiroeorz / reltool.config
Created June 17, 2012 11:49
Erlangリリースパッケージ生成ツール用設定ファイルのサンプル
{sys, [
{lib_dirs, ["../deps"]}, %% depsを追加
{erts, [{mod_cond, derived}, {app_file, strip}]},
{app_file, strip},
{rel, "hogeapplication", "0.1",
[
%% 標準で使うライブラリも全て追加
kernel,
stdlib,
sasl,
@voluntas
voluntas / erlang_app.rst
Created December 9, 2012 07:34
Erlang アプリケーション コトハジメ

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

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

Gist で書いてみたシリーズ

@voluntas
voluntas / dialyzer.rst
Created December 15, 2012 05:44
Dialyzer コトハジメ
@tlockney
tlockney / akka-docs.sh
Last active January 8, 2017 12:26
Akka docs on your Kindle!
# This only works with the current master branch of Akka
# Setup the necessary deps
brew install python
# adjust this depending on the latest version of Python that brew installed
export PATH=`brew --prefix python`/bin:/usr/local/share/python:$PATH
pip install sphinx
@voluntas
voluntas / erlang-json.txt
Last active December 15, 2015 15:18
Erlang JSON ライブラリベンチ
ソースコードとかはここ
https://github.com/voluntas/snowflake/tree/feature/json
jiffy .. Time: 342740
ejson .. Time: 428936
mochijson2 .. Time: 8359019
jsx .. Time: 2124705
jsonx .. Time: 116367
simplejson: 3.1.2