# PS1 with red username (for root)
PS1='\e[0;31m\]\u\e[0m\]@\h:\w\$'
# PS1 with green username (for base user)
PS1='\e[0;32m\]\u\e[0m\]@\h:\w\$'
Vundle: Install and configure Vundle
Vim-Twig Plugin: Install vim-twig and add Plugin 'bundle/vim-twig'
to ~/.vimrc
Add this to /etc/vim/vimrc
or ~/.vimrc
file
set fileencoding=utf-8
set encoding=utf-8
set termencoding=utf-8
" The width of a TAB is set to 4.
" Still it is a \t. It is just that
" Vim will interpret it to be having
" a width of 4.
set tabstop=2
" Indents will have a width of 4
set shiftwidth=2
" Sets the number of columns for a TAB
set softtabstop=2
" Expand TABs to spaces
set expandtab
" Show line numbers
set number
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
# Encrypt passwd.txt
openssl enc -aes-256-cbc -in passwd.txt -out passwd.encrypted
# Decrypt passwd.encrypted
openssl enc -aes-256-cbc -d -in passwd.encrypted > passwd.txt
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON database.* TO 'username'@'localhost' WITH GRANT OPTION;
SHOW GRANTS FOR 'username'@'localhost';
CREATE USER 'backup_user'@'localhost' IDENTIFIED BY 'secret';
GRANT SELECT, SHOW VIEW, LOCK TABLES, RELOAD, REPLICATION CLIENT, EVENT, TRIGGER ON *.* TO 'backup_user'@'localhost';
Enable NCSA Combined Log Format with Virtual Host in Nginx
log_format vcombined '$host:$server_port '
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log /var/log/nginx/access.log vcombined;
error_log /var/log/nginx/error.log;