Skip to content

Instantly share code, notes, and snippets.

@d3v-null
Last active May 9, 2019 00:59
Show Gist options
  • Save d3v-null/774ca913042d4d5222951f80b79fd6c3 to your computer and use it in GitHub Desktop.
Save d3v-null/774ca913042d4d5222951f80b79fd6c3 to your computer and use it in GitHub Desktop.
My macOS setup. Run commands from setup.sh
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# ZSH customization
ZSH_THEME="powerlevel9k/powerlevel9k"
COMPLETION_WAITING_DOTS="true"
HIST_STAMPS="yyyy-mm-dd"
plugins=(git, zsh-autosuggestions, zsh-syntx-highlighting, brew, npm, z, colorize, autopep8, cabal, dirhistory, lein, macports, osx, perl, pep8, python, pip, sublime, taskwarrior, wd, vi-mode, zsh_reload)
bindkey -v
source $ZSH/oh-my-zsh.sh
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Import enviroment
source ~/.env.sh
# handy keybindings
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
bindkey "^K" kill-line
bindkey "^R" history-incremental-search-backward
bindkey "^P" history-search-backward
bindkey "^Y" accept-and-hold
bindkey "^N" insert-last-word
bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy"

Install instructions

** DEPRECATED, USE THIS INSTEAD: https://github.com/derwentx/dotfiles **

Run commands in setup.sh and then follow the steps below for the components that can't be automated. Pay careful attention to the output of Brew since it may require special linking commands

Configure iTerm2 fonts and colours

  curl https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Solarized%20Dark%20-%20Patched.itermcolors -o Solarized\ Dark\ -\ Patched.itermcolors
  open -a iterm Solarized\ Dark\ -\ Patched.itermcolors
  curl https://raw.githubusercontent.com/altercation/solarized/master/iterm2-colors-solarized/Solarized%20Light.itermcolors -o Solarized\ Light.itermcolors
  open -a iterm Solarized\ Light.itermcolors
  curl https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/SourceCodePro/Regular/complete/Sauce%20Code%20Pro%20Nerd%20Font%20Complete%20Mono.ttf -o Library/Fonts/Sauce\ Code\ Pro\ Nerd\ Font\ Complete\ Mono.ttf
  

Enable word jumps

By default, word jumps (option + → or ←) do not work. To enable these, go to "iTerm -> Preferences -> Profiles -> Keys". Press the + sign under the list of key mappings and add the following sequences:

Option + right

⌥→
Send Escape Sequence
f

Option + left

⌥←
Send Escape Sequence
b

Credits

Inspired in part by

# Install Brew
# Check for Homebrew
if test ! $(which brew)
then
echo " Installing Homebrew for you."
xcode-select --install
# Install the correct homebrew for each OS type
if test "$(uname)" = "Darwin"
then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
elif test "$(expr substr $(uname -s) 1 5)" = "Linux"
then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
fi
fi
exit 0
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew doctor
sudo xcodebuild -license accept
# Install Shell
brew install git wget curl
brew install zsh zsh-completions zsh-syntax-highlighting
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
curl -L https://gist.github.com/derwentx/774ca913042d4d5222951f80b79fd6c3/raw/.zshrc -o ~/.zshrc
curl -L https://gist.github.com/derwentx/774ca913042d4d5222951f80b79fd6c3/raw/.env.sh -o ~/.env.sh
# Install Developer stuff
brew install vim emacs tmux
brew cask install iTerm2 github-desktop atom sequel-pro macvim transmit
brew install ctags source-highlight
## Fuck BSD Grep
brew tap homebrew/dupes; brew install grep
# Install security stuff
brew install nmap speedtest_cli htop mtr sqlmap
brew install arp-scan binutils blueutil coreutils gdb nikto
brew cask install wireshark etcher
# Install productivity stuff
brew cask install alfred cheatsheet snip dropbox synergy bettertouchtool
brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json quicklook-csv
# Install other apps
brew cask install google-chrome opera slack
# Install OS Tweaking apps
brew cask install gfxcardstatus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment