pyenv で Powerlineを利用した際に ホームディレクトリ以外でエラーが出る場合の対処

知っていればそのとおりなのだと思いますが pyenvを利用して特定のバージョンの配下に Powerlineを導入し PROMPTを変更しているときにディレクトリを移動すると

pyenv: powerline: command not found
The `powerline' command exists in these Python versions:
2.7.13/envs/defuse
defuse
pyenv: powerline: command not found

The `powerline' command exists in these Python versions:
2.7.13/envs/defuse
defuse

と表示されていしましました。これを回避するには pyenvのglobalに設定してあげると回避出来ます。

$ pyenv versions
system
2.7.13
2.7.13/envs/defuse
* defuse (set by /Users/hideaki/.python-version)

$ pyenv global defuse

 

懐かしいOldパソコンの画面をエミュレーションする「Retro-Term」

Read More

レトロなターミナル

フルスクリーンで表示すると懐かしい画面が。
それにしても微妙なブラウン管のゆらぎとかその辺りを必死で描画する性能の無駄遣い加減が素晴らしい。こんどこれでプレゼンテーションをしよう。

NewImage

手順に従って

brew install qt5
git clone --recursive https://github.com/Swordfish90/cool-retro-term.git
export CPPFLAGS="-I/usr/local/opt/qt5/include"
export LDFLAGS="-L/usr/local/opt/qt5/lib"
export PATH=/usr/local/opt/qt5/bin:$PATH
cd cool-retro-term
qmake && make
mkdir cool-retro-term.app/Contents/PlugIns
cp -r qmltermwidget/QMLTermWidget cool-retro-term.app/Contents/PlugIns
open cool-retro-term.app

を実施すれば動きます。最後に cool-retro-term.app を /Applications にコピーしておけばよいです。設定項目で色々パフォーマンスを変更できるので調整しましょう。またプリセットで色々な機種風にテーマを帰ることが出来ます。

golangのアップデートとGopathの設定

Go言語が既に導入していたのでアップデートして最新版にする。これでversion1.6になった

$ sudo brew upgrade go
==> Upgrading 1 outdated package, with result:
go 1.6
==> Upgrading go
==> Downloading https://homebrew.bintray.com/bottles/go-1.6.el_capitan.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring go-1.6.el_capitan.bottle.2.tar.gz
==> Caveats
As of go 1.2, a valid GOPATH is required to use the `go get` command:
  https://golang.org/doc/code.html#GOPATH

You may wish to add the GOROOT-based install location to your PATH:
  export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
  /usr/local/Cellar/go/1.6: 5,771 files, 324.9M

GOPATHを設定するということで調べてみると適当に決めて良いらしい。

ということで$HOME/.goにする。

$ mkdir -p $HOME/.go
$ echo "export GOPATH=$HOME/.go" >> ~/.bash_profile

あ、でもエディタでいつも Working/*** にプロジェクト作っているから都度 gopath 切り替えるのが良いのか。