1
mirror of https://github.com/jakejarvis/dotfiles.git synced 2025-04-25 15:35:21 -04:00

Look mom, I finally have a *real* dotfiles repo like the cool kids! 😎

This commit is contained in:
Jake Jarvis 2019-09-07 21:26:10 -04:00
parent f763a1b3cd
commit 2c71836ba6
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
31 changed files with 1818 additions and 509 deletions

View File

@ -1,3 +0,0 @@
[default]
output = text
region = us-east-1

View File

@ -1,15 +0,0 @@
[user]
email = jakejarvis@gmail.com
name = Jake Jarvis
signingkey = D36CB66F4002B25B
[commit]
gpgsign = true
[core]
excludesfile = ~/.gitignore_global
editor = nano
[push]
default = current
[credential]
helper = osxkeychain
[github]
user = jakejarvis

1
.gitignore vendored
View File

@ -1,2 +1 @@
.aws/credentials
.bash_private

6
.gitmodules vendored Normal file
View File

@ -0,0 +1,6 @@
[submodule "zsh/plugins/zsh-autosuggestions"]
path = zsh/plugins/zsh-autosuggestions
url = https://github.com/zsh-users/zsh-autosuggestions.git
[submodule "zsh/plugins/zsh-syntax-highlighting"]
path = zsh/plugins/zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting.git

View File

@ -1,4 +0,0 @@
# The mere presence of this file in the home directory disables the system
# copyright notice, the date and time of the last login, the message of the
# day as well as other information that may otherwise appear on login.
# See `man login`.

11
.nanorc
View File

@ -1,11 +0,0 @@
# syntax highlighting
# clone from https://github.com/scopatz/nanorc
include "~/.nano/syntax/*.nanorc"
# options
set const
set mouse
set smooth
set multibuffer
set tabstospaces
set tabsize 2

11
.npmrc
View File

@ -1,11 +0,0 @@
npm config set registry "https://registry.npmjs.com/"
npm config set loglevel="warn"
npm config set send-metrics=false
npm config set save=true
npm config set editor="nano"
npm config set init-author-name "Jake Jarvis"
npm config set init-author-email "jake@jarv.is"
npm config set init-author-url "https://jarv.is/"
npm config set init-license "MIT"
npm config set init-version "0.0.1"

253
.zshrc
View File

@ -1,253 +0,0 @@
# debug zsh startup time
# uncomment following line and run: zsh -ic zprof
# zmodload zsh/zprof
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH"
export PATH="/usr/local/bin:$PATH"
export PATH=$PATH:"$HOME/bin"
export PATH=$PATH:"$(go env GOPATH)/bin"
export PATH=$PATH:"$HOME/adt-bundle-mac/sdk/platform-tools"
export PATH=$PATH:"$HOME/.fastlane/bin"
export PATH=$PATH:"/opt/metasploit-framework/bin"
# export PATH=$PATH:"/usr/local/opt/mongodb@3.2/bin"
# export PATH=$PATH:"/Users/jake/Library/Python/3.7/bin"
export PATH="/usr/local/opt/ruby/bin:$PATH"
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
# eval $(thefuck --alias) # https://github.com/nvbn/thefuck
export NVM_DIR="$HOME/.nvm"
#[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
#[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion
# NVM makes zsh startup suuuuuuuuuper slow -- commented out above lines to speed up and 'loadnvm' loads NVM when needed
alias loadnvm='[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"; [ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion"'
# Path to your oh-my-zsh installation.
export ZSH="/Users/jake/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
#ZSH_THEME="robbyrussell"
ZSH_THEME="agnoster"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
# colored-man-pages
colorize
pip
python
brew
osx
zsh-syntax-highlighting
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
export VISUAL="nano"
export EDITOR="nano"
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSECURE_REDIRECT=1
export HOMEBREW_CASK_OPTS=--require-sha
# Enable aliases to be sudo'ed
alias sudo="sudo "
alias ll="ls -lah"
alias la="ls -a"
alias l="ls -lh"
alias cd..="cd .."
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias ~="cd ~"
#alias ip="dig +short myip.opendns.com A @resolver1.opendns.com"
#alias ipv4="dig +short myip.opendns.com A @resolver1.opendns.com"
#alias ipv6="dig +short -6 myip.opendns.com AAAA @resolver1.ipv6-sandbox.opendns.com"
alias ip="ipv4"
alias ipv4="curl -4 icanhazip.com"
alias ipv6="curl -6 icanhazip.com"
alias iplocal="ipconfig getifaddr en0"
alias dns-clear="networksetup -setdnsservers Wi-Fi"
alias dns-check="networksetup -getdnsservers Wi-Fi"
alias dns-set="networksetup -setdnsservers Wi-Fi "
alias dns-set-cloudflare="dns-set 1.1.1.1 1.0.0.1"
alias dns-set-google="dns-set 8.8.8.8 8.8.4.4"
alias flush="sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache"
alias serve="echo 'Starting server at http://127.0.0.1:8000/ ...'; python3 -m http.server"
alias hosts="sudo $EDITOR /etc/hosts"
alias speed="wget -O /dev/null http://cachefly.cachefly.net/100mb.test"
alias digg="dig @8.8.8.8 +nocmd any +multiline +noall +answer"
alias unhide="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
alias rehide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
alias forcetrash="sudo rm -rf ~/.Trash /Volumes/*/.Trashes"
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
alias displays="system_profiler SPDisplaysDataType"
alias cpu="sysctl -n machdep.cpu.brand_string"
alias screenfetch="neofetch"
alias killfinder="killall Finder"
alias killdock="killall Dock"
alias killmenubar="killall SystemUIServer NotificationCenter"
alias killos="killfinder && killdock && killmenubar"
alias update="brew update; brew upgrade; brew cleanup; nvm install node --latest-npm --reinstall-packages-from=node; npm install npm -g; npm update -g; gem update --system; gem update; gem cleanup" # sudo softwareupdate -i -a;
alias dc="docker-compose"
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to pasteboard.'"
alias gundo="git reset --soft HEAD~1"
alias gac="git add . && git commit -m "
alias gs="git status -sb"
alias gd="git diff"
alias vs="code ./"
alias ios="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"
alias watchos="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator\ \(Watch\).app"
alias sshalt="ssh -p 2222"
alias moshalt="mosh --ssh=\"ssh -p 2222\""
alias finder="open ."
alias unq="sudo xattr -rd com.apple.quarantine"
alias weather="curl -4 http://wttr.in/Boston"
push_ssh_cert() {
local _host
test -f ~/.ssh/id_rsa.pub || ssh-keygen -t rsa
for _host in "$@";
do
echo $_host
ssh $_host 'cat >> ~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub
done
}
# Find the real location of a short URL
unshorten() {
curl -sIL $1 | sed -n 's/Location: *//p'
}
s3ls() {
aws s3 ls s3://$1
}
docker-bash() {
docker exec -ti $1 /bin/bash
}
mkcd() {
mkdir -p -- "$1" &&
cd -P -- "$1"
}

View File

@ -1,12 +0,0 @@
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/Users/jake/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall

301
Brewfile Normal file
View File

@ -0,0 +1,301 @@
###############################
# Taps #
###############################
tap "aws/tap"
tap "caskroom/cask"
tap "cloudflare/cloudflare"
tap "exolnet/deprecated"
tap "facebook/fb"
tap "heroku/brew"
tap "hhvm/hhvm"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "homebrew/services"
tap "mongodb/brew"
tap "thoughtbot/formulae"
tap "wpengine/wpe-cli"
cask_args appdir: '/Applications'
###############################
# Binaries #
###############################
# Perhaps most importantly...
brew "zsh"
# Better bash as a backup
brew "bash"
brew "bash-completion"
# GNU utilities (those that come with macOS are outdated)
brew "coreutils"
brew "moreutils"
brew "findutils"
brew "gnu-sed", args: ["with-default-names"]
# wget with IRI support
brew "wget", args: ["with-iri"]
# GnuPG to enable PGP-signing commits
brew "gnupg"
# More recent versions of some macOS tools
brew "vim" #, args: ["with-override-system-vi"]
brew "grep"
brew "openssh"
brew "screen"
brew "gmp"
# Other useful binaries
brew "ack"
brew "gs"
brew "imagemagick", args: ["with-webp"]
brew "ffmpeg", args: ["with-libvpx"]
brew "lua"
brew "lynx"
brew "mtr"
brew "p7zip"
brew "pigz"
brew "pv"
brew "rename"
brew "rlwrap"
brew "ssh-copy-id"
brew "tree"
brew "vbindiff"
brew "zopfli"
brew "the_silver_searcher"
# Git
brew "git"
brew "git-lfs"
brew "git-crypt"
# Node & NPM / NVM
brew "node"
brew "nvm"
# Mostly ordinary binaries
brew "amazon-ecs-cli"
brew "aws/tap/aws-sam-cli"
brew "aws-shell"
brew "awscli"
brew "angular-cli"
brew "asciinema"
brew "azure-cli"
brew "caddy"
brew "carthage"
brew "cli53"
brew "cloudflare/cloudflare/cloudflared"
brew "cocoapods"
brew "composer"
brew "dnsmasq"
brew "doctl"
brew "elixir"
brew "erlang"
brew "fbsimctl"
brew "geoip"
brew "gitlab-runner"
brew "go"
brew "govendor"
brew "heroku"
brew "heroku-node"
brew "hhvm"
brew "htop"
brew "httrack"
brew "hub"
brew "hugo"
brew "hydra"
brew "iproute2mac"
brew "jq"
brew "kubernetes-cli"
brew "kubernetes-helm"
brew "mcrypt"
brew "mhash"
brew "mkcert"
# brew "mongodb"
brew "mongodb/brew/mongodb-community"
brew "mosh"
brew "mysql"
brew "mysql-client"
brew "ncurses"
brew "neofetch"
brew "netcat"
brew "openvpn"
brew "optipng"
brew "packer"
brew "thoughtbot/formulae/parity"
brew "php" # = php@7.3 https://formulae.brew.sh/formula/php
brew "php@7.1"
brew "php@7.2"
# brew "exolnet/deprecated/php@5.6"
# brew "exolnet/deprecated/php@7.0"
brew "pngcheck"
brew "pngcrush"
brew "postgresql"
brew "python"
brew "python@2"
brew "ruby"
brew "ruby-build"
brew "rbenv"
brew "rclone"
brew "s3fs"
brew "serverless"
brew "speedtest-cli"
brew "sqlite"
brew "sub2srt"
brew "terraform"
brew "tor"
brew "torsocks"
brew "travis"
brew "typescript"
brew "unrar"
brew "watchman"
brew "whois"
brew "wireguard-tools"
brew "wireguard-go"
brew "wp-cli"
brew "wpengine/wpe-cli/wpe-cli"
brew "xz"
brew "yarn"
brew "youtube-dl"
brew "yuicompressor"
# Android SDK
brew "ant"
brew "maven"
brew "gradle"
cask "android-sdk"
# cask "android-ndk"
cask "android-platform-tools"
# Pentesting tools
brew "aircrack-ng"
brew "bfg"
brew "binutils"
brew "binwalk"
brew "cifer"
brew "dex2jar"
brew "dns2tcp"
brew "fcrackzip"
brew "foremost"
brew "hashpump"
brew "hydra"
brew "john"
brew "knock"
brew "netpbm"
brew "nmap"
brew "pdfcrack"
brew "pngcheck"
brew "socat"
brew "sqlmap"
brew "tcpflow"
brew "tcpreplay"
brew "tcptrace"
brew "xpdf"
brew "bettercap"
brew "hashcat"
brew "nikto"
brew "tcpdump"
###############################
# macOS Apps #
###############################
# System Utilities
cask "osxfuse"
cask "backblaze"
cask "backblaze-downloader"
cask "carbon-copy-cloner"
cask "cleanmymac"
cask "coconutbattery"
cask "daisydisk"
cask "duet"
cask "endurance"
cask "etrecheckpro"
cask "filebot"
cask "geekbench"
cask "paragon-ntfs"
cask "the-unarchiver"
cask "transmission"
cask "unetbootin"
cask "vnc-viewer"
# Passwords, VPNs, other Security
cask "1password"
cask "authy"
cask "gpg-suite-no-mail" # Install Mail separately: https://github.com/GpgMailNoActivation/GpgMailNoActivation
cask "keybase"
cask "little-snitch"
cask "nordvpn"
cask "tor-browser"
cask "tunnelblick"
# Development
cask "chromedriver"
cask "eclipse-java"
cask "filezilla"
cask "github"
cask "glyphs"
cask "imageoptim"
cask "intellij-idea"
cask "iterm2"
cask "postman"
cask "robo-3t"
cask "sequel-pro"
cask "transmit"
cask "visual-studio-code"
cask "visual-studio"
# Virtual Machines (& Docker)
cask "docker"
cask "virtualbox"
cask "virtualbox-extension-pack"
cask "vmware-fusion"
# Media
cask "beamer"
cask "handbrake"
cask "iina"
cask "plex-media-player"
cask "pocket-casts"
cask "spotify"
cask "vlc"
# Communication/Social
cask "discord"
cask "skype"
cask "slack"
cask "whatsapp"
cask "zoomus"
# Gaming
cask "steam"
cask "nvidia-geforce-now"
# Pentesting
cask "burp-suite"
cask "charles"
cask "metasploit"
cask "wifi-explorer"
cask "wireshark"
# QuickLook Extensions
cask "qlstephen"
cask "qlvideo"
# Browsers (for reference only -- install these via offline DMGs no matter what)
# * Firefox
# - Stable
# - Dev: https://www.mozilla.org/en-US/firefox/developer/
# - Nightly: https://www.mozilla.org/en-US/firefox/channel/desktop/
# * Chrome
# - Stable
# - Canary: https://www.google.com/chrome/canary/
# * Safari
# - Preview: https://developer.apple.com/safari/technology-preview/

21
LICENSE.md Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Jake Jarvis
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.

View File

@ -1,7 +1,16 @@
# My .files 🏡
Just a personal backup of my MacBook's setup. Certainly not a drop-in solution for anybody's machine except my own, but maybe a few lines will prove useful to you.
Just a personal backup of my MacBook Pro's setup. Certainly not a drop-in solution for anybody's machine except my own, but maybe a few lines will prove useful to you.
(...in other words, after stealing so many sick bash hacks from people on here who are much smarter than me, I felt obligated to keep the repo public.)
(...in other words, after stealing so many sick bash hacks from people on here who are much smarter than me, I felt obligated to keep the repo public. And in even more words, ***use the automated scripts at your own risk!***)
❤️ Jake
All of the juicy stuff you're probably looking for is in [`zsh/aliases.zsh`](zsh/aliases.zsh) and [`zsh/functions.zsh`](zsh/functions.zsh) for my ZSH hacks, [`macos/defaults.sh`](macos/defaults.sh) for my macOS defaults, and [`Brewfile`](Brewfile) for my far-too-long list of binaries and apps I "need" installed. My [Firefox flags](firefox/user.js) and [VS Code preferences](vscode/) also live here.
Thanks for visiting, the `exit` is that way!
❤️ [Jake](https://jarv.is/)
## License
This project is distributed under the [MIT license](LICENSE.md).

View File

@ -1,3 +0,0 @@
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

View File

@ -1,129 +0,0 @@
### Install
# To source this .bashrc, create .bash_profile containing:
#
# if [ -f ~/.bashrc ]; then
# source ~/.bashrc
# fi
#
###############
###############
# Source other files
# Senstive functions which are not pushed to Github
[ -r ~/.bash_private ] && source ~/.bash_private
# On macOS: brew install bash-completion
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
# Get it from the original Git repo:
# https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
if [ -f ~/.git-prompt.sh ]; then
source ~/.git-prompt.sh
fi
# Get it from the original Git repo:
# https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
if [ -f ~/.git-completion.bash ]; then
source ~/.git-completion.bash
fi
###############
# Prettify (custom)
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
# `man ls` to decode this mess
export LSCOLORS=ExFxBxDxCxegedabagacad
###############
# Exports (custom)
export EDITOR="nano"
export VISUAL="nano"
export PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH"
export PATH=$PATH:"$HOME/bin"
export PATH=$PATH:"$(go env GOPATH)/bin"
export PATH=$PATH:"$HOME/adt-bundle-mac/sdk/platform-tools"
export PATH=$PATH:"$HOME/.fastlane/bin"
export PATH=$PATH:"/opt/metasploit-framework/bin"
export PATH=$PATH:"/usr/local/opt/mongodb@3.2/bin"
eval $(thefuck --alias) # https://github.com/nvbn/thefuck
#export JAVA_HOME="$(/usr/libexec/java_home -v 1.6)"
#export JAVA_HOME="$(/usr/libexec/java_home -v 1.7)"
#export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
###############
# Aliases (custom)
# Enable aliases to be sudoed
alias sudo="sudo "
alias ll="ls -lah"
alias la="ls -a"
alias l="ls -lh"
alias cd..="cd .."
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias ~="cd ~"
alias ip="dig +short myip.opendns.com A @resolver1.opendns.com"
alias ip4="dig +short myip.opendns.com A @resolver1.opendns.com"
alias ip6="dig +short -6 myip.opendns.com AAAA @resolver1.ipv6-sandbox.opendns.com"
alias iplocal="ipconfig getifaddr en0"
alias dns-check="networksetup -setdnsservers Wi-Fi"
alias dns-clear="networksetup -getdnsservers Wi-Fi"
alias dns-set="networksetup -setdnsservers Wi-Fi "
alias dns-set-cloudflare="dns-set 1.1.1.1 1.0.0.1"
alias dns-set-google="dns-set 8.8.8.8 8.8.4.4"
alias flush="sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache"
alias serve="python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()'"
alias hosts="sudo $EDITOR /etc/hosts"
alias speed="wget -O /dev/null http://cachefly.cachefly.net/100mb.test"
alias digg="dig @8.8.8.8 +nocmd any +multiline +noall +answer"
alias unhide="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
alias rehide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
alias forcetrash="sudo rm -rf ~/.Trash /Volumes/*/.Trashes"
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
alias update="brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update; sudo gem cleanup" # sudo softwareupdate -i -a;
alias dc="docker-compose"
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to pasteboard.'"
alias gundo="git push -f origin HEAD^:master"
alias sshalt="ssh -p 2222"
alias moshalt="mosh --ssh=\"ssh -p 2222\""
alias unq="sudo xattr -rd com.apple.quarantine"
s3ls() {
aws s3 ls s3://$1
}
docker-bash() {
docker exec -ti $1 /bin/bash
}
mkcdir() {
mkdir -p -- "$1" &&
cd -P -- "$1"
}
eval "$(rbenv init -)"

24
git/.gitconfig Normal file
View File

@ -0,0 +1,24 @@
[credential]
helper = osxkeychain
[user]
email = jake@jarv.is
name = Jake Jarvis
signingkey = 2B0C9CF251E69A39
[gpg]
program = /usr/local/bin/gpg
[commit]
gpgsign = true
[push]
default = current
[pull]
rebase = true
[core]
editor = nano
excludesfile = ~/.gitignore_global
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
[github]
user = jakejarvis

344
iterm/JJ-ZSH.itermcolors Normal file
View File

@ -0,0 +1,344 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.18094024062156677</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.18094304203987122</real>
<key>Red Component</key>
<real>0.18093785643577576</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.054613023996353149</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.15000113844871521</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.42974600195884705</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.89148491621017456</real>
<key>Red Component</key>
<real>0.72157114744186401</real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.32224351167678833</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.84866994619369507</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>1</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.65062606334686279</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.93940186500549316</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.48187243938446045</real>
<key>Red Component</key>
<real>0.67381459474563599</real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.95343631505966187</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.99162548780441284</real>
<key>Red Component</key>
<real>0.45578873157501221</real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>1</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>0.99999600648880005</real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.019149409607052803</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.88745319843292236</real>
<key>Red Component</key>
<real>0.60763847827911377</real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.76917916536331177</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.97967463731765747</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.63372808694839478</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.70985788106918335</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.35739818215370178</real>
<key>Red Component</key>
<real>0.50483828783035278</real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.93896776437759399</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.87004786729812622</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>1</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>0.99999600648880005</real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.33683216571807861</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.33683684468269348</real>
<key>Red Component</key>
<real>0.33682817220687866</real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.31419616937637329</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.26015520095825195</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Background Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.04681396484375</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.04681396484375</real>
<key>Red Component</key>
<real>0.04681396484375</real>
</dict>
<key>Badge Color</key>
<dict>
<key>Alpha Component</key>
<real>0.5</real>
<key>Blue Component</key>
<real>0.0</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.1491314172744751</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Bold Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.73150634765625</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.73150634765625</real>
<key>Red Component</key>
<real>0.73150634765625</real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.11473541706800461</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.15114313364028931</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Cursor Guide Color</key>
<dict>
<key>Alpha Component</key>
<real>0.25</real>
<key>Blue Component</key>
<real>1</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.9268307089805603</real>
<key>Red Component</key>
<real>0.70213186740875244</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.11473541706800461</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.15114313364028931</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.96449297666549683</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.98419922590255737</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Link Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.73423302173614502</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.35916060209274292</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>1</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>0.99999600648880005</real>
</dict>
<key>Selection Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.29662126302719116</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.21898511052131653</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
</dict>
</plist>

View File

@ -1,5 +1,9 @@
{
"Thin Strokes" : 3,
"Ansi 5 Color" : {
"Green Component" : 0.26314744353294373,
"Red Component" : 0.42564234137535095,
"Blue Component" : 0.65052211284637451
},
"Working Directory" : "\/Users\/jake",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
@ -20,6 +24,7 @@
"Blue Component" : 0.95548701286315918
},
"Right Option Key Sends" : 0,
"Show Status Bar" : true,
"Character Encoding" : 4,
"Selection Color" : {
"Green Component" : 0.16498950123786926,
@ -44,6 +49,96 @@
"telnet"
],
"Scrollback Lines" : 0,
"Status Bar Layout" : {
"components" : [
{
"class" : "iTermStatusBarSpringComponent",
"configuration" : {
"knobs" : {
"base: compression resistance" : 1,
"base: priority" : 5,
"shared text color" : {
"Red Component" : 0.63,
"Color Space" : "sRGB",
"Blue Component" : 0.78428571428571425,
"Alpha Component" : 1,
"Green Component" : 0.90000000000000002
},
"iTermStatusBarSpringComponentSpringConstantKey" : 0.01,
"iTermStatusBarSpringComponentSizeMultipleKey" : 1
},
"layout advanced configuration dictionary value" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1
}
}
},
{
"class" : "iTermStatusBarCPUUtilizationComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"shared text color" : {
"Red Component" : 0.63,
"Color Space" : "sRGB",
"Blue Component" : 0.90000000000000002,
"Alpha Component" : 1,
"Green Component" : 0.78428571428571436
},
"base: compression resistance" : 1
},
"layout advanced configuration dictionary value" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1
}
}
},
{
"class" : "iTermStatusBarMemoryUtilizationComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"shared text color" : {
"Red Component" : 0.70714285714285685,
"Color Space" : "sRGB",
"Blue Component" : 0.90000000000000002,
"Alpha Component" : 1,
"Green Component" : 0.63
},
"base: compression resistance" : 1
},
"layout advanced configuration dictionary value" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1
}
}
},
{
"class" : "iTermStatusBarBatteryComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"shared text color" : {
"Red Component" : 0.90000000000000002,
"Color Space" : "sRGB",
"Blue Component" : 0.86142857142857154,
"Alpha Component" : 1,
"Green Component" : 0.63
},
"base: compression resistance" : 1
},
"layout advanced configuration dictionary value" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1
}
}
}
],
"advanced configuration" : {
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1
}
},
"Hide After Opening" : false,
"Flashing Bell" : false,
"Cursor Guide Color" : {
@ -59,6 +154,7 @@
"Red Component" : 1,
"Blue Component" : 0
},
"Icon" : 1,
"Use Non-ASCII Font" : false,
"Link Color" : {
"Red Component" : 0,
@ -293,7 +389,7 @@
},
"Name" : "JJ-ZSH",
"Blinking Cursor" : true,
"Guid" : "1BD702E0-FFE5-4C92-8E09-EA2D91B8306E",
"Guid" : "EDCECF3F-4620-4117-8E79-0B8C58327F3E",
"Ansi 8 Color" : {
"Green Component" : 0.26696832579185525,
"Red Component" : 0.26696832579185525,
@ -313,7 +409,7 @@
"Green Component" : 0.1491314172744751
},
"Ambiguous Double Width" : false,
"Blur Radius" : 7.3643559644670038,
"Blur Radius" : 8.6593730171319798,
"Cursor Type" : 1,
"Ansi 0 Color" : {
"Green Component" : 0.13574660633484159,
@ -323,7 +419,7 @@
"Session Close Undo Timeout" : 15,
"Blur" : true,
"Normal Font" : "MesloLGMForPowerline-Regular 13",
"Vertical Spacing" : 1.0669062970632528,
"Vertical Spacing" : 1.0700000000000001,
"Ansi 7 Color" : {
"Green Component" : 1,
"Red Component" : 1,
@ -333,7 +429,7 @@
"Terminal Type" : "xterm-256color",
"Horizontal Spacing" : 1,
"Option Key Sends" : 2,
"Only The Default BG Color Uses Transparency" : false,
"Only The Default BG Color Uses Transparency" : true,
"Ansi 15 Color" : {
"Green Component" : 1,
"Red Component" : 1,
@ -346,13 +442,13 @@
"Red Component" : 0,
"Blue Component" : 0.92260181903839111
},
"Transparency" : 0.10079314720812182,
"Transparency" : 0.08790847081218274,
"Background Color" : {
"Red Component" : 0.062745098039215685,
"Red Component" : 0.04681396484375,
"Color Space" : "sRGB",
"Blue Component" : 0.12941176470588237,
"Blue Component" : 0.04681396484375,
"Alpha Component" : 1,
"Green Component" : 0.074509803921568626
"Green Component" : 0.04681396484375
},
"Screen" : -1,
"Bound Hosts" : [
@ -364,13 +460,9 @@
"Red Component" : 0.60504487800788187,
"Blue Component" : 0.92307692307692313
},
"Columns" : 115,
"Columns" : 120,
"Visual Bell" : true,
"ASCII Ligatures" : true,
"Ansi 5 Color" : {
"Green Component" : 0.26314744353294373,
"Red Component" : 0.42564234137535095,
"Blue Component" : 0.65052211284637451
},
"Custom Directory" : "No"
"Custom Directory" : "No",
"Thin Strokes" : 3,
"ASCII Ligatures" : true
}

121
macos/brew-cask.sh Executable file
View File

@ -0,0 +1,121 @@
#!/bin/bash
#############################################################
### Try using the Brewfile one folder up instead! ###
### brew tap homebrew/bundle && brew bundle ###
#############################################################
# I'm not a huge fan of using Casks, but keeping a list here in case I change
# my mind when I'm staring at a default macOS install and freaking out...
# To update all:
# brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup
# System Utilities
brew cask install osxfuse
brew cask install backblaze
brew cask install backblaze-downloader
brew cask install carbon-copy-cloner
brew cask install cleanmymac
brew cask install coconutbattery
brew cask install daisydisk
brew cask install duet
brew cask install endurance
brew cask install etrecheckpro
brew cask install filebot
brew cask install geekbench
brew cask install paragon-ntfs
brew cask install the-unarchiver
brew cask install transmission
brew cask install unetbootin
brew cask install vnc-viewer
# Passwords, VPNs, other Security
brew cask install 1password
brew cask install authy
brew cask install gpg-suite-no-mail # Install separately: https://github.com/GpgMailNoActivation/GpgMailNoActivation
brew cask install keybase
brew cask install little-snitch
brew cask install nordvpn
brew cask install tor-browser
brew cask install tunnelblick
# Development
brew cask install eclipse-java
brew cask install filezilla
brew cask install github
brew cask install glyphs
brew cask install imageoptim
brew cask install intellij-idea
brew cask install iterm2
brew cask install postman
brew cask install robo-3t
brew cask install sequel-pro
brew cask install transmit
brew cask install visual-studio-code
brew cask install visual-studio
# Virtual Machines (& Docker)
brew cask install docker
brew cask install virtualbox
brew cask install virtualbox-extension-pack
brew cask install vmware-fusion
# Media
brew cask install beamer
brew cask install handbrake
brew cask install iina
brew cask install plex-media-player
brew cask install pocket-casts
brew cask install spotify
brew cask install vlc
# Communication/Social
brew cask install discord
brew cask install skype
brew cask install slack
brew cask install whatsapp
brew cask install zoomus
# Gaming
brew cask install steam
brew cask install nvidia-geforce-now
# Pentesting
brew cask install burp-suite
brew cask install charles
brew cask install wifi-explorer
brew cask install wireshark
# Browsers (for reference only -- install these via offline DMGs no matter what)
# * Firefox
# - Stable
# - Dev: https://www.mozilla.org/en-US/firefox/developer/
# - Nightly: https://www.mozilla.org/en-US/firefox/channel/desktop/
# * Chrome
# - Stable
# - Canary: https://www.google.com/chrome/canary/
# * Safari
# - Preview: https://developer.apple.com/safari/technology-preview/

227
macos/brew.sh Executable file
View File

@ -0,0 +1,227 @@
#!/usr/bin/env bash
#############################################################
### Try using the Brewfile one folder up instead! ###
### brew tap homebrew/bundle && brew bundle ###
#############################################################
# WARNING: I have not tested this yet (nor needed to, thankfully) so this is
# basically just a list of everything I've installed with Homebrew. :)
# Make sure were using the latest Homebrew.
brew update
# Upgrade any already-installed formulae.
brew upgrade
# Tap casks. (Just for Android SDK here, otherwise not a fan of using casks!)
brew tap caskroom/cask
# Save Homebrews installed location.
BREW_PREFIX=$(brew --prefix)
# Perhaps most importantly...
brew install zsh
# Better bash as a backup.
brew install bash
brew install bash-completion
# Install GNU core utilities (those that come with macOS are outdated).
# Dont forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
brew install coreutils
# ln -s "${BREW_PREFIX}/bin/gsha256sum" "${BREW_PREFIX}/bin/sha256sum"
# Install some other useful utilities like `sponge`.
brew install moreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed.
brew install findutils
# Install GNU `sed`, overwriting the built-in `sed`.
brew install gnu-sed # --with-default-names
# Install `wget` with IRI support.
brew install wget # --with-iri
# Install GnuPG to enable PGP-signing commits.
brew install gnupg
# Install more recent versions of some macOS tools.
brew install vim # --with-override-system-vi
brew install grep
brew install openssh
brew install screen
brew install gmp
# Install other universally useful binaries.
brew install ack
#brew install exiv2
brew install gs
brew install imagemagick # --with-webp
brew install ffmpeg # --with-libvpx
brew install lua
brew install lynx
brew install p7zip
brew install pigz
brew install pv
brew install rename
brew install rlwrap
brew install ssh-copy-id
brew install tree
brew install vbindiff
brew install zopfli
brew install the_silver_searcher
# Git
brew install git
brew install git-lfs
brew install git-crypt
# Node & NPM / NVM
brew install node
brew install nvm
# mtr (better ping & traceroute)
brew install mtr
# Allow mtr to run without sudo
mtrlocation=$(brew info mtr | grep Cellar | sed -e 's/ (.*//') # e.g. `/Users/jake/.homebrew/Cellar/mtr/0.86`
sudo chmod 4755 $mtrlocation/sbin/mtr
sudo chown root $mtrlocation/sbin/mtr
# ---------- My Fringe Needs ----------
brew install amazon-ecs-cli
brew tap aws/tap && brew install aws-sam-cli
brew install aws-shell
brew install angular-cli
brew install asciinema
brew install azure-cli
brew install caddy
brew install carthage
brew install cli53
brew install cloudflare/cloudflare/cloudflared
brew install cocoapods
brew install composer
brew install dnsmasq
brew install doctl
brew install elixir
brew install erlang
brew tap facebook/fb && brew install fbsimctl
brew install geoip
brew install gitlab-runner
brew install go
brew install govendor
brew tap heroku/brew && brew install heroku
brew install heroku-node
brew tap hhvm/hhvm && brew install hhvm
brew install htop
brew install httrack
brew install hub
brew install hugo
brew install hydra
brew install iproute2mac
brew install jq
brew install kubernetes-cli
brew install kubernetes-helm
brew install mcrypt
brew install mhash
brew install mkcert
# brew install mongodb
brew tap mongodb/brew && brew install mongodb-community
brew install mosh
brew install mysql
brew install mysql-client
brew install ncurses
brew install neofetch
brew install netcat
brew install openvpn
brew install optipng
brew install packer
brew tap thoughtbot/formulae && brew install parity
brew install php # = php@7.3 https://formulae.brew.sh/formula/php
brew install php@7.1
brew install php@7.2
# brew tap exolnet/homebrew-deprecated && brew install php@5.6
# brew tap exolnet/homebrew-deprecated && brew install php@7.0
brew install pngcheck
brew install pngcrush
brew install postgresql
brew install python
brew install python@2
brew install qt
brew install ruby
brew install ruby-build
brew install rbenv
brew install rclone
brew install s3fs
brew install serverless
brew install speedtest-cli
brew install sqlite
brew install sub2srt
brew install terraform
brew install the_silver_searcher
brew install tidy-html5
brew install tor
brew install torsocks
brew install travis
brew install typescript
brew install unrar
brew install watchman
brew install whois
brew install wireguard-tools
brew install wireguard-go
brew install wp-cli
brew tap wpengine/wpe-cli && brew install wpe-cli
brew install xz
brew install yarn
brew install youtube-dl
brew install yuicompressor
# Android SDK
brew install ant
brew install maven
brew install gradle
brew cask install android-sdk
# Pentesting tools
brew install aircrack-ng
brew install bfg
brew install binutils
brew install binwalk
brew install cifer
brew install dex2jar
brew install dns2tcp
brew install fcrackzip
brew install foremost
brew install hashpump
brew install hydra
brew install john
brew install knock
brew install netpbm
brew install nmap
brew install pdfcrack
brew install pngcheck
brew install socat
brew install sqlmap
brew install tcpflow
brew install tcpreplay
brew install tcptrace
brew install xpdf
brew install bettercap
brew install hashcat
brew install nikto
brew install tcpdump
# -------------------------------------
# Remove outdated versions from the cellar.
brew cleanup
# Call the doctor after this mess just to be safe.
brew doctor

323
macos/defaults.sh Executable file
View File

@ -0,0 +1,323 @@
#!/usr/bin/env bash
# Modified and patched together from a few sources:
#
# https://mths.be/macos
# https://github.com/paulirish/dotfiles/blob/master/.osx
# https://github.com/kevinSuttle/macOS-Defaults/blob/master/.macos
COMPUTER_NAME="JJ-MBP15"
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until this script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
# General UI/UX #
###############################################################################
# Set computer name (as done via System Preferences → Sharing)
sudo scutil --set ComputerName "$COMPUTER_NAME"
sudo scutil --set HostName "$COMPUTER_NAME"
sudo scutil --set LocalHostName "$COMPUTER_NAME"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$COMPUTER_NAME"
# Set language and text formats
defaults write NSGlobalDomain AppleLanguages -array "en"
defaults write NSGlobalDomain AppleLocale -string "en_US@currency=USD"
defaults write NSGlobalDomain AppleMeasurementUnits -string "Inches"
defaults write NSGlobalDomain AppleMetricUnits -bool false
# Set the timezone (see `sudo systemsetup -listtimezones` for other values)
sudo systemsetup -settimezone "America/New_York" > /dev/null
# Set standby delay to 24 hours (default is 1 hour)
sudo pmset -a standbydelay 86400
# Disable Sudden Motion Sensor
sudo pmset -a sms 0
# 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=" "
# Menu bar: show battery percentage
defaults write com.apple.menuextra.battery ShowPercent YES
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Remove duplicates in the “Open With” menu (also see `lscleanup` alias)
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
# Disable Resume system-wide
defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false
# Restart automatically if the computer freezes
sudo systemsetup -setrestartfreeze on
###############################################################################
# Keyboard & Input #
###############################################################################
# Disable smart quotes and dashes as theyre annoying when typing code
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Automatically illuminate built-in MacBook keyboard in low light
defaults write com.apple.BezelServices kDim -bool true
# Turn off keyboard illumination when computer is not used for 5 minutes
defaults write com.apple.BezelServices kDimTime -int 300
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
###############################################################################
# Trackpad, mouse, Bluetooth accessories #
###############################################################################
# Trackpad: enable tap to click for this user and for the login screen
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true
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
# Increase sound quality for Bluetooth headphones/headsets
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
# Use scroll gesture with the Ctrl (^) modifier key to zoom
defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144
###############################################################################
# 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"
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
###############################################################################
# Finder #
###############################################################################
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Finder: allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
# When performing a search, search the current folder by default
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# 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
# Use AirDrop over every interface.
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
# Enable snap-to-grid for icons on the desktop and in other icon views
/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist
# Always open everything in Finder's list view.
# Use list view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# Show the ~/Library folder
chflags nohidden ~/Library
# Expand the following File Info panes:
# “General”, “Open with”, and “Sharing & Permissions”
defaults write com.apple.finder FXInfoPanesExpanded -dict \
General -bool true \
OpenWith -bool true \
Privileges -bool true
###############################################################################
# Dock #
###############################################################################
# Show indicator lights for open applications in the Dock
defaults write com.apple.dock show-process-indicators -bool true
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Group windows by application in Mission Control
defaults write com.apple.dock expose-group-by-app -bool true
# Disable hot corners
defaults write com.apple.dock wvous-tl-corner -int 0
defaults write com.apple.dock wvous-tr-corner -int 0
defaults write com.apple.dock wvous-bl-corner -int 0
defaults write com.apple.dock wvous-br-corner -int 0
# Don't show recently used applications in the Dock
defaults write com.Apple.Dock show-recents -bool false
###############################################################################
# Spotlight #
###############################################################################
# Disable Spotlight indexing for any volume that gets mounted and has not yet
# been indexed before.
# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume.
sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes"
# Change indexing order and disable some file types
defaults write com.apple.spotlight orderedItems -array \
'{"enabled" = 1;"name" = "APPLICATIONS";}' \
'{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \
'{"enabled" = 1;"name" = "DIRECTORIES";}' \
'{"enabled" = 1;"name" = "CONTACT";}' \
'{"enabled" = 1;"name" = "DOCUMENTS";}' \
'{"enabled" = 1;"name" = "PDF";}' \
'{"enabled" = 0;"name" = "FONTS";}' \
'{"enabled" = 0;"name" = "MESSAGES";}' \
'{"enabled" = 0;"name" = "EVENT_TODO";}' \
'{"enabled" = 0;"name" = "IMAGES";}' \
'{"enabled" = 0;"name" = "BOOKMARKS";}' \
'{"enabled" = 0;"name" = "MUSIC";}' \
'{"enabled" = 0;"name" = "MOVIES";}' \
'{"enabled" = 0;"name" = "PRESENTATIONS";}' \
'{"enabled" = 0;"name" = "SPREADSHEETS";}' \
'{"enabled" = 0;"name" = "SOURCE";}'
# Load new settings before rebuilding the index
killall mds > /dev/null 2>&1
# Make sure indexing is enabled for the main volume
sudo mdutil -i on / > /dev/null
# Rebuild the index from scratch
sudo mdutil -E / > /dev/null
###############################################################################
# Activity Monitor #
###############################################################################
# Show the main window when launching Activity Monitor
defaults write com.apple.ActivityMonitor OpenMainWindow -bool true
# Visualize CPU usage in the Activity Monitor Dock icon
defaults write com.apple.ActivityMonitor IconType -int 5
# Show all processes in Activity Monitor
defaults write com.apple.ActivityMonitor ShowCategory -int 0
# Sort Activity Monitor results by CPU usage
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
defaults write com.apple.ActivityMonitor SortDirection -int 0
###############################################################################
# Photos #
###############################################################################
# Prevent Photos from opening automatically when devices are plugged in
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true
###############################################################################
# Messages #
###############################################################################
# Disable automatic emoji substitution (i.e. use plain text smileys)
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false
# Disable smart quotes as its annoying for messages that contain code
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false
# Disable continuous spell checking
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false
###############################################################################
# TextEdit #
###############################################################################
# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0
# Open and save files as UTF-8 in TextEdit
defaults write com.apple.TextEdit PlainTextEncoding -int 4
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4
###############################################################################
# GPGMail 2 #
###############################################################################
# Disable signing emails by default
defaults write ~/Library/Preferences/org.gpgtools.gpgmail SignNewEmailsByDefault -bool false
###############################################################################
# Software Updates #
###############################################################################
# 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 -bool true
# Download newly available updates in background
defaults write com.apple.SoftwareUpdate AutomaticDownload -bool true
# Install System data files & security updates
defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -bool true
# Turn off app auto-update
defaults write com.apple.commerce AutoUpdate -bool false
###############################################################################
# Finished! #
###############################################################################
echo "All done! Some of these changes require a logout/restart to take effect."

37
setup.sh Executable file
View File

@ -0,0 +1,37 @@
#!/usr/bin/env bash
if test ! "$(uname)" = "Darwin"; then
exit 0
fi
echo "👋 Deep breaths, everything will be fine!"
# This whole thing kinda hinges on having Homebrew...
# Check for it and install it if we don't already have it
if test ! $(which brew); then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update Homebrew recipes
brew update
# Install all our dependencies with bundle (See Brewfile)
brew tap homebrew/bundle
brew bundle
# Get Oh My ZSH up and running
if [ ! -e ~/.oh-my-zsh ]; then
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi
# Make ZSH the default shell environment
chsh -s $(which zsh)
# Set up symbolic links for ZSH and Git pointing to this cloned repo
ln -s $HOME/.dotfiles/zsh/.zshrc $HOME/.zshrc
ln -s $HOME/.dotfiles/git/.gitconfig $HOME/.gitconfig
ln -s $HOME/.dotfiles/zsh/git/.gitignore_global $HOME/.gitignore_global
# Set up macOS defaults.
# Needs to be last since this will restart everything when done.
source ./macos/defaults.sh

View File

@ -1,24 +1,4 @@
[
{
"metadata": {
"id": "819a23e1-b6c6-41cf-9029-e653b537d996",
"publisherId": "ms-vscode.azure-account",
"publisherDisplayName": "ms-vscode"
},
"name": "azure-account",
"publisher": "ms-vscode",
"version": "0.8.4"
},
{
"metadata": {
"id": "464f4ac7-af65-4aa9-9907-4ba7fa419085",
"publisherId": "bungcip.better-toml",
"publisherDisplayName": "bungcip"
},
"name": "better-toml",
"publisher": "bungcip",
"version": "0.3.2"
},
{
"metadata": {
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd",
@ -27,17 +7,17 @@
},
"name": "code-settings-sync",
"publisher": "Shan",
"version": "3.3.1"
"version": "3.4.2"
},
{
"metadata": {
"id": "82dfe17d-bb64-404e-bcc5-f9803f7ab5d5",
"publisherId": "dbaeumer.jshint",
"publisherDisplayName": "dbaeumer"
"id": "1ec62ca5-d7f9-4ddb-a882-e8d018c0aefd",
"publisherId": "msjsdiag.debugger-for-chrome",
"publisherDisplayName": "msjsdiag"
},
"name": "jshint",
"publisher": "dbaeumer",
"version": "0.10.20"
"name": "debugger-for-chrome",
"publisher": "msjsdiag",
"version": "4.11.7"
},
{
"metadata": {
@ -47,7 +27,57 @@
},
"name": "material-icon-theme",
"publisher": "PKief",
"version": "3.8.0"
"version": "3.9.0"
},
{
"metadata": {
"id": "93ce222b-5f6f-49b7-9ab1-a0463c6238df",
"publisherId": "ms-vscode-remote.remote-containers",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-containers",
"publisher": "ms-vscode-remote",
"version": "0.74.0"
},
{
"metadata": {
"id": "607fd052-be03-4363-b657-2bd62b83d28a",
"publisherId": "ms-vscode-remote.remote-ssh",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-ssh",
"publisher": "ms-vscode-remote",
"version": "0.46.0"
},
{
"metadata": {
"id": "bfeaf631-bcff-4908-93ed-fda4ef9a0c5c",
"publisherId": "ms-vscode-remote.remote-ssh-edit",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-ssh-edit",
"publisher": "ms-vscode-remote",
"version": "0.46.0"
},
{
"metadata": {
"id": "5d9b66c1-7da3-4004-8c92-2b0852ec0c9b",
"publisherId": "ms-vscode-remote.remote-ssh-explorer",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-ssh-explorer",
"publisher": "ms-vscode-remote",
"version": "0.46.0"
},
{
"metadata": {
"id": "f0c5397b-d357-4197-99f0-cb4202f22818",
"publisherId": "ms-vscode-remote.remote-wsl",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-wsl",
"publisher": "ms-vscode-remote",
"version": "0.39.5"
},
{
"metadata": {
@ -59,16 +89,6 @@
"publisher": "smlombardi",
"version": "2.34.0"
},
{
"metadata": {
"id": "e2c479df-2c90-4915-9015-595ef0d79bd5",
"publisherId": "ms-vsts.team",
"publisherDisplayName": "ms-vsts"
},
"name": "team",
"publisher": "ms-vsts",
"version": "1.149.2"
},
{
"metadata": {
"id": "0479fc1c-3d67-49f9-b087-fb9069afe48f",
@ -77,16 +97,16 @@
},
"name": "vscode-docker",
"publisher": "ms-azuretools",
"version": "0.6.4"
"version": "0.7.0"
},
{
"metadata": {
"id": "5a6dc0d5-dc02-4121-8e24-cad33a2ff0af",
"publisherId": "ms-vsliveshare.vsliveshare",
"publisherDisplayName": "ms-vsliveshare"
"id": "23d72dfc-8dd1-4e30-926e-8783b4378f13",
"publisherId": "ms-vscode-remote.vscode-remote-extensionpack",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "vsliveshare",
"publisher": "ms-vsliveshare",
"version": "1.0.488"
"name": "vscode-remote-extensionpack",
"publisher": "ms-vscode-remote",
"version": "0.17.0"
}
]

View File

@ -1,6 +1,5 @@
// Place your settings in this file to overwrite the default settings
{
"workbench.iconTheme": "material-icon-theme",
"editor.fontFamily": "Source Code Pro, Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 14.5,
"editor.cursorStyle": "line",
@ -36,5 +35,16 @@
"css.lint.unknownVendorSpecificProperties": "warning",
"css.lint.zeroUnits": "warning",
"git.enableCommitSigning": true,
"git.showPushSuccessNotification": true
"git.showPushSuccessNotification": true,
"workbench.iconTheme": "material-icon-theme",
"liveshare.featureSet": "insiders",
"aws.telemetry": false,
"aws.profile": "default",
"githubPullRequests.remotes": [
"origin",
"upstream",
"github"
],
"sync.forceUpload": true,
"editor.renderWhitespace": "none"
}

41
zsh/.zshrc Normal file
View File

@ -0,0 +1,41 @@
# Path to your dotfiles (aka the cloned Git repo).
export DOTFILES=$HOME/.dotfiles/zsh
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Default to nano 'cause I'm a wimp.
export VISUAL="nano"
export EDITOR="nano"
# Adjust history for speed.
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
# Oh My ZSH settings:
ZSH_CUSTOM=$DOTFILES
ZSH_THEME="agnoster"
plugins=(
git
# colored-man-pages
colorize
pip
python
brew
osx
zsh-syntax-highlighting
zsh-autosuggestions
)
# Load everything!
source $ZSH/oh-my-zsh.sh
# Fix slow paste problem w/ zsh-syntax-highlighting plugin.
# https://github.com/zsh-users/zsh-syntax-highlighting/issues/295
zstyle ':bracketed-paste-magic' active-widgets '.self-*'
# Other miscellaneous settings:
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSECURE_REDIRECT=1
export HOMEBREW_CASK_OPTS=--require-sha

71
zsh/aliases.zsh Normal file
View File

@ -0,0 +1,71 @@
# Enable aliases to be sudo'ed
alias sudo="sudo "
alias ll="ls -lah"
alias la="ls -a"
alias l="ls -lh"
alias cd..="cd .."
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias ~="cd ~"
#alias ip="dig +short myip.opendns.com A @resolver1.opendns.com"
#alias ipv4="dig +short myip.opendns.com A @resolver1.opendns.com"
#alias ipv6="dig +short -6 myip.opendns.com AAAA @resolver1.ipv6-sandbox.opendns.com"
alias ip="ipv4"
alias ipv4="curl -4 icanhazip.com"
alias ipv6="curl -6 icanhazip.com"
alias iplocal="ipconfig getifaddr en0"
alias dns-clear="networksetup -setdnsservers Wi-Fi"
alias dns-check="networksetup -getdnsservers Wi-Fi"
alias dns-set="networksetup -setdnsservers Wi-Fi "
alias dns-set-cloudflare="dns-set 1.1.1.1 1.0.0.1"
alias dns-set-google="dns-set 8.8.8.8 8.8.4.4"
alias flush="sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache"
# alias serve="echo 'Starting server at http://127.0.0.1:8000/ ...'; python3 -m http.server"
alias hosts="sudo $EDITOR /etc/hosts"
alias speed="wget -O /dev/null http://cachefly.cachefly.net/100mb.test"
alias digg="dig @8.8.8.8 +nocmd any +multiline +noall +answer"
alias unhide="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
alias rehide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
alias forcetrash="sudo rm -rf ~/.Trash /Volumes/*/.Trashes"
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
alias displays="system_profiler SPDisplaysDataType"
alias cpu="sysctl -n machdep.cpu.brand_string"
alias screenfetch="neofetch"
alias ripfinder="killall Finder"
alias ripdock="killall Dock"
alias ripmenu="killall SystemUIServer NotificationCenter"
alias update="brew update; brew upgrade; brew cleanup; nvm install node --latest-npm --reinstall-packages-from=node; npm install npm -g; npm update -g; gem update --system; gem update; gem cleanup; sudo gem update --system; sudo gem update; sudo gem cleanup; sudo softwareupdate -ia --include-config-data;"
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to pasteboard.'"
alias gundo="git reset --soft HEAD~1"
alias gc="git add . && git commit -m "
alias gs="git status -sb"
alias gd="git diff"
alias ios="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"
alias watchos="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator\ \(Watch\).app"
alias dc="docker-compose"
alias sshalt="ssh -p 2222"
alias moshalt="mosh --ssh=\"ssh -p 2222\""
alias finder="open ./"
alias unq="sudo xattr -rd com.apple.quarantine"
alias weather="curl -4 http://wttr.in/Boston"

72
zsh/functions.zsh Normal file
View File

@ -0,0 +1,72 @@
# Make new directory and change into it (this seems like a no-brainer)
mkcd() {
mkdir -p -- "$1" &&
cd -P -- "$1"
}
# Start an HTTP server from a directory, optionally specifying the port
serve() {
local port="${1:-8000}"
sleep 1 && open "http://localhost:${port}/" &
# Set the default Content-Type to `text/plain` instead of `application/octet-stream`
# And serve everything as UTF-8 (although not technically correct, this doesnt break anything for binary files)
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
}
# Start a bash shell inside of a running Docker container
docker-bash() {
docker exec -ti $1 /bin/bash
}
# Extract a compressed archive without worrying which tool to use
extract() {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# Find the real location of a short URL
unshort() {
curl -sIL $1 | sed -n 's/Location: *//p'
}
# Create a git.io short URL
gitio() {
if [ -z "${1}" ] || [ -z "${2}" ]; then
echo "Usage: \`gitio slug url\`"
return 1
fi
curl -i https://git.io/ -F "url=${2}" -F "code=${1}"
}
# List files in an S3 buckett
s3ls() {
aws s3 ls s3://$1
}
# Push a local SSH public key to another machine
# https://github.com/rtomayko/dotfiles/blob/rtomayko/.bashrc
push_ssh_cert() {
local _host
test -f ~/.ssh/id_rsa.pub || ssh-keygen -t rsa
for _host in "$@";
do
echo $_host
ssh $_host 'cat >> ~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub
done
}

30
zsh/path.zsh Normal file
View File

@ -0,0 +1,30 @@
# Default junk
export PATH="$HOME/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH"
# Go
export GOPATH="$HOME/golang"
export GOROOT="/usr/local/opt/go/libexec"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:$GOROOT/bin"
# ruby
export PATH="/usr/local/opt/ruby/bin:$PATH"
# metasploit
export PATH=:"/opt/metasploit-framework/bin:$PATH"
# curl
export PATH="/usr/local/opt/curl/bin:$PATH"
# ----- Third-party additions below: -----
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/jake/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/jake/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/jake/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/jake/google-cloud-sdk/completion.zsh.inc'; fi
# added by travis gem
[ -f /Users/jake/.travis/travis.sh ] && source /Users/jake/.travis/travis.sh

@ -0,0 +1 @@
Subproject commit 43f3bc4010b2c697d2252fdd8b36a577ea125881

@ -0,0 +1 @@
Subproject commit 35c8690c0025ceef9584f64da86ced3a72ee32b6