Skip to content

Instantly share code, notes, and snippets.

@singleghost
Created January 7, 2018 14:06
Show Gist options
  • Save singleghost/d402acde11d740d9443ae89820094994 to your computer and use it in GitHub Desktop.
Save singleghost/d402acde11d740d9443ae89820094994 to your computer and use it in GitHub Desktop.
zsh配置脚本
export PATH=/home/dddong/softwares/node-v8.9.1-linux-x64/bin/:/home/dddong/bin:/home/dddong/third_party/llvm-build/Release+Asserts/bin/:/home/dddong/softwares/depot_tools:~/go/bin:/usr/local/nginx/sbin:/home/dddong/workspace/Android-build/aarch64-linux-android-4.9-ce9d77505072450d2f16a4bf06673f31d8d67ff0/bin:/home/dddong/bin:/usr/local/bin:/usr/local/cbc/bin:$PATH:/home/dddong/softwares/build_chromium/depot_tools
# Path to your oh-my-zsh installation.
export ZSH=/home/dddong/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='vim'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
export MACHOME=/media/psf/Home
export CLANG_LATEST_BIN="/home/dddong/third_party/llvm-build/Release+Asserts/bin/"
alias zshconfig="vi ~/.zshrc"
alias ohmyzsh="vi ~/.oh-my-zsh"
alias findmacro="find /usr/include -iname '*.h' |xargs grep"
alias cdctf="cd $MACHOME/workspace/CTF"
alias grep='grep -i --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}'
alias ll='ls -alh'
alias cbc='cbc -Wa,'\''--32'\'', -Wl,'\''-melf_i386'\'
alias sshali='ssh [email protected]'
alias setproxy='export ALL_PROXY=socks5://127.0.0.1:1081'
alias h='history'
alias egrep='egrep -i --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}'
alias adbuc='adb shell am start -a "android.intent.action.VIEW" -d'
alias df='df -h'
alias du='du -h'
alias gg='git log --oneline --abbrev-commit --all --graph --decorate --color'
alias vimconf='vim ~/.vimrc'
source /etc/profile.d/vte-2.91.sh
if [[ "$OSTYPE" == "linux"* ]]; then
export mac=/media/psf/Home
export ctf=$mac/workspace/CTF/
export cbc=$mac/大学课程/编译原理/
fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
export CHROME_DEVEL_SANDBOX="$PWD/chrome_sandbox"
eval $(thefuck --alias)
#ssh-agent and ssh-add
eval $(ssh-agent) &> /dev/null
ssh-add &> /dev/null
export work=/home/dddong/workspace/poc_in_history/v8/
# Get color support for 'less'
export LESS="-R"
export LESSOPEN='|~/.lessfilter %s'
export LESSCLOSE='~/.lessclose.sh %s %s'
# Use colors for less, man, etc.
#[[ -f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment