Skip to content

Instantly share code, notes, and snippets.

@jlafitte
Last active August 9, 2022 16:43
Show Gist options
  • Save jlafitte/47abe54162551a00e462 to your computer and use it in GitHub Desktop.
Save jlafitte/47abe54162551a00e462 to your computer and use it in GitHub Desktop.
MacOS Clean Install Procedures
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:~/scripts
export CLICOLOR=1
export LSCOLORS=hxFxBxDxCxegedabagacad
alias dir="ls -lahG"
alias ll="ls -lahG"
alias qws="python -m SimpleHTTPServer"
alias rscp='rsync -aP'
alias rsmv='rsync -aP --remove-source-files'
alias dnsflush='dscacheutil -flushcache;sudo killall -HUP mDNSResponder;echo DNS cache flushed'
alias sedit='sudo nano'
echo "Plan:"
cat ~/.plan
set completion-ignore-case on
set show-all-if-ambiguous on

Clean Install Procedures

These are things I always do with a new clean install of MacOS. Some of these are old and don't always apply, but keeping them here just in case.

I keep all of my AppData in my Google Drive folder which is synced. Google Drive will not sync symbolic links, so you have to keep the actual file in the Google Drive folder, but you can use a symbolic link in the app directory.

  • Install and setup Google Drive, let it sync.
  • Install RDC from the Mac App Store{:target="_blank"}
  • Install Filezilla, preferrably from homebrew cask{:target="_blank"}

Microsoft Remote Desktop

    ln -s /Users/john/Google\ Drive/AppData/com.microsoft.rdc.mac.plist /Users/john/Library/Containers/com.microsoft.rdc.mac/Data/Library/Preferences/com.microsoft.rdc.mac.plist
    sudo killall cfprefsd

Filezilla

    ln -s /Users/john/Google\ Drive/AppData/filezilla /Users/john/.config/
/* This goes into ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
/* home */
"\UF729" = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* end */
"\UF72B" = "moveToEndOfLine:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
/* page up/down */
"\UF72C" = "pageUp:";
"\UF72D" = "pageDown:";
}

Disable Dashboard

In Yosemite+ you no longer need to this. Just turn it off in System Preferences > Mission Control

I've never used this. The Dashboard seems to use a bit of RAM and possibly resources depending what widgets you have on it. I know some people like it, but I like to disable it.

sudo defaults write com.apple.dashboard mcx-disabled -boolean true
killall Dock

Disable Notification Center

I've never used the notification center. The notifications just pile up and I never really see them. I know some people like it, but I like to disable it.

launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist

Log out and back in and notification center should be gone.

Dock Aligment

This doesn't seem to work in Yosemite, and there doesn't yet seem to be another way.

I like for my dock to be on the right and aligned to the top. You can change the position (bottom, left or right) but you can't change the alignment. By default it always aligns in the center.
defaults write com.apple.dock pinning -string start
killall Dock

You can also use 'end' to bottom/right align it.

Java

The information below is really no longer applicable. Java is completely unsupported on Chrome now. Just install java via homebrew and use Firefox when you need it.

Apple doesn't bundle Java anymore, but they do make it available for download. To get it working again (without installing the Oracle version which may or may not work with Chrome):
[Download and install](http://support.apple.com/kb/DL1572){:target="_blank"}
[Follow procedures here](http://support.apple.com/kb/HT5559){:target="_blank"}

Change screenshot location

By default screenshots just get dumped on your desktop. It can be very messy. I like to put it in a screenshots directory.

mkdir ~/Desktop/Screenshots
defaults write com.apple.screencapture location "$HOME/Desktop/Screenshots"

ssh-add command

This adds your SSH key passphrase so you don't know have to always type it in. Do this after copying over your old .ssh or generating a new id.

ssh-add ~/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment