From 0484aec9cc69ee2b70516487d004db2474ab1754 Mon Sep 17 00:00:00 2001 From: Andrew Miner Date: Mon, 24 Jul 2017 21:23:29 -0700 Subject: [PATCH] Fix issues with backups, tweak vim settings --- bin/backup-run.sh | 5 ++-- bin/backup-unmount.sh | 1 + home/.vim/colors/andrew.vim | 37 +++++++++++++++++++++++++++++ home/.vimrc | 31 +++++++++++++++++++++--- how-to/configure-postfix-on-mac.txt | 36 ++++++++++++++++++++++++++++ 5 files changed, 104 insertions(+), 6 deletions(-) create mode 100644 home/.vim/colors/andrew.vim create mode 100644 how-to/configure-postfix-on-mac.txt diff --git a/bin/backup-run.sh b/bin/backup-run.sh index 117a7c5..aa83fae 100755 --- a/bin/backup-run.sh +++ b/bin/backup-run.sh @@ -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)." diff --git a/bin/backup-unmount.sh b/bin/backup-unmount.sh index 2130e60..7b57441 100755 --- a/bin/backup-unmount.sh +++ b/bin/backup-unmount.sh @@ -10,3 +10,4 @@ if mount | grep -q "$LOCAL_MOUNT"; then fi [[ -e "$LOCAL_MOUNT" ]] && rm -r "$LOCAL_MOUNT" +exit 0 diff --git a/home/.vim/colors/andrew.vim b/home/.vim/colors/andrew.vim new file mode 100644 index 0000000..c36db3d --- /dev/null +++ b/home/.vim/colors/andrew.vim @@ -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 diff --git a/home/.vimrc b/home/.vimrc index 272779a..a3b4186 100644 --- a/home/.vimrc +++ b/home/.vimrc @@ -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 /= +:nmap =: :Tabularize /[^:]*: +:nmap =or :Tabularize /or + +" nathanaelkane/vim-indent-guides :let g:indent_guides_enable_on_vim_startup = 0 " :IndentGuidesToggle diff --git a/how-to/configure-postfix-on-mac.txt b/how-to/configure-postfix-on-mac.txt new file mode 100644 index 0000000..ed3f07a --- /dev/null +++ b/how-to/configure-postfix-on-mac.txt @@ -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 : + +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. + + +