Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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 "[email protected]"]
insteadOf = gh:
Expand Down
38 changes: 38 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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" \
~/

2 changes: 2 additions & 0 deletions templates/zshenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# vim: set ft=sh:
export BACKUP_PASSWORD=