1
2
3
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk<version>.jdk
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin

Comment and share

git submodule指令筆記

in git

add submodule

1
2
3
git submodule add http://github.com/tpope/vim-fugitive.git bundle/fugitive
git add .
git commit -m "Install Fugitive.vim bundle as a submodule."

remove submodule

  1. Delete the relevant section from the .gitmodules file.
  2. Stage the .gitmodules changes git add .gitmodules
  3. Delete the relevant section from .git/config.
  4. Run git rm –cached path_to_submodule (no trailing slash).
  5. Run rm -rf .git/modules/path_to_submodule
  6. commit git commit -m “Removed (submodule name)”
  7. Delete the now untracked submodule files rm -rf path_to_submodule
  8. git submodule sync

clone a project with git submodule

1
2
3
git clone <project>
git submodule init
git submodule update

Comment and share

pip指令筆記

in python

python 3rd library通常會撞到:python_path/lib/python3.4/site-packages

以安裝ipython為例

1
2
3
4
5
6
7
8
9
10
11
12
#安裝/反安裝package
pip install ipython
pip uninstall ipython
#找出ipython安裝在哪
pip show --files ipython
#更新package
pip install --upgrade ipython
#列出哪些package需要更新
pip list --outdated

Comment and share

pyenv指令筆記

in python

MAC底下安裝

記得先裝xcode command line tools
pyenv會裝到/usr/local/opt/pyenv

1
brew install pyenv

修改bash_profile加上

~/.bash_profile
1
eval "$(pyenv init -)"

Continue reading

homebrew指令筆記

in mac

安裝

homebrew會裝到/usr/local/

1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

指令

1
2
3
4
5
6
#homebrew檢查
brew doctor
#homebrew更新
brew update
#列出安裝的module
brew list
1
2
3
4
5
6
7
8
9
10
11
12
#module會裝到/usr/local/opt/xxx
#安裝xxx模組
brew install xxx
brew uninstall xxx
#更新xxx模組
brew upgrade xxx
#homebrew在執行upgrade後不會自動將舊版本刪掉[避免某些軟體用絕對路徑相依導致不能使用],需要手動執行以下
#列出cleanup會刪除的formula
brew cleanup -n
#刪除舊版本
brew cleanup [xxx]

Comment and share

Cwza

Hello everyone.
I’m cwza.
Welcome to my blog.


Software Engineer


Taiwan/Taipei