My Top Ten:
2061 git 482 ll 165 cd 131 ssh 123 sed 116 vim 106 forever 98 rm 86 brew 84 ls
See Also
https://coderwall.com/p/o5qijwMy Top Ten:
2061 git 482 ll 165 cd 131 ssh 123 sed 116 vim 106 forever 98 rm 86 brew 84 ls
See Also
https://coderwall.com/p/o5qijw簡單比複雜難得多,你必須竭盡全力、理清思路,才能創造簡單。但這絕對值得,因為只有這樣,你才能開闢新世界。
Host mydomain ProxyCommand sh -c "local_command /usr/bin/nc %h %p" Host mydomain Hostname=mokoversity.com IdentityFile=~/.ssh/mokoversity_dsa User=hank PasswordAuthentication=no PubkeyAuthentication=yes
$ wget https://gist.github.com/allenhuang/3792521/raw/bb52568695f9d745004eee87b892637f9d17a771/proxychains4_formula.rb $ mv proxychains4_formula.rb /usr/local/Library/Formula/Proxychains.rb $ brew install --HEAD proxychains
$ vim /usr/local/etc/proxychains.conf
set this line to conf:
socks4 127.0.0.1 8888
ssh -vND 8888 user@socks.server
$ /usr/local/bin/proxychains4 ssh user@remote.server
我其實很少用vim ... 不過有時候在Mac用一下、Linux用一下,覺得沒存一下設定檔不行... 所以慢慢整理一份出來
See Also
http://vim.wikia.com/wiki/Example_vimrc例如測試一行command是不是正確的, 確認之後我想複製起來做筆記或是貼到別地方, 這時候就可以透過pbcopy達到快速複製的效果, 不用再用滑鼠去框。
$ ps -awx
把上一個指令複製到剪貼簿
$ echo "!!" | pbcopy
把上一個指令的最後一個參數複製到剪貼簿
$ echo "!$" | pbcopy
$ git remote -v origin https://github.com/user/repo.git (fetch) origin https://github.com/user/repo.git (push)
$ git remote add upstream https://github.com/otheruser/repo.git
註: upstream 為加入的遠端repo名稱, 可以自取
$ git remote -v origin https://github.com/user/repo.git (fetch) origin https://github.com/user/repo.git (push) upstream https://github.com/otheruser/repo.git (fetch) upstream https://github.com/otheruser/repo.git (push)
$ git fetch upstream remote: Counting objects: 75, done. remote: Compressing objects: 100% (53/53), done. remote: Total 62 (delta 27), reused 44 (delta 9) Unpacking objects: 100% (62/62), done. From https://github.com/otheruser/repo * [new branch] master -> upstream/master
$ git branch -va * master a422352 My local commit remotes/origin/HEAD -> origin/master remotes/origin/master a422352 My local commit remotes/upstream/master 5fdff0f Some upstream commit
$ git merge upstream/master Updating 34e91da..16c56ad Fast-forward README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
$ git status # You have unmerged paths. # (fix conflicts and run "git commit") # # Changes to be committed: # # new file: run.sh # # Unmerged paths: # (use "git add <file>..." to mark resolution) # # both modified: README.md
編輯README.md處理conflict的地方後, 重新commit
$ git add README.md $ git rebase --continue