Git command for Deploy or PR merging
Diff of changed files
$ git diff --stat commit-new commit-old $ git diff --stat --name-only commit-new commit-old $ git diff --stat --ignore-blank-lines commit-new commit-old
Diff of content of file
$ git diff commit-old commit-new -- path/to/file
Show diff by a word with color
$ git diff --color-words
Git Visibility
color
$ git config --global color.ui true
Log check
$ git log --graph --decorate --oneline
References
デプロイ前のログや差分をチェックするgitコマンド
変更したfileの抽出
$ git diff --stat commit-new commit-old $ git diff --stat --name-only commit-new commit-old $ git diff --stat --ignore-blank-lines commit-new commit-old
fileの変更差分
$ git diff commit-old commit-new -- path/to/file
差分を単語単位で色分けで表示する
$ git diff --color-words
gitを見やすく
color
$ git config --global color.ui true
ログチェック
$ git log --graph --decorate --oneline
References
Links of Restful API(JSON) References
Restful API(JSON)の参考まとめ
How to set initial selected tab
Japanese here uchinoinu.hatenablog.jp
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let tabBar = self.window!.rootViewController as! UITabBarController tabBar.selectedIndex = 1 // Set index number which you want to select return true }
最初に選択されるTabを指定する方法
English here uchinoinu.hatenablog.jp
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let tabBar = self.window!.rootViewController as! UITabBarController tabBar.selectedIndex = 1 // ここを指定したいTabのIndexにする return true }
rails c(bin/rails c) cannot load env vars managed by direnv
Japanese here uchinoinu.hatenablog.jp
Situation
- Rails 4.2
- Ruby 2.3
- Spring 1.3.5
direnv 2.8.1
Manage environment variables by direnv
- run rails command using Spring
Problem
Adding new environment variables, rails c cannot load any environment variables (maybe rails s too)
How to solve this
Restart Spring(stop any Spring process)
$ bin/spring stop Spring stopped.
Then, rails c can load env vars.