2014-01-01から1ヶ月間の記事一覧

シェルスクリプトで指定回数ループ処理

seq を使うのが一番簡単 #!/bin/shcnt=10000 # 繰り返したい回数 for i in `seq $cnt` do /* do something */ done seq コマンドについて引数が1つの場合、1から引数までの数を 1 or -1 刻みで出力 $ seq 5 1 2 3 4 5$ seq -2 1 0 -1 -2引数が2つの場合、第1…

Ubuntu に RStudio Server をインストール

RStudioのページにしたがえばよい R をインストール $ sudo apt-get install r-base RStudio Server のダウンロード、インストール(64bit) $ sudo apt-get install gdebi-core $ sudo apt-get install libapparmor1 $ wget http://download2.rstudio.org/r…

Homebrew で GitHub のアクセス上限回数引き上げ

Mac

Homebrew で1時間に60回以上 brew コマンドを実行すると以下のようなエラーが出る。 Error: GitHub API rate limit exceeded for . (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more deta…

Homebrew で R をインストール

Mac R

XQuartzをインストール XQuartzのページから最新版をダウンロード、インストール いったんログアウトし、再ログイン リポジトリの追加、依存している gfortran をしたうえで、R をインストール $ brew tap homebrew/science $ brew install gfortran $ brew …

zsh で Go のコマンド補完

.zshrc に以下を追記 # Go completion if [ -f $GOROOT/misc/zsh/go ]; then source $GOROOT/misc/zsh/go fi以下のようにコマンド候補が出る。 $ go [Tab] build -- compile packages and dependencies clean -- remove object files doc -- run godoc on pa…

Ubuntu に Go をインストール

Ubuntu 12.04 に Go をインストールする。パッケージが用意されているので apt でインストール可能。 $ sudo apt-get install golangただしバージョンが1.0だったり、Vim plugin が含まれていなかったりするので Installing Go from source - The Go Program…