This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def connect = { | |
import LogOps._ | |
log("connect") { implicit ctx => // connect start | |
// ... 何かの処理 ... | |
println("in connect") | |
log("login") { implicit ctx => // connect : login start | |
// ... 何かの処理 ... | |
println("in login") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |