Fix issues with backups, tweak vim settings

This commit is contained in:
Andrew Miner
2017-07-24 21:23:29 -07:00
parent dc81e990f1
commit 0484aec9cc
5 changed files with 104 additions and 6 deletions
+2 -3
View File
@@ -10,8 +10,7 @@ STARTED_DATE=$(date)
[[ -x "$BACKUP_COMMANDS" ]] || die "Could not find $BACKUP_COMMANDS"
echo "Starting backup at $STARTED_DATE..."
echo "Mounting backup volume..."
./backup-unmount.sh || die
./backup-mount.sh || die
[[ -d "$LOCAL_MOUNT" ]] || die "Could find $LOCAL_MOUNT"
@@ -29,6 +28,6 @@ if [[ "$?" != 0 ]]; then
tail -n10 "$LOCAL_MOUNT/backup.log"
fi
./backup-unmount.sh || echo "WARNING: Could not unmount $LOCAL_MOUNT! Please check into this!"
#./backup-unmount.sh || echo "WARNING: Could not unmount $LOCAL_MOUNT! Please check into this!"
echo "Finished backing up at $(date)."
+1
View File
@@ -10,3 +10,4 @@ if mount | grep -q "$LOCAL_MOUNT"; then
fi
[[ -e "$LOCAL_MOUNT" ]] && rm -r "$LOCAL_MOUNT"
exit 0
+37
View File
@@ -0,0 +1,37 @@
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "Andrew"
" Normal
hi Normal guifg=#FFFFFF guibg=#000000
" UI Chrome
hi Cursor guifg=#FFFFFF guibg=#000000 gui=NONE
hi CursorLineNr guifg=#FFFFFF guibg=#000000 gui=NONE
hi LineNr guifg=#FFFFFF guibg=#000000 gui=NONE
hi NonText guibg=#000000 gui=NONE
hi Search guifg=#FFFFFF guibg=#000000 gui=NONE
hi ErrorMsg guifg=#FFFFFF guibg=#000000 gui=NONE
hi StatusLine guifg=#FFFFFF guibg=#000000 gui=NONE
hi StatusLineNC guifg=#FFFFFF guibg=#000000 gui=NONE
" Syntax Highlighting
hi Comment guifg=#FFFFFF guibg=#000000 gui=NONE
hi Constant guifg=#FFFFFF guibg=#000000 gui=NONE
hi Function guifg=#FFFFFF guibg=#000000 gui=NONE
hi Identifier guifg=#FFFFFF guibg=#000000 gui=NONE
hi Ignore guifg=#FFFFFF guibg=#000000 gui=NONE
hi Keyword guifg=#FFFFFF guibg=#000000 gui=NONE
hi Number guifg=#FFFFFF guibg=#000000 gui=NONE
hi PreProc guifg=#FFFFFF guibg=#000000 gui=NONE
hi Special guifg=#FFFFFF guibg=#000000 gui=NONE
hi SpecialKey guifg=#FFFFFF guibg=#000000 gui=NONE
hi Statement guifg=#FFFFFF guibg=#000000 gui=NONE
hi String guifg=#FFFFFF guibg=#000000 gui=NONE
hi Todo guifg=#FFFFFF guibg=#000000 gui=NONE
hi Type guifg=#FFFFFF guibg=#000000 gui=NONE
hi Underlined guifg=#FFFFFF guibg=#000000 gui=NONE
+28 -3
View File
@@ -6,16 +6,22 @@ Plug 'ctrlpvim/ctrlp.vim'
Plug 'elzr/vim-json'
Plug 'flazz/vim-colorschemes'
Plug 'godlygeek/tabular'
Plug 'jlanzarotta/bufexplorer'
Plug 'kchmck/vim-coffee-script'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'plasticboy/vim-markdown'
Plug 'scrooloose/nerdtree'
Plug 'statianzo/vim-jade'
call plug#end()
" Execute Basic Setup Commands #########################################################################################
:colorscheme obsidian
set background=dark
:colorscheme golden
" abra alduin badwolf Benokai birds-of-paradise black-angus brogrammer bvemu cabin camo chlordane coffee corporation
" dark-robin feral golden greens kellys liquidcarbon night_vision obsidian solarized
"
:filetype plugin indent on
:hi ColorColumn ctermbg=8
:syntax on
@@ -25,15 +31,17 @@ call plug#end()
:set autoindent
:set autowrite
:set autowriteall
:set background=dark
:set backspace=indent,eol,start
:set cmdheight=2
:set colorcolumn=120
:set cursorline
:set expandtab
:set hlsearch
:set incsearch
:set laststatus=2
:set modelines=2
:set nofoldenable
:set nowrap
:set number
:set path=**
:set ruler
@@ -44,15 +52,32 @@ call plug#end()
:set showmatch
:set smarttab
:set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
:set t_Co=256
:set tabstop=4
:set textwidth=0
:set virtualedit=block
:set visualbell
:set wildignore+=node_modules,log,build,dist
:set wildmode=longest,list
:set nowrap
" Configure Plugins ####################################################################################################
" ctrlpvim/ctrlp.vim
:let g:ctrlp_working_path_mode = 0
:if !empty(glob(".find-ignore"))
: let g:ctrlp_user_command = 'find %s -type f | egrep -v "$(cat .find-ignore)"'
:else
: let g:ctrlp_user_command = 'find %s -type f'
:endif
" elzr/vim-json
:let g:vim_json_syntax_conceal = 0
" godlygeek/tabular
:nmap == :Tabularize /=<CR>
:nmap =: :Tabularize /[^:]*:<CR>
:nmap =or :Tabularize /or<CR>
" nathanaelkane/vim-indent-guides
:let g:indent_guides_enable_on_vim_startup = 0 " :IndentGuidesToggle
+36
View File
@@ -0,0 +1,36 @@
https://apple.stackexchange.com/questions/12387/how-to-send-an-email-from-command-line
1. Open /etc/postfix/main.cf and add the following lines:
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
smtp_use_tls = yes
2. Create /etc/postfix/sasl_password
[smtp.gmail.com]:587 <email>:<password>
3. Change permissions on password file
sudo chmod 600 /etc/postfix/sasl_password
4. Tail the postfix logs.
log stream --predicate '(process == "smtpd") || (process == "smtp")' --info
5. Enable "less-secure" apps
First, send a test message. This message will fail if you haven't given permission for "less
secure" apps. In that case, you'll both get an error message in the log, and you'll get an
email from Google. Follow the link in the email and enable the feature.
If the test message goes through, then your Gmail account was already configured to allow it.
WARNING: This will slightly weaken the security of that account, so it's best not to do this
with an account which can receive sensitive information.