gradle自行安装
MacBookAir上安装大概用了10分钟
brew install kafka
==> Installing kafka
==> Downloading http://mirrors.ibiblio.org/apache/kafka/0.8.2.1/kafka-0.8.2.1-src.tgz
######################################################################## 100.0%
==> gradle
==> gradle jar
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
alias tm="tmux -2 attach || tmux -2" |
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
46 brew install homebrew/php/php56 | |
51 brew install homebrew/php/php56-mcrypt | |
170 brew install homebrew/php/php56-intl | |
180 brew install homebrew/php/php56-apcu | |
169 brew install icu4c | |
86 brew install mysql | |
114 brew install reattach-to-user-namespace | |
155 brew tap homebrew/services | |
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
# rで設定読み込み | |
bind r source-file ~/.tmux.conf \; display "Config reloaded." | |
set-option -g default-shell /bin/zsh | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# ステータスバーをトップに配置する | |
# set-option -g status-position top | |
# ウィンドウ履歴の最大行数 |
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 com.example | |
import scala.math._ | |
object Square extends App { | |
case class Point(x: Int, y: Int) | |
implicit class CombinatorialList[A](l: List[A]) { | |
val xsize = l.size | |
def xcombinations(n: Int): List[List[A]] = | |
if (n > xsize) Nil | |
else l match { |
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
trait A { | |
def foo = println("I am A." + super.toString) | |
} | |
trait B extends A { | |
override def foo = { | |
println("I am B." + super.toString) | |
super.foo | |
} | |
} | |
trait C extends A { |
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
val add1: Int => Int = x => x + 1 | |
val sq = (x: Int) => x * x | |
val add100 = (x: Int) => x + 100 | |
foo map (add100 compose sq compose add1) | |
//res9: List[Int] = List(104, 109, 116, 125, 136) | |
//functionをリストにしたら、自由度高いじゃと思って!下記の方法を見つかった! | |
// https://bcomposes.wordpress.com/2011/08/20/fun-with-function-composition-in-scala/ |
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
/* | |
List( | |
List(1,2,3,4), | |
List(5,6,7,8), | |
List(9,0) | |
) | |
↓ | |
List( | |
List(1,5,9), | |
List(2,6,0), |
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
$ defaults write com.apple.finder AppleShowAllFiles TRUE |
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
// ディレクトリのみ | |
ls -F | grep / | |
// ファイルのみ | |
ls -F | grep -v / |