-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5f5d46a
Showing
27 changed files
with
711 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Robert Pearce | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[user] | ||
name = Robert Pearce | ||
email = me@robertwpearce.com | ||
|
||
[github] | ||
user = rpearce | ||
|
||
[core] | ||
editor = vim | ||
|
||
[credential] | ||
helper = osxkeychain | ||
|
||
[grep] | ||
lineNumber = true | ||
|
||
[help] | ||
autocorrect = 1 | ||
|
||
[fetch] | ||
prune = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
export DOTFILES_DIR | ||
DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# Bunch of symlinks | ||
ln -sfv "$DOTFILES_DIR/runcom/.bash_profile" ~ | ||
ln -sfv "$DOTFILES_DIR/runcom/.inputrc" ~ | ||
ln -sfv "$DOTFILES_DIR/runcom/.ackrc" ~ | ||
ln -sfv "$DOTFILES_DIR/runcom/.gemrc" ~ | ||
ln -sfv "$DOTFILES_DIR/git/.gitconfig" ~ | ||
|
||
# Package managers & packages | ||
|
||
. "$DOTFILES_DIR/install/brew.sh" | ||
. "$DOTFILES_DIR/install/brew-cask.sh" | ||
. "$DOTFILES_DIR/install/git.sh" | ||
. "$DOTFILES_DIR/install/nvm.sh" | ||
. "$DOTFILES_DIR/install/ruby.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
|
||
# Install Caskroom | ||
|
||
brew tap caskroom/cask | ||
brew install brew-cask | ||
brew tap caskroom/versions | ||
|
||
# Apps | ||
apps=( | ||
codekit | ||
dropbox | ||
firefox | ||
flux | ||
google-chrome | ||
keka | ||
ifunbox | ||
iterm2 | ||
licecap | ||
nylas-n1 | ||
psequel | ||
screenhero | ||
skype | ||
sketch | ||
slack | ||
spotify | ||
virtualbox | ||
vlc | ||
) | ||
|
||
# Install apps to /Applications | ||
# Default is: /Users/$user/Applications | ||
echo "Installing apps..." | ||
brew cask install "${apps[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
|
||
# Check for Homebrew and install if we don't have it | ||
|
||
if test ! $(which brew); then | ||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
fi | ||
|
||
brew tap homebrew/versions | ||
brew tap homebrew/dupes | ||
brew install homebrew/dupes/grep | ||
|
||
brew update | ||
brew upgrade | ||
|
||
# Install Terminal Utils | ||
|
||
binaries=( | ||
coreutils # Install GNU core utilities (those that come with OS X are outdated) | ||
findutils # Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed | ||
bash # Install Bash 4 | ||
python | ||
ack | ||
git | ||
hub | ||
rbenv | ||
ruby-build | ||
erlang | ||
elixir | ||
heroku-toolbelt | ||
macvim | ||
neovim/neovim/neovim | ||
postgres | ||
redis | ||
watchman | ||
valgrind | ||
) | ||
|
||
brew install ${binaries[@]} | ||
|
||
brew cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
############################################################################### | ||
# Git Auto-Completion | ||
############################################################################### | ||
|
||
echo "Downloading git-completion script" | ||
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | ||
|
||
############################################################################### | ||
# Git Config & SSH Key Generation | ||
############################################################################### | ||
|
||
echo "Setting up Git Config and SSH Key Gen" | ||
|
||
ssh-keygen -t rsa -C "me@robertwpearce.com" | ||
eval "$(ssh-agent -s)" | ||
ssh-add ~/.ssh/id_rsa | ||
pbcopy < ~/.ssh/id_rsa.pub | ||
|
||
echo "Now go online to GitHub.com > Settings > SSH & GPG Keys > New SSH Key and paste in the copied public key" | ||
echo "***************" | ||
echo "Make sure to create a new GitHub token, as well, and use that as your CLI GitHub Password" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
# Install NVM | ||
|
||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | PROFILE=false bash | ||
|
||
# Install latest node version | ||
|
||
nvm install 7.7.1 | ||
nvm alias default 7.7.1 | ||
|
||
# Install global packages | ||
|
||
packages=( | ||
trash | ||
) | ||
|
||
npm install -g "${packages[@]}" | ||
|
||
# Install yarn | ||
|
||
curl -o- -L https://yarnpkg.com/install.sh | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
rbenv install 2.4.0 | ||
rbenv global 2.4.0 | ||
rbenv rehash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
#!/bin/sh | ||
|
||
# Ask for the administrator password upfront | ||
sudo -v | ||
|
||
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished | ||
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | ||
|
||
############################################################################### | ||
# General UI/UX # | ||
############################################################################### | ||
|
||
# Disable audio feedback when volume is changed | ||
defaults write com.apple.sound.beep.feedback -bool false | ||
|
||
# Disable the sound effects on boot | ||
sudo nvram SystemAudioVolume=" " | ||
|
||
# Restart automatically if the computer freezes | ||
sudo systemsetup -setrestartfreeze on | ||
|
||
# Disable smart quotes as they’re annoying when typing code | ||
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false | ||
|
||
# Disable smart dashes as they’re annoying when typing code | ||
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false | ||
|
||
############################################################################### | ||
# Trackpad, mouse, keyboard, Bluetooth accessories, and input # | ||
############################################################################### | ||
|
||
# Trackpad: enable tap to click for this user and for the login screen | ||
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true | ||
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 | ||
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 | ||
|
||
# Set a blazingly fast keyboard repeat rate | ||
defaults write NSGlobalDomain KeyRepeat -int 1 | ||
defaults write NSGlobalDomain InitialKeyRepeat -int 15 | ||
|
||
############################################################################### | ||
# Screen # | ||
############################################################################### | ||
|
||
# Require password immediately after sleep or screen saver begins | ||
defaults write com.apple.screensaver askForPassword -int 1 | ||
defaults write com.apple.screensaver askForPasswordDelay -int 0 | ||
|
||
# Save screenshots to the desktop | ||
defaults write com.apple.screencapture location -string "${HOME}/Desktop" | ||
|
||
############################################################################### | ||
# Finder # | ||
############################################################################### | ||
|
||
# Finder: show hidden files by default | ||
defaults write com.apple.finder AppleShowAllFiles -bool true | ||
|
||
# Finder: show all filename extensions | ||
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | ||
|
||
# Display full POSIX path as Finder window title | ||
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | ||
|
||
# Avoid creating .DS_Store files on network or USB volumes | ||
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | ||
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true | ||
|
||
# Disable the warning before emptying the Trash | ||
defaults write com.apple.finder WarnOnEmptyTrash -bool false | ||
|
||
############################################################################### | ||
# Dock # | ||
############################################################################### | ||
|
||
# Show indicator lights for open applications in the Dock | ||
defaults write com.apple.dock show-process-indicators -bool true | ||
|
||
# Don’t animate opening applications from the Dock | ||
defaults write com.apple.dock launchanim -bool false | ||
|
||
# Automatically hide and show the Dock | ||
defaults write com.apple.dock autohide -bool true | ||
|
||
# Make Dock icons of hidden applications translucent | ||
defaults write com.apple.dock showhidden -bool true | ||
|
||
# No bouncing icons | ||
defaults write com.apple.dock no-bouncing -bool true | ||
|
||
############################################################################### | ||
# Safari & WebKit # | ||
############################################################################### | ||
|
||
# Privacy: don’t send search queries to Apple | ||
defaults write com.apple.Safari UniversalSearchEnabled -bool false | ||
defaults write com.apple.Safari SuppressSearchSuggestions -bool true | ||
|
||
# Show the full URL in the address bar (note: this still hides the scheme) | ||
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true | ||
|
||
# Set Safari’s home page to `about:blank` for faster loading | ||
defaults write com.apple.Safari HomePage -string "about:blank" | ||
|
||
# Hide Safari’s bookmarks bar by default | ||
defaults write com.apple.Safari ShowFavoritesBar -bool false | ||
|
||
# Disable Safari’s thumbnail cache for History and Top Sites | ||
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 | ||
|
||
# Hide Safari’s sidebar in Top Sites | ||
defaults write com.apple.Safari ShowSidebarInTopSites -bool false | ||
|
||
# Remove useless icons from Safari’s bookmarks bar | ||
defaults write com.apple.Safari ProxiesInBookmarksBar "()" | ||
|
||
# Enable the Develop menu, the Web Inspector, and the debug menu in Safari | ||
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true | ||
defaults write com.apple.Safari IncludeDevelopMenu -bool true | ||
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true | ||
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true | ||
|
||
############################################################################### | ||
# Terminal # | ||
############################################################################### | ||
|
||
# Only use UTF-8 in Terminal.app | ||
defaults write com.apple.terminal StringEncodings -array 4 | ||
|
||
# Use "Pro" theme (black background color) | ||
defaults write com.apple.terminal "Default Window Settings" -string "Pro" | ||
defaults write com.apple.terminal "Startup Window Settings" -string "Pro" | ||
|
||
# Disable audible and visual bells | ||
defaults write com.apple.terminal "Bell" -bool false | ||
defaults write com.apple.terminal "VisualBell" -bool false | ||
|
||
# Disable the annoying line marks | ||
defaults write com.apple.Terminal ShowLineMarks -int 0 | ||
|
||
############################################################################### | ||
# Time Machine # | ||
############################################################################### | ||
|
||
# Disable local Time Machine backups | ||
hash tmutil &> /dev/null && sudo tmutil disablelocal | ||
|
||
# Disable local Time Machine snapshots | ||
sudo tmutil disablelocal | ||
|
||
############################################################################### | ||
# Mac App Store # | ||
############################################################################### | ||
|
||
# Enable the WebKit Developer Tools in the Mac App Store | ||
defaults write com.apple.appstore WebKitDeveloperExtras -bool true | ||
|
||
# Enable Debug Menu in the Mac App Store | ||
defaults write com.apple.appstore ShowDebugMenu -bool true | ||
|
||
# Enable the automatic update check | ||
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true | ||
|
||
# Check for software updates daily, not just once per week | ||
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 | ||
|
||
# Download newly available updates in background | ||
defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 | ||
|
||
# Install System data files & security updates | ||
defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 | ||
|
||
# Turn on app auto-update | ||
defaults write com.apple.commerce AutoUpdate -bool true | ||
|
||
############################################################################### | ||
# Kill affected applications # | ||
############################################################################### | ||
for app in "Address Book" "Calendar" "Contacts" "Dock" "Finder" "Mail" "Safari" "SystemUIServer" "iCal"; do | ||
killall "${app}" &> /dev/null | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
dockutil --no-restart --remove all | ||
|
||
killall Dock |
Oops, something went wrong.