A .offlineimaprc => .offlineimaprc +61 -0
@@ 0,0 1,61 @@
+[general]
+# List of accounts to be synced, separated by a comma.
+accounts = zah_andrewzah,gmail,junk_andrewzah
+
+[Account gmail]
+localrepository = gmail-local
+remoterepository = gmail-remote
+
+[Account zah_andrewzah]
+localrepository = zah_andrewzah-local
+remoterepository = zah_andrewzah-remote
+
+[Account junk_andrewzah]
+localrepository = junk_andrewzah-local
+remoterepository = junk_andrewzah-remote
+
+[Repository gmail-local]
+type = Maildir
+localfolders = /mnt/mail/gmail
+
+[Repository gmail-remote]
+type = Gmail
+sslcacertfile = /usr/local/share/certs/ca-root-nss.crt
+remoteuser = zah.andrew@gmail.com
+remotepassfile = /config/creds/gmail.pass
+maxconnections = 1
+readonly = true
+nametrans = lambda folder: {'[Gmail]/Drafts': 'drafts',
+ '[Gmail]/Sent Mail': 'sent',
+ '[Gmail]/Starred': 'flagged',
+ '[Gmail]/Important': 'important',
+ '[Gmail]/Spam': 'spam',
+ '[Gmail]/Trash': 'trash',
+ '[Gmail]/All Mail': 'archive',
+ }.get(folder, folder)
+
+[Repository zah_andrewzah-local]
+type = Maildir
+localfolders = /mnt/mail/zah_andrewzah
+
+[Repository zah_andrewzah-remote]
+type = IMAP
+sslcacertfile = /usr/local/share/certs/ca-root-nss.crt
+remotehost = mail.gandi.net
+remoteuser = zah@andrewzah.com
+remotepassfile = /config/creds/zah_andrewzah.pass
+maxconnections = 1
+readonly = true
+
+[Repository junk_andrewzah-local]
+type = Maildir
+localfolders = /mnt/mail/junk_andrewzah
+
+[Repository junk_andrewzah-remote]
+type = IMAP
+sslcacertfile = /usr/local/share/certs/ca-root-nss.crt
+remotehost = mail.gandi.net
+remoteuser = junk@andrewzah.com
+maxconnections = 1
+readonly = true
+remotepassfile = /config/creds/junk_andrewzah.pass
A .ssh-config => .ssh-config +14 -0
@@ 0,0 1,14 @@
+Host freenas.local
+ HostName 192.168.1.13
+
+Host andrewzah.com
+ User deploy
+ Port 2223
+
+Host *
+ Cipher aes128-ctr
+
+Host *
+ ControlPath ~/.ssh/%C.sock
+ ControlMaster auto
+ ControlPersist 10m
M config/nvim/init.vim => config/nvim/init.vim +1 -0
@@ 41,6 41,7 @@ Plug 'radenling/vim-dispatch-neovim'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-fugitive'
+Plug 'vim-scripts/VisIncr'
"Plug 'w0rp/ale'
"" og theme
A scripts/mailrun.sh => scripts/mailrun.sh +28 -0
@@ 0,0 1,28 @@
+#!/usr/bin/env bash
+
+# Check every ten seconds if the process identified as $1 is still
+# running. After 5 checks (~60 seconds), kill it. Return non-zero to
+# indicate something was killed.
+monitor() {
+ local pid=$1 i=0
+
+ while ps $pid &>/dev/null; do
+ if (( i++ > 5 )); then
+ echo "Max checks reached. Sending SIGKILL to ${pid}..." >&2
+ kill -9 $pid; return 1
+ fi
+
+ sleep 10
+ done
+
+ return 0
+}
+
+read -r pid < ~/.offlineimap/pid
+
+if ps $pid &>/dev/null; then
+ echo "Process $pid already running. Exiting..." >&2
+ exit 1
+fi
+
+offlineimap -c /config/.offlineimaprc -o -u quiet & monitor $!
M zsh/aliases.zsh => zsh/aliases.zsh +1 -0
@@ 25,3 25,4 @@ alias cdr='~/Work/repos'
alias cda='~/Work/repos/cyber/cyber-server/api-server'
alias cdp='~/Programming'
+alias cdw='~/Website'
M zsh/path-exports-options.zsh => zsh/path-exports-options.zsh +3 -0
@@ 18,6 18,9 @@ export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
+# anaconda
+export PATH=/home/andrew/anaconda3/bin:$PATH
+
# nix
source ~/.nix-profile/etc/profile.d/nix.sh