2016/05/03
非管理員權限在透過 homebrew 安裝 robomongo
沒有管理員權限真的是非常的 sucks
還好這世界上還是有優秀的工程師可以繞過去(ex: yoyodiy)
由於 homebrew 沒有 robomongo 的安裝腳本
2016/05/02
sublime 安裝 Package Control
其實這篇蠻廢的
不過常常換個新環境就會忘記 Sublime 的 Package Control 是要另外安裝的XD
1. 到官網依據你的 Sublime Text 選擇適合的腳本
https://packagecontrol.io/installation
2. 按下 ctrl+` 並把剛剛複製的東西貼上執行
3. 重新啟動 Sublime 後, 按下command+shift+p 就可以找到 Package Control 了
非管理員權限在 sublime text 2 安裝 ctags
首先請先參考 非管理員權限在 macOS 安裝 homebrew 與 sublime 安裝 Package Control
將你的 homebrew 安裝起來
接下來就可以利用 brew 安裝 ctags
非管理員權限在 macOS 安裝 homebrew
2019/07/08 更新
由於 homebrew 更新了repository 專案名稱
故原 install.rb 會無法安裝
這邊提供我修改後的版本連結: [install.rb](https://gist.github.com/honomoa/08714fb5b517cc83c063a9337a451470)
---
因為沒有那該死的管理員密碼
所以就要想辦法把所有東西都安裝在家目錄下
1. 首先[下載](https://gist.github.com/honomoa/08714fb5b517cc83c063a9337a451470) 別人處理好的安裝腳本存成 install.rb
```
curl https://gist.githubusercontent.com/honomoa/08714fb5b517cc83c063a9337a451470/raw/6e23f7d73a56dc86e7fa46678b9ce0c7ecb00cdc/install.rb -o install.rb
```
2. 修改第1步驟中的 `YOUR_HOME` 變數改成你自己的家目錄
3. 預先建立目錄
```shell
mkdir -p ~/usr/local
```
4. 執行腳本
```ruby
ruby install.rb
```
5. 新增環境變數 ~/.bash_profile
```shell
export HOMEBREW_PREFIX=${HOME}/usr/local
export PATH=${PATH}:${HOMEBREW_PREFIX}/bin
```
6.
```
source ~/.bash_profile
```
這樣你就可以透過 brew 安裝套件了
參考來源:http://superuser.com/questions/619498/can-i-install-homebrew-without-sudo-privileges
2016/04/29
git 如何移除本地端中 remote 已不存在的 branch
常常我們合併了一個 branch 出去之後必須把該 branch 關掉
通常 git server 都可以在網頁上操作關閉該 branch
可是你的 local 並不會自動移除該 remote branch,所以你下 git remote -a 時就會有一堆你曾經 checkout 過的 branch
可以下
```
git remote prune "你要同步的 remote"
```
他就會把 remote 上不存在的分支從你的本地端移除囉
2016/04/28
2016/04/27
git 好用的 alias
紀錄一下 git 好用的 alias
```
[alias]
co = checkout
ci = commit
di = diff --ignore-space-change --ignore-space-at-eol
st = status -sb
br = branch -v
rt = reset --hard
unstage = reset HEAD
uncommit = reset --soft HEAD^
l = log --pretty=oneline --abbrev-commit --graph --decorate
lg = "log --color --graph --oneline --decorate --pretty=format:'%C(auto)%h%Creset%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
amend = commit --amend
who = shortlog -n -s --no-merges
g = grep -n --color -E
cp = cherry-pick -x
nb = checkout -b
# 'git add -u' handles deleted files, but not new files
# 'git add .' handles any current and new files, but not deleted
# 'git addall' now handles all changes
addall = !sh -c 'git add . && git add -u'
# Handy shortcuts for rebasing
rc = rebase --continue
rs = rebase --skip
ra = rebase --abort
ri = rebase --interactive
logf = log --follow
purge = clean -d -f -x
head = !sh -c 'git clean -d -f -x && git reset --hard HEAD'
```
訂閱:
文章 (Atom)