Skip to content

Instantly share code, notes, and snippets.

@notsobad
Last active August 16, 2019 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notsobad/4aa5f337a75223825ca311d525e03b05 to your computer and use it in GitHub Desktop.
Save notsobad/4aa5f337a75223825ca311d525e03b05 to your computer and use it in GitHub Desktop.
#!/bin/bash
cat <<EOF > /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
EOF
cat << EOF > /home/vagrant/.tmux.conf
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Base
set -g history-limit 30000
set -g status-justify left
#set-window-option -g utf8 on
set-window-option -g automatic-rename on
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# Window cycling
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
unbind ^A
bind ^A select-pane -t :.+
bind-key x kill-pane
# Default ctrl+a
bind a send-prefix
# Window color
set -g default-terminal "screen-256color"
set-option -g pane-active-border-fg red
set-window-option -g window-status-current-bg red
set-window-option -g window-status-format ' #I-#W '
set-window-option -g window-status-current-format ' #I-#W '
EOF
cat << EOF >/home/vagrant/.vimrc
set nocompatible
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
syntax on
set hlsearch
colorscheme desert
set autoindent
set nobk
set shiftwidth=4
set softtabstop=4
set tabstop=4
set expandtab
set encoding=utf-8
set helplang=cn
set number
set ttymouse=xterm2
set hls
set ignorecase
set listchars=tab:>-,trail:-
EOF
apt-get update
apt-get install tree curl wget tmux vim build-essential -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment