This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Having to write | |
git pull origin branch_name | |
followed by | |
git add all -A | |
then | |
git commit -m "blaaah blaah" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Standard and additional keybindings | |
# | |
# Find the key with: showkey -a | |
# | |
# ctrl + u : clear line | |
# ctrl + w : delete word backward | |
# alt + d : delete word | |
# ctrl + a : move to beginning of line | |
# ctrl + e : move to end of line (e for end) | |
# alt/ctrl + f : move to next word (f for forward) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http | |
``` | |
git config --global http.proxy http://127.0.0.1:1080 | |
git config --global https.proxy http://127.0.0.1:1080 | |
``` | |
#socket5 | |
``` | |
git config --global http.proxy socks5://127.0.0.1:1080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function proxy_off(){ | |
unset http_proxy | |
unset https_proxy | |
unset socket_proxy | |
echo -e "Proxy Closed!" | |
} | |
function proxy_on() { | |
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" | |
export http_proxy="http://127.0.0.1:1080" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# quick socket5 proxy | |
# set socket5 proxy to $SERVER:$PORT at the browser | |
ssh -D $PORT -f -C -q -N $SERVER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For JAVA_HOME | |
export JAVA_6_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/HOME | |
export JAVA_8_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home | |
export JAVA_9_HOME=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home | |
export JAVA_10_HOME=/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home | |
# Alias for dynamic JDK_HOME | |
alias jdk6='export JAVA_HOME=$JAVA_6_HOME' | |
alias jdk8='export JAVA_HOME=$JAVA_8_HOME' | |
alias jdk9='export JAVA_HOME=$JAVA_9_HOME' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################# | |
# For Proxy | |
# export http_proxy="127.0.0.1:1080" | |
# export http_proxy="socks5://127.0.0.1:1080" | |
# export ALL_PROXY=socks5://127.0.0.1:1080 | |
# alias setproxy="export ALL_PROXY=socks5://127.0.0.1:1080" | |
# alias unsetproxy="unset ALL_PROXY" | |
# alias ip="curl -i http://ip.cn" | |
# export http_proxy="127.0.0.1:1080" | |
# export http_proxy="socks5://127.0.0.1:1080" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OS X Install GnuPG | |
brew install gpg | |
生成自己的钥匙 | |
gpg --gen-key | |
导出公钥 | |
gpg --armor --output filename --export [UID] | |
导入公钥 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From http://pgp.mit.edu/faq.html: | |
You cannot delete keys nor modify UIDs for keys uploaded to PGP key servers. | |
To change your email, you must add a new UID. | |
$ gpg --edit-key <keyID> | |
gpg> adduid | |
Real name: <name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBFsKnlEBEADhxnmK1JaDvOG7G13MQyMEfPd7UwRE8QMdQ+VKttqONefBi6rC | |
xCTn01ivV34TvD7Yur8Se/aDx8EEBbpqv3HZqrCDM0hoyY/V/aC4YcnvgDBE44YK | |
Z2CsINAsyNGfxaXTM/mtyKX1VyRknsMKQNeimMDBzhsocqpWzNjqCGxn0HBLQmxK | |
nHJzhrK7BTO/og1p48laAwoigw/74OeZl20C1+WiZy7zqgTq0Rw27o1bsjhryzRC | |
/xWoKUDjq9pINZcJbOqYCvEd0fSwOd7aRUUdgME0nJqvze4zROvDM1YnZpPEREqh | |
egjxfqRK8r/EA4jiohV7FMU7WJx9lvuB7jPFA2CQ/7HFe0C3rZHL2yTSQDulNkRQ | |
C5LVsNWzxzR3KgPWEn03PpsZeB0cLnxL/jyMm/CH3lkvwsmJNOhoaltjHiYVOqMW | |
u8b9j7Dage7Ve5jnXFtjvIm34PJSdUeTCg4LBHEGrJ3PTDGyjLac2SZy40LrgDG6 |