diff --git a/.gitconfig b/.gitconfig index 061fa9b..7dd41fc 100644 --- a/.gitconfig +++ b/.gitconfig @@ -7,17 +7,13 @@ [core] excludesfile = ~/.gitignore_global editor = vim -[difftool "sourcetree"] - cmd = opendiff \"$LOCAL\" \"$REMOTE\" - path = -[mergetool "sourcetree"] - cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" - trustExitCode = true + [filter "lfs"] required = true clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process + [gpg] [tag] [alias] @@ -45,6 +41,8 @@ current-branch = branch --show-current stash-unstage = !sh -c 'git stash save --keep-index "Unstage on $(git branch --show-current)"' stash-stage = !sh -c 'git stash save "Staged on $(git branch --show-current)"' + last = log -1 HEAD --stat + qc = !git add -A && git commit -S -m "Quick commit at $(date +\"%Y-%m-%d %H:%M\")" [url "git@github.com"] insteadOf = gh: diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..82e5244 --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +# vim: set ft=make: +include .env +include .env_os + +sync_source = $(MOUNT_PATH)/$(MAIN_USBDRIVE_LABEL) +backup_usb_drive_dest = $(MOUNT_PATH)/$(MAIN_DRIVE_LABEL) + +t: + +test_tar: + tar cvPf omzsh.tar --cd ~/.oh-my-zsh . + +test_tar_gpg: + tar cvPf - --cd ~/.oh-my-zsh . | gpg --symmetric --cipher-algo aes256 --batch --yes --passphrase ${BACKUP_PASSWORD} -o omzsh.tar.gpg + +backup-usb-drive: + tar c --verbose --preserve-permissions --file - --cd $(MOUNT_PATH)/$(MAIN_USBDRIVE_LABEL) \ + --exclude='.fseventsd' \ + --exclude=".DocumentRevisions*" \ + --exclude=".Spotlight*" \ + --exclude='.TemporaryItems' \ + --exclude='.Trashes' \ + . | gpg --symmetric --cipher-algo aes256 --batch --yes --passphrase ${BACKUP_PASSWORD} -o $(backup_usb_drive_dest)/$(MAIN_USBDRIVE_LABEL).tar.gpg + +extract_gpg_tarball: + gpg -d $(input-file) | tar xvfp - -C $(output-dir) + +sync-usb: + rsync --archive --verbose --human-readable --partial --progress --ignore-existing --delete $(args) \ + "$(sync_source)/Pictures/Unsplash" \ + "$(sync_source)/Pictures/Ultrawide Wallpapers" \ + "$(sync_source)/Pictures/macOS Desktop Pictures" \ + "$(sync_source)/Pictures/Ultrawide Wallpapers" \ + ~/Pictures/ + rsync --archive --verbose --human-readable --partial --progress --ignore-existing --delete $(args) \ + "$(sync_source)/UNIX ricing" \ + ~/ + diff --git a/templates/zshenv b/templates/zshenv new file mode 100644 index 0000000..c8733f4 --- /dev/null +++ b/templates/zshenv @@ -0,0 +1,2 @@ +# vim: set ft=sh: +export BACKUP_PASSWORD=