Last active
November 14, 2018 07:29
-
-
Save juice500ml/6ac5c71b91125fd016de to your computer and use it in GitHub Desktop.
dotfiles
This file contains 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
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
HISTSIZE=1000 | |
HISTFILESIZE=2000 | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
# make less more friendly for non-text input files, see lesspipe(1) | |
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" | |
# set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# set a fancy prompt (non-color, unless we know we "want" color) | |
case "$TERM" in | |
xterm-color) color_prompt=yes;; | |
esac | |
# uncomment for a colored prompt, if the terminal has the capability; turned | |
# off by default to not distract the user: the focus in a terminal window | |
# should be on the output of commands, not on the prompt | |
#force_color_prompt=yes | |
if [ -n "$force_color_prompt" ]; then | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
# We have color support; assume it's compliant with Ecma-48 | |
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such | |
# a case would tend to support setf rather than setaf.) | |
color_prompt=yes | |
else | |
color_prompt= | |
fi | |
fi | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
fi | |
unset color_prompt force_color_prompt | |
# If this is an xterm set the title to user@host:dir | |
case "$TERM" in | |
xterm*|rxvt*) | |
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" | |
;; | |
*) | |
;; | |
esac | |
################### | |
# COLOR & PS1 # | |
################### | |
COLOR_NONE="\e[0m" | |
BLACK="\033[0;30m" | |
RED="\033[0;31m" | |
GREEN="\033[0;32m" | |
YELLOW="\033[0;33m" | |
BLUE="\033[0;34m" | |
PURPLE="\033[0;35m" | |
CYAN="\033[0;36m" | |
GRAY="\033[0;37m" | |
BOLD_RED="\033[1;31m" | |
BOLD_GREEN="\033[1;32m" | |
BOLD_YELLOW="\033[1;33m" | |
BOLD_BLUE="\033[1;34m" | |
BOLD_PURPLE="\033[1;35m" | |
BOLD_CYAN="\033[1;36m" | |
WHITE="\033[1;37m" | |
# enable color support of ls and also add handy aliases | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
#alias dir='dir --color=auto' | |
#alias vdir='vdir --color=auto' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' | |
fi | |
# some more ls aliases | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias clr='clear' | |
#alias for rm, cp, mv | |
alias rm='rm -iv' | |
alias cp='cp -iv' | |
alias mv='mv -iv' | |
#alias for tmux | |
alias tmux='tmux attach -t basecamp' | |
alias test='./a.out <' | |
alias submit='python .submit.py' | |
alias cspro='ssh [email protected]' | |
alias cspro1='ssh [email protected]' | |
alias cspro2='ssh [email protected]' | |
# Alias definitions. | |
# You may want to put all your additions into a separate file like | |
# ~/.bash_aliases, instead of adding them here directly. | |
# See /usr/share/doc/bash-doc/examples in the bash-doc package. | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi | |
# enable programmable completion features (you don't need to enable | |
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile | |
# sources /etc/bash.bashrc). | |
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then | |
. /etc/bash_completion | |
fi | |
PS1="\n\[$BOLD_GREEN\][\[$BOLD_PURPLE\]\u\[$BOLD_GREEN\]@\[$BOLD_CYAN\]\h:\[$BOLD_RED\]"'`pwd`'"\[$BOLD_GREEN\]] \[$BOLD_GREEN\] \[$GRAY\]\T \n\[$BOLD_GREEN\]\$\[$COLOR_NONE\] " | |
#PS1="\[$BOLD_YELLOW\]\u\[$BOLD_GREEN\]@\[$BOLD_CYAN\]\h:\[$BOLD_RED\]"'`pwd`'" \[$GRAY\]\t\n\[$BOLD_GREEN\]"'\$'"\[$COLOR_NONE\] " | |
export PATH="/home/juice500/Downloads/android-ndk-r10e:$PATH" |
This file contains 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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
" The following are examples of different formats supported. | |
" Keep Plugin commands between vundle#begin/end. | |
" plugin on GitHub repo | |
Bundle 'Lokaltog/vim-powerline.git' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'Valloric/ycmd' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'davidhalter/jedi-vim.git' | |
" colorschemes | |
Plugin 'nanotech/jellybeans.vim' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" To ignore plugin indent changes, instead use: | |
"filetype plugin on | |
" | |
" Brief help | |
" :PluginList - lists configured plugins | |
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate | |
" :PluginSearch foo - searches for foo; append `!` to refresh local cache | |
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal | |
" | |
" see :h vundle for more details or wiki for FAQ | |
" Put your non-Plugin stuff after this line | |
set shiftwidth=2 | |
set ts=2 | |
set ruler | |
set foldmethod=marker | |
highlight Normal ctermfg=100 ctermbg=100 | |
set tabstop=2 | |
set mouse=a | |
set incsearch | |
set expandtab | |
set smarttab | |
set softtabstop=2 | |
set laststatus=2 | |
set autoindent | |
set hi=1000 | |
set title | |
"let g:rehash256 = 1 | |
set hls | |
set scs | |
colorscheme jellybeans | |
set t_Co=256 | |
"syntax on | |
set ignorecase | |
set smartcase | |
set showmatch | |
"set ai | |
set nu | |
" for GNU C indent style | |
"set cindent | |
"set cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 | |
"set shiftwidth=2 | |
"set softtabstop=2 | |
"set textwidth=79 | |
"set fo-=ro fo+=cql | |
map<F2> :q! <CR> | |
map<F3> :vs <CR> | |
map<F4> :w <CR> | |
map<F6> :w <CR> :! gcc -lm -Wall -O3 % && time ./a.out <CR> | |
map<F7> :w <CR> :! g++ -lm -Wall -O3 % && time ./a.out <CR> | |
map<F8> :w <CR> :! g++ -std=c++0x -lm -Wall -O3 % && time ./a.out <CR> | |
map<F9> :w <CR> :! time python % <CR> | |
map<F10> :w <CR> :! time python3 % <CR> | |
cnoreabbrev <expr> W ((getcmdtype() is# ':' && getcmdline() is# 'W')?('w'):('W')) | |
"required for NERDTree | |
"autocmd StdinReadPre * let s:std_in=1 | |
"autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
"autocmd vimenter * NERDTree | |
map <C-n> :NERDTreeToggle<CR> | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif | |
" syntastic settings | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
let g:syntastic_check_on_open = 1 | |
let g:syntastic_check_on_wq = 0 | |
" youcompleteme settings | |
let g:ycm_extra_conf_globlist = ['*'] |
This file contains 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
call plug#begin('~/.vim/plugged') | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'powerline/powerline' | |
Plug 'nanotech/jellybeans.vim' | |
Plug 'vim-scripts/AutoComplPop' | |
Plug 'airblade/vim-gitgutter' | |
" python plugins | |
Plug 'davidhalter/jedi-vim', { 'for': ['python', 'python3'] } | |
Plug 'Rip-Rip/clang_complete', { 'for': ['c', 'cpp'] } | |
" Initialize plugin system | |
call plug#end() | |
set shiftwidth=4 | |
set ts=4 | |
set ruler | |
set foldmethod=marker | |
highlight Normal ctermfg=100 ctermbg=100 | |
set tabstop=4 | |
set mouse=a | |
set incsearch | |
set expandtab | |
set smarttab | |
set softtabstop=4 | |
set laststatus=2 | |
set autoindent | |
set hi=1000 | |
set title | |
"let g:rehash256 = 1 | |
set hls | |
set scs | |
colorscheme jellybeans | |
set t_Co=256 | |
"syntax on | |
set ignorecase | |
set smartcase | |
set showmatch | |
"set ai | |
set nu | |
map<F2> :q! <CR> | |
map<F3> :vs <CR> | |
map<F4> :w <CR> | |
map<F6> :w <CR> :! gcc -lm -Wall -O3 % && time ./a.out <CR> | |
map<F7> :w <CR> :! g++ -lm -Wall -O3 % && time ./a.out <CR> | |
map<F8> :w <CR> :! g++ -std=c++0x -lm -Wall -O3 % && time ./a.out <CR> | |
map<F9> :w <CR> :! time python % <CR> | |
map<F10> :w <CR> :! time python3 % <CR> | |
cnoreabbrev <expr> W ((getcmdtype() is# ':' && getcmdline() is# 'W')?('w'):('W')) | |
"nerdtree | |
map <C-n> :NERDTreeToggle<CR> | |
"jedi-vim | |
let g:pymode_rope = 0 | |
"clang_complete | |
let g:clang_library_path = "/Library/Developer/CommandLineTools/usr/lib/" |
This file contains 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
# Path to your oh-my-zsh installation. | |
export ZSH=/home/juice500/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="alanpeabody-juice500" | |
# 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) | |
# User configuration | |
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" | |
# export MANPATH="/usr/local/man:$MANPATH" | |
source $ZSH/oh-my-zsh.sh | |
# 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='mvim' | |
# fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
# ssh | |
# export SSH_KEY_PATH="~/.ssh/dsa_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 | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
# enable color support of ls and also add handy aliases | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
#alias dir='dir --color=auto' | |
#alias vdir='vdir --color=auto' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' | |
fi | |
# some more ls aliases | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
alias clr='clear' | |
#alias for rm, cp, mv | |
alias rm='rm -iv' | |
alias cp='cp -iv' | |
alias mv='mv -iv' | |
#alias for tmux | |
alias tmux='tmux attach -t basecamp' | |
alias test='./a.out <' | |
alias submit='python .submit.py' | |
alias cspro='ssh [email protected]' | |
alias cspro1='ssh [email protected]' | |
alias cspro2='ssh [email protected]' | |
# env for pyenv | |
export PATH="/home/juice500/.pyenv/bin:$PATH" | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment