Last active
October 12, 2017 12:56
-
-
Save ayanamist/7744203 to your computer and use it in GitHub Desktop.
Linux Configurations
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
# Prevent other people access my files | |
umask 077 | |
# If not running interactively, don't do anything | |
case $- in *i*) ;; *) return;; esac | |
# bash keep history | |
HISTFILESIZE=400000000 | |
HISTSIZE=10000 | |
PROMPT_COMMAND="history -a" | |
shopt -s histappend | |
# start tmux | |
export PATH=$HOME/.local/bin:$PATH | |
SESSION=$(id -u $USER) | |
[[ -z "$TMUX" ]] && if tmux has-session -t $SESSION; then exec tmux attach -t $SESSION; else exec tmux new-session -s $SESSION; fi | |
return 0 |
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
[mysql] | |
prompt = \\u@\\d \\R:\\m:\\s> | |
;pager | |
safe-updates | |
default-character-set=utf8 | |
reconnect | |
secure-auth | |
show-warnings | |
compress | |
[client] | |
init-command = 'SET autocommit=0;' |
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
startup_message off | |
altscreen on | |
defscrollback = 99999 | |
term xterm-256color | |
termcapinfo xterm* ti@:te@ | |
zmodem pass | |
caption always "%{-b ..}%-w%{+b ..}[[%n%f*%t]]%{-}%+w" |
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
unbind C-b | |
set -g prefix C-a | |
bind a send-prefix | |
set -g status off | |
set -g history-limit 100000 | |
set-option -g default-shell $HOME/.local/bin/zsh | |
set-window-option -g mode-keys vi | |
set-option -g set-titles on | |
set-option -g set-titles-string '#I.#P #W #T' | |
setw -g aggressive-resize on | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' |
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
colorscheme slate | |
syntax enable | |
set tabstop=4 | |
set softtabstop=4 | |
set expandtab | |
set number | |
set showcmd | |
set cursorline | |
filetype indent on | |
set wildmenu | |
set lazyredraw | |
set showmatch | |
set hlsearch | |
set paste | |
set backspace=2 " backspace in insert mode works like normal editor | |
set foldlevel=99 | |
cmap w!! w !sudo tee > /dev/null % " Allow saving of files as sudo when I forgot to start vim using sudo. |
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
DEBIAN_PREVENT_KEYBOARD_CHANGES=yes | |
HIST_STAMPS="yyyy-mm-dd" | |
TZ=Asia/Shanghai | |
VISUAL=vim | |
EDITOR=vim | |
UAEDITOR=vim | |
EMACS=vim | |
GTK_IM_MODULE=fcitx | |
QT_IM_MODULE=fcitx | |
XMODIFIERS="@im=fcitx" | |
JAVA_HOME="/usr/java/latest" | |
_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=lcd' |
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
# load /etc/profile | |
[[ -s /etc/profile ]] && source /etc/profile | |
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="" | |
DISABLE_AUTO_UPDATE="true" | |
DISABLE_AUTO_TITLE="false" | |
DISABLE_CORRECTION="true" | |
DISABLE_UNTRACKED_FILES_DIRTY="true" | |
plugins=(gitfast colored-man npm extract screen ssh-agent history-substring-search) | |
source $ZSH/oh-my-zsh.sh | |
# Fix robbyrussell/oh-my-zsh#2628 | |
bindkey '\eOA' history-substring-search-up | |
bindkey '\eOB' history-substring-search-down | |
# Theme (from candy) | |
PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%H:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\ | |
%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} ' | |
local return_code="%(?..%{$fg[red]%}%?%{$reset_color%})" | |
RPROMPT="${return_code}" | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
# Aliases | |
alias sudo='sudo -E' | |
alias vi='vim' | |
alias ping='ping -n' | |
alias pbcopy="xclip -selection c" | |
alias pbpaste="xclip -selection clipboard -o" | |
alias nvm-init='export NVM_DIR=$HOME/.nvm && source $NVM_DIR/nvm.sh' | |
umask 077 |
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
daemon=true | |
enable-rpc=true | |
rpc-listen-port=6800 | |
rpc-listen-all=false | |
dir=/tmp/mnt/sda4/data/ | |
log=/opt/var/log/aria2.log | |
log-level=error | |
enable-dht=false | |
auto-save-interval=30 | |
max-concurrent-downloads=1 | |
lowest-speed-limit=1K | |
max-overall-upload-limit=20K | |
max-upload-limit=10K | |
max-connection-per-server=10 | |
rpc-allow-origin-all=true | |
event-poll=epoll | |
disable-ipv6=true | |
file-allocation=none | |
save-session=/opt/tasks.list | |
save-session-interval=1 | |
summary-interval=0 |
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
server { | |
listen 80; | |
server_name opm.ayanamist.com; | |
location /mini5.opera-mini.net:80/ { | |
proxy_pass http://mini5.opera-mini.net:80/; | |
proxy_set_header Host mini5.opera-mini.net:80; | |
} | |
location /mini5-1.opera-mini.net:80/ { | |
proxy_pass http://mini5-1.opera-mini.net:80/; | |
proxy_set_header Host mini5-1.opera-mini.net:80; | |
} | |
} | |
server { | |
listen 80; | |
server_name mini5resource.ayanamist.com; | |
location / { | |
proxy_pass http://mini5resource.opera-mini.net; | |
} | |
} | |
server { | |
listen 80; | |
server_name mini5.ayanamist.com; | |
location / { | |
proxy_pass http://mini5.opera-mini.net; | |
} | |
} | |
server { | |
listen 80; | |
server_name mini5-1.ayanamist.com; | |
location / { | |
proxy_pass http://mini5-1.opera-mini.net; | |
} | |
} | |
server { | |
listen 80; | |
server_name mini5-2.ayanamist.com; | |
location / { | |
proxy_pass http://mini5-2.opera-mini.net; | |
} | |
} | |
server { | |
listen 80; | |
server_name mini5-3.ayanamist.com; | |
location / { | |
proxy_pass http://mini5-3.opera-mini.net; | |
} | |
} | |
server { | |
listen 80; | |
server_name mini5-4.ayanamist.com; | |
location / { | |
proxy_pass http://mini5-4.opera-mini.net; | |
} | |
} | |
server { | |
listen 80; | |
server_name mini5-5.ayanamist.com; | |
location / { | |
proxy_pass http://mini5-5.opera-mini.net; | |
} | |
} |
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
http_port 127.0.0.1:3128 | |
http_access allow all | |
cache deny all | |
icp_port 0 | |
udp_incoming_address 127.0.0.1 | |
via off | |
forwarded_for delete | |
follow_x_forwarded_for deny all | |
reply_header_access X-Cache deny all | |
reply_header_access X-Cache-Lookup deny all | |
dns_nameservers 8.8.8.8 8.8.4.4 | |
dns_timeout 30 seconds | |
positive_dns_ttl 60 seconds | |
negative_dns_ttl 1 seconds | |
# below for reverse proxy | |
http_port 0.0.0.0:80 accel | |
http_access allow all | |
cache_peer server4.operamini.com parent 80 0 originserver proxy-only | |
cache_peer server4-1.operamini.com parent 80 0 originserver proxy-only | |
cache_peer server4-2.operamini.com parent 80 0 originserver proxy-only | |
cache_peer server4-3.operamini.com parent 80 0 originserver proxy-only | |
cache_peer server4-4.operamini.com parent 80 0 originserver proxy-only | |
cache_peer server4-5.operamini.com parent 80 0 originserver proxy-only | |
cache_peer get.geo.opera.com parent 80 0 originserver proxy-only | |
cache_peer mini5.opera-mini.net parent 80 0 originserver proxy-only | |
cache_peer mini5-1.opera-mini.net parent 80 0 originserver proxy-only | |
cache_peer mini5-2.opera-mini.net parent 80 0 originserver proxy-only | |
cache_peer mini5-3.opera-mini.net parent 80 0 originserver proxy-only | |
cache_peer mini5-4.opera-mini.net parent 80 0 originserver proxy-only | |
cache_peer mini5-5.opera-mini.net parent 80 0 originserver proxy-only |
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
socket = l:TCP_NODELAY=1 | |
socket = r:TCP_NODELAY=1 | |
delay = yes | |
debug = 4 | |
output = /var/log/stunnel.log | |
verify = 2 | |
CAfile = /etc/stunnel/ca.crt | |
cert = /etc/stunnel/server.pem | |
[squid] | |
accept = 0.0.0.0:443 | |
connect = 127.0.0.1:3128 | |
verify = 0 | |
; vim:ft=dosini | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment