Skip to content

Instantly share code, notes, and snippets.

Avatar
🍣
🍣

Tomohito Ozaki yuroyoro

🍣
🍣
View GitHub Profile
View riak.sh
#!/bin/sh
CWD=$(cd $(dirname $0); pwd)
echo "This script will create a local riak cluster for development purposes only."
echo "Prerequisites: install riak using homebrew (tested with v1.4.8)."
echo "The cluster will be created in the current directory."
echo "Riak admin is enabled with no security.\n"
read -p "Enter a name for your cluster [cluster]: " name
@yuroyoro
yuroyoro / gist:1604839
Created Jan 13, 2012 — forked from j5ik2o/gist:1518723
こんな構文で階層型のログ出力をしたい
View gist:1604839
def connect = {
import LogOps._
log("connect") { implicit ctx => // connect start
// ... 何かの処理 ...
println("in connect")
log("login") { implicit ctx => // connect : login start
// ... 何かの処理 ...
println("in login")
@yuroyoro
yuroyoro / gist:1094820
Created Jul 20, 2011 — forked from yusuke/gist:1094792
#daimon.scala
View gist:1094820
object Main extends App {
trait Reversible {
val s:String
def reverseOrder = s reverse
def reverseCases = s collect{
case c if c.isUpper => c.toLower
case c if c.isLower => c.toUpper
case c => c
}