Skip to content

Instantly share code, notes, and snippets.

View yuroyoro's full-sized avatar
🍣
🍣

しいたけ yuroyoro

🍣
🍣
View GitHub Profile
@yuroyoro
yuroyoro / riak.sh
Last active August 29, 2015 14:01 — forked from iotaweb/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 January 13, 2012 05:49 — forked from j5ik2o/gist:1518723
こんな構文で階層型のログ出力をしたい
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 July 20, 2011 11:50 — forked from yusuke/gist:1094792
#daimon.scala
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
}