#阿里云 deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
#清华大学 deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
#浙大 deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
#中科大 deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
#官方源 deb http://http.kali.org/kali kali-rolling main non-free contrib deb-src http://http.kali.org/kali kali-rolling main non-free contrib
# !/bin/sh # apt-fast v0.03 by Matt Parnell http://www.mattparnell.com, this thing is fully open-source # if you do anything cool with it, let me know so I can publish or host it for you # contact me at [email protected]
# Special thanks # Travis/travisn000 - support for complex apt-get commands # Allan Hoffmeister - aria2c support # Abhishek Sharma - aria2c with proxy support # Richard Klien - Autocompletion, Download Size Checking (made for on ubuntu, untested on other distros) # Patrick Kramer Ruiz - suggestions - see Suggestions.txt # Sergio Silva - test to see if axel is installed, root detection/sudo autorun
# Use this just like apt-get for faster package downloading.
# Test if the axel is installed if [ ! -x /usr/bin/axel ] then echo "axel is not installed, perform this?(y/n)" read ops case $ops in y) if apt-get install axel -y --force-yes then echo "axel installed" else echo "unable to install the axel. you are using sudo?" ; exit fi ;; n) echo "not possible usage apt-fast" ; exit ;; esac fi
# If the user entered arguments contain upgrade, install, or dist-upgrade if echo "[email protected]" | grep -q "upgrade\|install\|dist-upgrade"; then echo "Working...";
# Go into the directory apt-get normally puts downloaded packages cd /var/cache/apt/archives/;
# Have apt-get print the information, including the URI's to the packages # Strip out the URI's, and download the packages with Axel for speediness # I found this regex elsewhere, showing how to manually strip package URI's you may need...thanks to whoever wrote it apt-get -y --print-uris [email protected] | egrep -o -e "(ht|f)tp://[^\']+" > apt-fast.list && cat apt-fast.list | xargs -l1 axel -a
# Perform the user's requested action via apt-get apt-get [email protected];
echo -e "\nDone! Verify that all packages were installed successfully. If errors are found, run apt-get clean as root and try again using apt-get directly.\n";
" Global Settings: {{{ syntax on " highlight syntax filetype plugin indent on " auto detect file type
set nocompatible " out of Vi compatible mode "set number " show line number set numberwidth=3 " minimal culumns for line numbers set textwidth=0 " do not wrap words (insert) set nowrap " do not wrap words (view) set showcmd " show (partial) command in status line set ruler " line and column number of the cursor position set wildmenu " enhanced command completion set wildmode=list:longest,full " command completion mode set laststatus=2 " always show the status line set mouse= " use mouse in all mode set foldenable " fold lines set foldmethod=marker " fold as marker set noerrorbells " do not use error bell set novisualbell " do not use visual bell set t_vb= " do not use terminal bell
set wildignore=.svn,.git,*.swp,*.bak,*~,*.o,*.a set autowrite " auto save before commands like :next and :make set cursorline set hidden " enable multiple modified buffers set history=1000 " record recent used command history set autoread " auto read file that has been changed on disk set backspace=indent,eol,start " backspace can delete everything set completeopt=menuone,longest " complete options (insert) set pumheight=10 " complete popup height set scrolloff=5 " minimal number of screen lines to keep beyond the cursor set autoindent " automatically indent new line set cinoptions=:0,l1,g0,t0,(0,(s " C kind language indent options set clipboard+=unnamed " shared clipboard set noexpandtab " do not use spaces instead of tabs
set tabstop=4 " number of spaces in a tab set softtabstop=4 " insert and delete space of <tab> set shiftwidth=4 " number of spaces for indent set expandtab " expand tabs into spaces set incsearch " incremental search set hlsearch " highlight search match set ignorecase " do case insensitive matching set smartcase " do not ignore if search pattern has CAPS set nobackup " do not create backup file "set noswapfile " do not create swap file set backupcopy=yes " overwrite the original file
set encoding=utf-8 set termencoding=utf-8 set fileencoding=utf-8 set fileencodings=gb2312,utf-8,gbk,gb18030 set fileformat=unix
set background=dark "colorscheme SolarizedDark_modified "colorscheme wombat_modified " gui settings if has("gui_running") set guioptions-=T " no toolbar set guioptions-=r " no right-hand scrollbar set guioptions-=R " no right-hand vertically scrollbar set guioptions-=l " no left-hand scrollbar set guioptions-=L " no left-hand vertically scrollbar autocmd GUIEnter * simalt ~x " window width and height language messages zh_CN.utf-8 " use chinese messages if has endif
" Restore the last quit position when open file. autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g'\"" | \ endif "}}}
" Key Bindings: {{{ let mapleader = "," let maplocalleader = "\\"
" map : -> <space> map <Space> :
" move between windows nmap <C-h> <C-w>h nmap <C-j> <C-w>j nmap <C-k> <C-w>k nmap <C-l> <C-w>l
" Don't use Ex mode, use Q for formatting map Q gq
" Ctrl-E to switch between 2 last buffers nmap <C-E> :b#<CR>
" ,e to fast finding files. just type beginning of a name and hit TAB nmap <leader>e :e **/
" Make shift-insert work like in Xterm map <S-Insert> <MiddleMouse> map! <S-Insert> <MiddleMouse>
" ,n to get the next location (compilation errors, grep etc) nmap <leader>n :cn<CR> nmap <leader>p :cp<CR>
" Ctrl-N to disable search match highlight nmap <silent> <C-N> :silent noh<CR>
" center display after searching nnoremap n nzz nnoremap N Nzz nnoremap * *zz nnoremap # #zz nnoremap g* g*zz nnoremap g# g#z "}}}
" mru let MRU_Window_Height = 10 nmap <Leader>r :MRU<cr>
" taglist let g:Tlist_WinWidth = 25 let g:Tlist_Use_Right_Window = 0 let g:Tlist_Auto_Update = 1 let g:Tlist_Process_File_Always = 1 let g:Tlist_Exit_OnlyWindow = 1 let g:Tlist_Show_One_File = 1 let g:Tlist_Enable_Fold_Column = 0 let g:Tlist_Auto_Highlight_Tag = 1 let g:Tlist_GainFocus_On_ToggleOpen = 1 nmap <Leader>t :TlistToggle<cr>
" nerdtree let g:NERDTreeWinPos = "right" let g:NERDTreeWinSize = 30 let g:NERDTreeShowLineNumbers = 1 let g:NERDTreeQuitOnOpen = 1 nmap <Leader>f :NERDTreeToggle<CR> nmap <Leader>F :NERDTreeFind<CR>
"paste vmap <C-c> "+y nmap <C-v> "+p set pastetoggle=<F12>
# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples
# If not running interactively, don't do anything case $- in *i*) ;; *) return;; esac
# don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth
# 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
# If set, the pattern "**" used in a pathname expansion context will # match all files and zero or more directories and subdirectories. #shopt -s globstar
# 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;31m\]\[email protected]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else PS1='${debian_chroot:+($debian_chroot)}\[email protected]\h:\w\$ ' fi unset color_prompt force_color_prompt
# If this is an xterm set the title to [email protected]:dir case "$TERM" in xterm*|rxvt*) PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\[email protected]\h: \w\a\]$PS1" ;; *) ;; esac
# colored GCC warnings and errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# 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 -l' alias la='ls -A' alias l='ls -la'
# 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 ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi