Initial commit; latest versions
This commit is contained in:
60
bash_profile
Normal file
60
bash_profile
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
export PATH=$PATH:/opt/local/bin:/usr/local/lib/io
|
||||||
|
export MANPATH=$MANPATH:/opt/local/share/man
|
||||||
|
export INFOPATH=$INFOPATH:/opt/local/share/info
|
||||||
|
alias gcc="gcc-mp-4.9"
|
||||||
|
alias g++="g++-mp-4.9"
|
||||||
|
alias qmake4="/opt/local/bin/qmake"
|
||||||
|
alias qmake="/usr/local/Qt-5.3.0/bin/qmake"
|
||||||
|
alias python="python3.3"
|
||||||
|
alias cdtan="cd ~/Documents/Code/Github/Detanglement/src"
|
||||||
|
alias cdpy="cd ~/Documents/Code/Github/AudioPython"
|
||||||
|
alias cdpc="cd ~/Documents/Code/PrivCode/"
|
||||||
|
alias cdl="cd ~/Documents/Code/LiveCodingEditor"
|
||||||
|
alias cdg="cd ~/Documents/Code/Github"
|
||||||
|
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
||||||
|
|
||||||
|
case $TERM in
|
||||||
|
screen*)
|
||||||
|
SCREENTITLE='\[\ek\e\\\]\[\ek\W\e\\\]'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SCREENTITLE=''
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
export PS1="${SCREENTITLE}[\u@\h \W]\$ "
|
||||||
|
|
||||||
|
extract(){
|
||||||
|
if [ -f $1 ] ; then
|
||||||
|
case $1 in
|
||||||
|
*.tar.bz2) tar xjf $1 ;;
|
||||||
|
*.tar.gz) tar xzf $1 ;;
|
||||||
|
*.bz2) bunzip2 $1 ;;
|
||||||
|
*.rar) rar x $1 ;;
|
||||||
|
*.gz) gunzip $1 ;;
|
||||||
|
*.tar) tar xf $1 ;;
|
||||||
|
*.tbz2) tar xjf $1 ;;
|
||||||
|
*.tgz) tar xzf $1 ;;
|
||||||
|
*.zip) unzip $1 ;;
|
||||||
|
*.Z) uncompress $1 ;;
|
||||||
|
*.7z) 7z x $1 ;;
|
||||||
|
*) echo "'$1' cannot be extracted via extract()" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "'$1' is not a valid file"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
netinfo(){
|
||||||
|
echo "--------------- Network Information ---------------"
|
||||||
|
/sbin/ifconfig | awk /'inet addr/ {print $2}'
|
||||||
|
/sbin/ifconfig | awk /'Bcast/ {print $3}'
|
||||||
|
/sbin/ifconfig | awk /'inet addr/ {print $4}'
|
||||||
|
/sbin/ifconfig | awk /'HWaddr/ {print $4,$5}'
|
||||||
|
myip=`lynx -dump -hiddenlinks=ignore -nolist http://checkip.dyndns.org:8245/ | sed '/^$/d; s/^[ ]*//g; s/[ ]*$//g' `
|
||||||
|
echo "${myip}"
|
||||||
|
echo "---------------------------------------------------"
|
||||||
|
}
|
||||||
|
|
||||||
|
pinfo(){
|
||||||
|
top -pid `pgrep $1 | tr "\\n" "," | sed 's/,$//' | sed -e's/,/ -pid /g'`
|
||||||
|
}
|
42
gitconfig
Normal file
42
gitconfig
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
[alias]
|
||||||
|
ca = commit -a
|
||||||
|
lol = log --graph --decorate --pretty=oneline --abbrev-commit
|
||||||
|
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
|
||||||
|
|
||||||
|
[apply]
|
||||||
|
whitespace = fix
|
||||||
|
|
||||||
|
[color]
|
||||||
|
branch = auto
|
||||||
|
diff = auto
|
||||||
|
interactive = auto
|
||||||
|
ui = auto
|
||||||
|
status = auto
|
||||||
|
[color "branch"]
|
||||||
|
current = yellow reverse
|
||||||
|
local = yellow
|
||||||
|
remote = green
|
||||||
|
[color "diff"]
|
||||||
|
meta = yellow bold
|
||||||
|
frag = magenta bold
|
||||||
|
old = red bold
|
||||||
|
new = green bold
|
||||||
|
[color "status"]
|
||||||
|
added = yellow
|
||||||
|
changed = green
|
||||||
|
untracked = cyan
|
||||||
|
|
||||||
|
[github]
|
||||||
|
user = hellerve
|
||||||
|
|
||||||
|
[merge]
|
||||||
|
log = true
|
||||||
|
|
||||||
|
[core]
|
||||||
|
excludesfile = /Users/sidharta/.gitignore
|
||||||
|
whitespace = space-before-tabmtrailing-space
|
||||||
|
autocrlf = input
|
||||||
|
|
||||||
|
[user]
|
||||||
|
name = Veit Heller
|
||||||
|
email = s0539501@htw-berlin.de
|
27
gitignore
Normal file
27
gitignore
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
.DS_Store
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
._*
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
|
||||||
|
*.aux
|
||||||
|
*.rel
|
||||||
|
*.log
|
||||||
|
*.pdf
|
||||||
|
*.bbl
|
||||||
|
*.blg
|
||||||
|
*.bcf
|
||||||
|
*.out
|
||||||
|
*.xml
|
||||||
|
*.toc
|
||||||
|
auto/
|
||||||
|
*.synctex.gz
|
||||||
|
|
||||||
|
*.pro.user*
|
||||||
|
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
165
vimrc
Normal file
165
vimrc
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
set history=700
|
||||||
|
filetype plugin on
|
||||||
|
filetype indent on
|
||||||
|
set autoread
|
||||||
|
let mapleader = ","
|
||||||
|
let g:mapleader = ","
|
||||||
|
nmap <leader>w :w!<cr>
|
||||||
|
set so=7
|
||||||
|
set wildmenu
|
||||||
|
set wildignore=*.o,*~,*.pyc
|
||||||
|
set ruler
|
||||||
|
set cmdheight=2
|
||||||
|
set hid
|
||||||
|
set backspace=eol,start,indent
|
||||||
|
set whichwrap+=<,>,h,l
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
set hlsearch
|
||||||
|
set incsearch
|
||||||
|
set lazyredraw
|
||||||
|
set magic
|
||||||
|
set showmatch
|
||||||
|
set mat=2
|
||||||
|
set noerrorbells
|
||||||
|
set novisualbell
|
||||||
|
set t_vb=
|
||||||
|
set tm=500
|
||||||
|
syntax enable
|
||||||
|
colorscheme desert
|
||||||
|
set background=dark
|
||||||
|
if has("gui_running")
|
||||||
|
set guioptions-=T
|
||||||
|
set guioptions+=e
|
||||||
|
set t_Co=256
|
||||||
|
set guitablabel=%M\ %t
|
||||||
|
endif
|
||||||
|
set encoding=utf8
|
||||||
|
set ffs=unix,dos,mac
|
||||||
|
set nobackup
|
||||||
|
set nowb
|
||||||
|
set noswapfile
|
||||||
|
set expandtab
|
||||||
|
set smarttab
|
||||||
|
set shiftwidth=4
|
||||||
|
set tabstop=4
|
||||||
|
set lbr
|
||||||
|
set tw=500
|
||||||
|
set ai "Auto indent
|
||||||
|
set si "Smart indent
|
||||||
|
set wrap "Wrap lines
|
||||||
|
vnoremap <silent> * :call VisualSelection('f')<CR>
|
||||||
|
vnoremap <silent> # :call VisualSelection('b')<CR>
|
||||||
|
map j gj
|
||||||
|
map k gk
|
||||||
|
map <space> /
|
||||||
|
map <c-space> ?
|
||||||
|
map <silent> <leader><cr> :noh<cr>
|
||||||
|
map <C-j> <C-W>j
|
||||||
|
map <C-k> <C-W>k
|
||||||
|
map <C-h> <C-W>h
|
||||||
|
map <C-l> <C-W>l
|
||||||
|
map <leader>bd :Bclose<cr>
|
||||||
|
map <leader>ba :1,1000 bd!<cr>
|
||||||
|
map <leader>tn :tabnew<cr>
|
||||||
|
map <leader>to :tabonly<cr>
|
||||||
|
map <leader>tc :tabclose<cr>
|
||||||
|
map <leader>tm :tabmove
|
||||||
|
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
|
||||||
|
map <leader>cd :cd %:p:h<cr>:pwd<cr>
|
||||||
|
try
|
||||||
|
set switchbuf=useopen,usetab,newtab
|
||||||
|
set stal=2
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
|
autocmd BufReadPost *
|
||||||
|
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||||
|
\ exe "normal! g`\"" |
|
||||||
|
\ endif
|
||||||
|
set viminfo^=%
|
||||||
|
set laststatus=2
|
||||||
|
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l/%L\ \ Column:\ %c
|
||||||
|
map 0 ^
|
||||||
|
nmap <M-j> mz:m+<cr>`z
|
||||||
|
nmap <M-k> mz:m-2<cr>`z
|
||||||
|
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
|
||||||
|
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
|
||||||
|
if has("mac") || has("macunix")
|
||||||
|
nmap <D-j> <M-j>
|
||||||
|
nmap <D-k> <M-k>
|
||||||
|
vmap <D-j> <M-j>
|
||||||
|
vmap <D-k> <M-k>
|
||||||
|
endif
|
||||||
|
func! DeleteTrailingWS()
|
||||||
|
exe "normal mz"
|
||||||
|
%s/\s\+$//ge
|
||||||
|
exe "normal `z"
|
||||||
|
endfunc
|
||||||
|
autocmd BufWrite *.py :call DeleteTrailingWS()
|
||||||
|
autocmd BufWrite *.coffee :call DeleteTrailingWS()
|
||||||
|
vnoremap <silent> gv :call VisualSelection('gv')<CR>
|
||||||
|
map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
|
||||||
|
map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>
|
||||||
|
vnoremap <silent> <leader>r :call VisualSelection('replace')<CR>
|
||||||
|
map <leader>cc :botright cope<cr>
|
||||||
|
map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg
|
||||||
|
map <leader>n :cn<cr>
|
||||||
|
map <leader>p :cp<cr>
|
||||||
|
map <leader>ss :setlocal spell!<cr>
|
||||||
|
map <leader>sn ]s
|
||||||
|
map <leader>sp [s
|
||||||
|
map <leader>sa zg
|
||||||
|
map <leader>s? z=
|
||||||
|
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
|
||||||
|
map <leader>q :e ~/buffer<cr>
|
||||||
|
map <leader>pp :setlocal paste!<cr>
|
||||||
|
function! CmdLine(str)
|
||||||
|
exe "menu Foo.Bar :" . a:str
|
||||||
|
emenu Foo.Bar
|
||||||
|
unmenu Foo
|
||||||
|
endfunction
|
||||||
|
function! VisualSelection(direction) range
|
||||||
|
let l:saved_reg = @"
|
||||||
|
execute "normal! vgvy"
|
||||||
|
|
||||||
|
let l:pattern = escape(@", '\\/.*$^~[]')
|
||||||
|
let l:pattern = substitute(l:pattern, "\n$", "", "")
|
||||||
|
|
||||||
|
if a:direction == 'b'
|
||||||
|
execute "normal ?" . l:pattern . "^M"
|
||||||
|
elseif a:direction == 'gv'
|
||||||
|
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.')
|
||||||
|
elseif a:direction == 'replace'
|
||||||
|
call CmdLine("%s" . '/'. l:pattern . '/')
|
||||||
|
elseif a:direction == 'f'
|
||||||
|
execute "normal /" . l:pattern . "^M"
|
||||||
|
endif
|
||||||
|
|
||||||
|
let @/ = l:pattern
|
||||||
|
let @" = l:saved_reg
|
||||||
|
endfunction
|
||||||
|
function! HasPaste()
|
||||||
|
if &paste
|
||||||
|
return 'PASTE MODE '
|
||||||
|
en
|
||||||
|
return ''
|
||||||
|
endfunction
|
||||||
|
command! Bclose call <SID>BufcloseCloseIt()
|
||||||
|
function! <SID>BufcloseCloseIt()
|
||||||
|
let l:currentBufNum = bufnr("%")
|
||||||
|
let l:alternateBufNum = bufnr("#")
|
||||||
|
|
||||||
|
if buflisted(l:alternateBufNum)
|
||||||
|
buffer #
|
||||||
|
else
|
||||||
|
bnext
|
||||||
|
endif
|
||||||
|
|
||||||
|
if bufnr("%") == l:currentBufNum
|
||||||
|
new
|
||||||
|
endif
|
||||||
|
|
||||||
|
if buflisted(l:currentBufNum)
|
||||||
|
execute("bdelete! ".l:currentBufNum)
|
||||||
|
endif
|
||||||
|
endfunction
|
Reference in New Issue
Block a user