Skip to content

Instantly share code, notes, and snippets.

@ryanpcmcquen
Last active February 12, 2024 01:22
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save ryanpcmcquen/b2e608311f286a4ab3e1 to your computer and use it in GitHub Desktop.
Save ryanpcmcquen/b2e608311f286a4ab3e1 to your computer and use it in GitHub Desktop.
.osx
#!/usr/bin/env bash
# curl -o ~/.osx https://gist.githubusercontent.com/ryanpcmcquen/b2e608311f286a4ab3e1/raw/.osx && bash ~/.osx
###############################################################################
# General UI/UX #
###############################################################################
# Disable smart dashes as they’re annoying when typing code.
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Disable automatic periods with a double space:
defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
# Disable smart quotes as they’re annoying when typing code.
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# Set a shorter delay until key repeat:
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Set a blazingly fast keyboard repeat rate:
defaults write NSGlobalDomain KeyRepeat -int 2
##########
# Config #
##########
# Get the command line tools!
[ ! "`xcodebuild -version`" ] && \
xcodebuild -versionxcode-select --install && \
sudo xcodebuild -license accept
# Install homebrew:
[ ! "`which brew`" ] && \
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade && brew upgrade --cask
[ "`which port`" ] && sudo port selfupdate && sudo port upgrade outdated
# Emacs customizations for Prelude:
if [ -d ~/.emacs.d/personal ]; then
curl -o ~/.emacs.d/personal/McQuen.el https://gist.githubusercontent.com/ryanpcmcquen/1ca6d1d7b5c8580aebef4f840e29f83a/raw/McQuen.el
else
curl -o ~/.emacs https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.emacs
fi
# Hammerspoon config:
[ -d ~/.hammerspoon ] && \
curl -o ~/.hammerspoon/init.lua https://gist.githubusercontent.com/ryanpcmcquen/3a745e30455945f43e824f70c645942d/raw/init.lua
# Sublime!
SUBLIME_MERGE_CONFIG_DIR=~/Library/Application\ Support/Sublime\ Merge/Packages/User
if [ -d "${SUBLIME_MERGE_CONFIG_DIR}" ]; then
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeMerge/Preferences.sublime-settings -P "${SUBLIME_MERGE_CONFIG_DIR}"
fi
SUBLIME_TEXT_CONFIG_DIR=~/Library/Application\ Support/Sublime\ Text/Packages/User
if [ -d "${SUBLIME_TEXT_CONFIG_DIR}" ]; then
wget -N https://raw.githubusercontent.com/ryanpcmcquen/sublime_witness/master/Witness.sublime-color-scheme -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/Default.sublime-keymap -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/Default.sublime-mousemap -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/Preferences.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/C.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/C++.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/Doxy.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/SublimeText/orgmode.sublime-settings -P "${SUBLIME_TEXT_CONFIG_DIR}"
fi
# Textadept:
wget -N https://gist.githubusercontent.com/ryanpcmcquen/655cb3cc60f9d064738903e59504a5fd/raw/.installLatestTextadeptMac.sh -P ~/
# Vim!
curl -o ~/.vimrc https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.vimrc
# ZeroBrane Studio config:
[ -d ~/.zbstudio ] && \
curl -o ~/.zbstudio/user.lua https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.zbstudio/user.lua
curl -o /usr/local/bin/sync_all https://gist.githubusercontent.com/ryanpcmcquen/b2e608311f286a4ab3e1/raw/sync_all && chmod +x /usr/local/bin/sync_all
npm update -g
curl -o ~/.osx https://gist.githubusercontent.com/ryanpcmcquen/b2e608311f286a4ab3e1/raw/.osx && bash ~/.osx
git_sync
fl_sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment