diff --git a/.travis.yml b/.travis.yml index cca5c4a..e421b88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,9 @@ +dist: xenial language: bash -# Use container-based infrastructure for quicker build start-up -sudo: false - before_install: - sudo apt-get -qq update - - sudo apt-get install shellcheck + - sudo apt-get install -y shellcheck script: - bash -c 'shopt -s globstar; shellcheck **/bash*' diff --git a/bash_aliases b/bash_aliases index a436e18..0284a19 100644 --- a/bash_aliases +++ b/bash_aliases @@ -11,6 +11,7 @@ alias ..="cd .." alias ...="cd ../.." alias ~="cd ~" +alias f='open .' alias c='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code .' # Update All The Things @@ -21,10 +22,10 @@ alias ip="dig +short myip.opendns.com @resolver1.opendns.com" alias localip="ipconfig getifaddr en1" # Copy SSH public key to pasteboard -alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | printf '\$(tput setaf 64)✓ Public SSH key copied to pasteboard.\$(tput sgr0)\n'" +alias pubkey='more ~/.ssh/id_rsa.pub | pbcopy | printf "✓ Public SSH key copied to pasteboard.\n"' # Copy GPG public key to pasteboard -alias gpgpubkey="gpg --export --armor 0xDD7831FC | pbcopy | printf '\$(tput setaf 64)✓ Public GPG key copied to pasteboard.\$(tput sgr0)\n'" +alias gpgpubkey='gpg --export --armor $GPG_KEY_ID | pbcopy | printf "✓ Public GPG key copied to pasteboard.\n"' # Recursively delete `.DS_Store` files alias cleanup="find . -type f -name '*.DS_Store' -ls -delete" diff --git a/bash_exports b/bash_exports index f528a38..ad41908 100644 --- a/bash_exports +++ b/bash_exports @@ -17,5 +17,9 @@ export LSCOLORS=gxfxcxdxbxegedabagacad # export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache # go -# export GOPATH=$HOME/.go -# export GOROOT=/usr/local/opt/go/libexec \ No newline at end of file +export GOPATH=$HOME/.go +export GOROOT=/usr/local/opt/go/libexec + +# ffi +export LDFLAGS="-L/usr/local/opt/libffi/lib" +export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" diff --git a/bash_paths b/bash_paths index 76f6d4a..d27a7c8 100644 --- a/bash_paths +++ b/bash_paths @@ -8,8 +8,10 @@ declare -a dirs_to_prepend=( "/usr/local/bin" # Ensure that this bin always takes precedence over `/usr/bin` # "$(brew --prefix node)/bin" # Add npm/yarn-installed package bin "$(brew --prefix openssl)/bin" # Add newer OpenSSL - # "$GOPATH/bin" - # "$GOROOT/bin" + "$(brew --prefix ruby)/bin" + "/usr/local/lib/ruby/gems/2.5.0/bin" + "$GOPATH/bin" + "$GOROOT/bin" "$HOME/.bin" # "$HOME/.rvm/bin" ) diff --git a/bash_profile b/bash_profile index 526a54b..fffa470 100644 --- a/bash_profile +++ b/bash_profile @@ -60,12 +60,24 @@ shopt -s checkwinsize # Automatically trim long paths in the prompt (requires Bash 4.x) PROMPT_DIRTRIM=4 +# Enable some Bash 4 features when possible: +# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux` +# * Recursive globbing, e.g. `echo **/*.txt` +for option in autocd globstar; do + shopt -s "$option" 2> /dev/null; +done + # Add tab completion for many Bash commands +if command -v brew &> /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then + source "$(brew --prefix)/share/bash-completion/bash_completion"; +elif [ -f /etc/bash_completion ]; then + source /etc/bash_completion; +fi + if type brew 2&>/dev/null; then - for completion_file in $(brew --prefix)/etc/bash_completion.d/*; do - # shellcheck disable=SC1091 - source "$completion_file" - done + for completion_file in "$(brew --prefix)"/etc/bash_completion.d/*; do + source "$completion_file" + done fi # Perform file completion in a case insensitive fashion @@ -105,7 +117,8 @@ complete -C aws_completer aws if [ -s "$HOME/.nvm" ]; then export NVM_DIR="$HOME/.nvm" - . "/usr/local/opt/nvm/nvm.sh" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion fi # ---------------------------------------------------------------------- diff --git a/bin/install-brew.sh b/bin/install-brew.sh index 95367f3..06c050b 100755 --- a/bin/install-brew.sh +++ b/bin/install-brew.sh @@ -30,13 +30,15 @@ brew install \ wget \ gpg \ nvm \ + pandoc \ pinentry-mac \ openssl \ tor \ + python \ rclone \ rsync \ + ruby \ shellcheck \ - yarn \ ipfs \ clamav diff --git a/bin/install.sh b/bin/install.sh index 3696108..b119fb4 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -10,7 +10,7 @@ set e # list of files/folders to symlink in homedir -FILES="bash_aliases bashrc bash_profile bash_paths bash_prompt bash_exports gemrc gitconfig gitignore hushlogin inputrc private npmrc bin tmux.conf vimrc" +FILES="bash_aliases bashrc bash_profile bash_paths bash_prompt bash_exports gitconfig gitignore hushlogin inputrc private bin tmux.conf vimrc" # ---------------------------------------------------------------------- # create the private file first, will be symlinked but ignored by git @@ -61,13 +61,13 @@ echo " ✓ done$(tput sgr0)" # Ruby # ---------------------------------------------------------------------- -echo "$(tput setaf 136) Ruby all the things. " -echo "=============================================$(tput sgr0)" +# echo "$(tput setaf 136) Ruby all the things. " +# echo "=============================================$(tput sgr0)" -./bin/install-ruby.sh +# ./bin/install-ruby.sh -echo "$(tput setaf 64)---------------------------------------------" -echo " ✓ done$(tput sgr0)" +# echo "$(tput setaf 64)---------------------------------------------" +# echo " ✓ done$(tput sgr0)" echo "$(tput setaf 64)=============================================" echo " ✓ all done" diff --git a/bin/sync-cloud.sh b/bin/sync-cloud.sh deleted file mode 100755 index 84b1f27..0000000 --- a/bin/sync-cloud.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# -# -# Prerequisite: -# rclone configured with: -# - remote Amazon Cloud Drive named `amazon` -# - remote AWS S3 named `s3` -# -# brew install rclone -# rclone config -# -# http://rclone.org/commands/rclone_copy/ -# http://rclone.org/commands/rclone_sync/ - -DEFAULTS_AMAZON='--exclude .DS_Store' - -# Sync up Movies -rclone sync "$MOVIES_DIR" amazon:/Movies "$DEFAULTS_AMAZON" - -# Sync up TV Shows -rclone sync "$TVSHOWS_DIR" amazon:"/TV Shows" "$DEFAULTS_AMAZON" - -# Sync up iTunes -rclone sync "$ITUNES_DIR" amazon:/Music/iTunes "$DEFAULTS_AMAZON" - -# Sync down all S3 buckets -#rclone sync s3: $S3BACKUP_DIR diff --git a/bin/update-dotfiles.sh b/bin/update-dotfiles.sh index 4c29e65..b8dc39f 100755 --- a/bin/update-dotfiles.sh +++ b/bin/update-dotfiles.sh @@ -8,7 +8,7 @@ ######################################################################## # list of files/folders to symlink in homedir -FILES="bash_aliases bashrc bash_profile bash_paths bash_prompt bash_exports editorconfig gemrc gitconfig gitignore hushlogin inputrc private npmrc bin tmux.conf vimrc" +FILES="bash_aliases bashrc bash_profile bash_paths bash_prompt bash_exports editorconfig gitconfig gitignore hushlogin inputrc private bin tmux.conf vimrc" for FILE in $FILES; do diff --git a/bin/update-everything.sh b/bin/update-everything.sh index 8d0ad2b..d503a51 100755 --- a/bin/update-everything.sh +++ b/bin/update-everything.sh @@ -5,12 +5,11 @@ # macOS # ------------- -echo "" -echo "$(tput setaf 3) Update macOS Apps" -echo "------------------------------$(tput sgr0)" - -#sudo softwareupdate -i -a +# echo "" +# echo "$(tput setaf 3) Update macOS Apps" +# echo "------------------------------$(tput sgr0)" +# sudo softwareupdate -i -a # mas upgrade # @@ -28,7 +27,7 @@ brew cleanup # -# npm +# Node.js & npm # ------------- echo "" @@ -36,6 +35,9 @@ echo "" echo "$(tput setaf 3) Update npm" echo "------------------------------$(tput sgr0)" +# Update to latest nvm Node.js +nvm install node + # update npm itself npm install npm -g diff --git a/gemrc b/gemrc deleted file mode 100644 index 75bd279..0000000 --- a/gemrc +++ /dev/null @@ -1 +0,0 @@ -gem: --no-document \ No newline at end of file diff --git a/gitconfig b/gitconfig index 565fe2c..06132d1 100644 --- a/gitconfig +++ b/gitconfig @@ -25,16 +25,19 @@ excludesfile = ~/.gitignore quotepath = false - # Handle umlauts and such better on OS X + # Handle umlauts and such better on macOS # for whatever crazy reason this explicitly # has to be set to false so tracked files with # special characters don't get treated as untracked precomposeunicode = false - # Make `git rebase` safer on OS X + # Make `git rebase` safer on macOS # More info: http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/ trustctime = false + # Be case sensitive on case insensitive systems + ignorecase = false + [alias] c = clone --recursive co = checkout diff --git a/npmrc b/npmrc deleted file mode 100644 index b5fed97..0000000 --- a/npmrc +++ /dev/null @@ -1,2 +0,0 @@ -loglevel=warn -sign-git-tag=true