% gem install sass
% rbenv rehash
% which sass
This file contains hidden or 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
package tmp | |
trait Sex {def getSex: String} | |
trait Male extends Sex {def getSex = "牡"} | |
trait Female extends Sex {def getSex = "牝"} | |
trait Distance {def getDistance: String} | |
trait Sprinter extends Distance {def getDistance = "短距離"} | |
trait Middler extends Distance {def getDistance = "中距離"} | |
trait Stayer extends Distance {def getDistance = "長距離"} |
This file contains hidden or 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 | |
NAME="" | |
PACKAGE_PATH="" | |
SCALA_VERSION="2.11.0" | |
SCALATEST_VERSION="2.1.3" | |
DIR=`pwd` | |
usage() { | |
cat << __EOT__ |
This file contains hidden or 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 Hoge { | |
def main(args: Array[String]) { | |
for (i <- (1 to 20)) mainRecur(args(0).toInt) | |
} | |
private def mainRecur(ver: Int) { | |
var start = System.nanoTime | |
val s = "\"1\",\"22\",\"333\",\"4444\",\"55555\"" |
This file contains hidden or 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
package ssbt | |
object Euler24 { | |
def main(args: Array[String]) { | |
val result = List(0, 1, 2, 3, 4, 5, 6, 7, 8, 9).permutations.zipWithIndex.filter(_._2 == 999999).next._1.mkString | |
println("Answer %s".format(result)) | |
} |
This file contains hidden or 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
package ssbt | |
object Euler32 { | |
def main(args: Array[String]) { | |
val permutations = List("1", "2", "3", "4", "5", "6", "7", "8", "9").permutations | |
val pandigitalProducts = permutations.map(getPandigitalProductList(1, _)).toList.filter(_.size > 0) | |
println("Answer %s".format(pandigitalProducts.flatten.distinct.sum)) | |
} |
This file contains hidden or 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
package ssbt | |
object HogeMain { | |
def main(args: Array[String]) { | |
val list = getRandomList(50, 500) | |
println("----- start distinct1") | |
repeat(10, repeatDistinct(distinct1[Int], list)) |
This file contains hidden or 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
Host nemui | |
Hostname setsuzoku.server | |
User jpshadowapps | |
LocalForward 16667 irc.na.server:6667 # ircサーバのsshトンネル | |
LocalForward 13389 win.na.server:3389 # windowsサーバのsshトンネル。RDCで localhost:13389 とかして接続 | |
LocalForward 15900 mac.na.machine:5900 # mac 画面共有のsshトンネル | |
LocalForward 10022 localhost:22 | |
ProxyCommand ssh [email protected] nc -w 1 %h %p # 多段ssh時の経由サーバ | |
DynamicForward localhost:10080 # socks proxy | |
IdentityFile ~/.ssh/nemui_rsa |