- Backup alfred preferences:
cp '/Users/matt/Library/Application Support/Alfred/Alfred.alfredpreferences/preferences/features/websearch/prefs.plist' config:/alfred/websearch-prefs.plist
- Backup iterm preferences (Profile, keymap, colors)
- TODO roll all this into a script
ssh-keygen -t rsa -b 4096 -C "$(whoami)@$(hostname)"
ssh-keygen -o -a 100 -t ed25519 -C "$(whoami)@$(hostname)"
Put this at the top of ~/.ssh/config
Host *
# For macOS agent
IgnoreUnknown UseKeychain
UseKeychain yes
AddKeysToAgent yes
# General purpose
ServerAliveInterval 60
TCPKeepAlive yes
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# General purpose
brew cask install firefox
brew cask install iterm2
brew cask install keepassxc
brew cask install alfred
brew cask install dropbox
brew cask install spectacle
brew cask install flux
brew cask install spotify
brew cask install google-chrome
brew install defaultbrowser
brew install restic
brew cask install authy
brew install joplin (terminal) # Not using this yet
brew cask install joplin (gui) # Not using this yet
# Development
brew install bash
brew cask install docker
brew install git
brew install coreutils
brew install gnu-sed
brew install thefuck
brew cask install cyberduck
brew install the_silver_searcher
brew install --cask visual-studio-code
brew install --cask db-browser-for-sqlite
# Audio
brew cask install soundflower # Needs kernel permissions
brew install mas
mas install $(mas search amphetamine | head -n 1 | awk '{print $1}')
mas install $(mas search todoist | head -n 1 | awk '{print $1}')
mas install $(mas search 'grand perspective' | head -n 1 | awk '{print $1}')
mas install $(mas search trello | head -n 1 | awk '{print $1}')
-
Aerial Screensaver - https://github.com/JohnCoates/Aerial/releases/latest
-
Krypton CLI -
brew install kryptco/tap/kr
-
Krypton Firefox Extension - https://addons.mozilla.org/en-US/firefox/addon/krypton-authenticator/
# General purpose
alias home='cd /Users/matt'
alias cal9='cal -A4 -B4'
alias cal27='cal -A13 -B13'
alias cpwd='pwd | tr -d "\n" | pbcopy'
alias cpip='wanip | tr -d "\n" | pbcopy'
alias wanip='dig +short myip.opendns.com @resolver1.opendns.com'
alias weather='curl -s wttr.in | grep -v feature | grep -v igor_chubin'
alias la='ls -lA'
alias ls='ls -G'
# macOS
alias delete_ds_store='find . -name '\''.DS_Store'\'' -type f -delete'
alias find_ds_store='find . -name '\''.DS_Store'\'' -type f'
alias finder='open .'
# Development
alias gctc='gradle clean test checkstyleall'
alias gctci='gradle clean test checkstyleall integrationtest checkstyleintegrationtest'
alias shebang='echo '\''#!/usr/bin/env bash'\'''
# Privacy
alias hosts_adblock='sudo rm -f /etc/hosts; sudo cp /etc/hosts_adblock /etc/hosts'
alias hosts_simple='sudo rm -f /etc/hosts; sudo cp /etc/hosts_simple /etc/hosts'
# What branches do I have that origin doesn't?
git_branches_not_on_origin() {
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}'
}
# cd to deepest directory of an absolute file path # https://unix.stackexchange.com/a/403108/15070
cdfile() {
cd -- "$(dirname $1)";
}
cdmktemp() {
cd $(mktemp -d)
}
# make a directory and cd to it # http://unix.stackexchange.com/a/6828/15070
mcd() {
test -d "$1" || mkdir "$1" && cd "$1"
}
# octal permissions on ls
lso() {
ls -l "$@" | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(" %0o ",k);print}';
}
# sha256sum # https://github.com/ESGF/esg-search/issues/84
sha256sum() {
openssl sha256 "$@" | awk '{print $2}';
}
# Recursively get absolute paths for all files and directories in a given directory
fulltree() {
ls -R "$1" | awk '/:$/&&f{s=$0;f=0}/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}NF&&f{ print s"/"$0 }'
}
# Bash history
HISTSIZE=100000
HISTFILESIZE=100000000
HISTIGNORE=ignorespace
These can apparently be done (mostly? completely?) via command line executables/scripts:
- Invert trackpad scrolling
- Turn on three-finger drag (accessibility)
- Turn on silent clicking
- Turn on tap-to-click
- Pick a name for the machine
- Tick show keyboard and emoji viewer in menu bar
- Use F1, F2, etc. keys as standard function keys
- Key repeat: Maximum speed
- Delay until repeat: Second shortest
- Get from back-up
- Add home folder to favourites
- Use home folder as default Finder location
- Show all filename extensions
- Keep folders on top in windows when sorting by name
- Keep folders on top on desktop
- View -> Show Status Bar
- Import web shortcuts from backup ???
- Import preferences from config:/iterm
- Import keymap from config:/iterm
- Preferences -> Profiles -> Shell -> When the shell exits -> Close the window
- Keep messages for one year
- Untick being reachable on email address
- Untick read receipts
- Tick lock database when session locked or lid closed
- Tick hide the entry preview panel
- Remove 'Center' shortcut (it's too useful elsewhere)
- Set up (it's in code/github/something)
- System Preferences -> Security & Privacy -> Full Disk Access -> Add iTerm (needed to write into
~/Pictures/Photos Library.photolibrary
) - Restore everything from NAS