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 |
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") |
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 | |
} |