Skip to content

Instantly share code, notes, and snippets.

@unicornware
Last active May 5, 2022 14:16
Show Gist options
  • Save unicornware/631cb4259847b67a231377bd58345763 to your computer and use it in GitHub Desktop.
Save unicornware/631cb4259847b67a231377bd58345763 to your computer and use it in GitHub Desktop.
# PATH
#
# $HOME/node_modules/.bin
# $PWD/node_modules/.bin
# curl
# homebrew
# homebrew's "sbin"
# java
# npm
# php
# php's "sbin"
# python
# yarn
export PATH=$PATH:./node_modules/.bin
export PATH=$PWD/node_modules/.bin:$PATH
export PATH=/usr/local/opt/curl/bin/:$PATH
export PATH=/opt/homebrew/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export PATH=/opt/homebrew/opt/openjdk/bin:$PATH
export PATH=$NPM_PREFIX/bin:$PATH
export PATH=/opt/homebrew/opt/php/bin:$PATH
export PATH=/opt/homebrew/opt/php/sbin:$PATH
export PATH=/opt/homebrew/opt/python/libexec/bin:$PATH
export PATH=$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH
# ------------------------------------------------------------------------------
# AUTOENV
# - https://github.com/hyperupcall/autoenv
export AUTOENV_ASSUME_YES=1
export AUTOENV_ENABLE_LEAVE=1
export AUTOENV_ENV_FILENAME=.env.auto
export AUTOENV_ENV_LEAVE_FILENAME=.env.leave
# DOCKER
# - https://docs.docker.com/reference
export DOCKER_BUILDKIT=1
# GIT
# - https://gist.github.com/troyfontaine/18c9146295168ee9ca2b30c00bd1b41e
export GIT_EMAIL=$(git config user.email)
export GIT_NAME=$(git config user.name)
export GIT_USERNAME=$(git config user.username)
export GPG_TTY=$(tty)
# HOMEBREW
# - https://brew.sh
# - https://homebrew-file.readthedocs.io/en/latest/usage.html
export HOMEBREW_BREWFILE=~/.config/brewfile/Brewfile
export HOMEBREW_CASK_OPTS='--appdir=/Applications --fontdir=~/Library/Fonts'
export HOMEBREW_PREFIX=$(brew --prefix)
# NPM
export NPM_PREFIX=$HOME/.npm
# NVM
export NVM_DIR=$HOME/.nvm
# YARN
export YARN_RC_FILENAME=.yarnrc.yml
# ------------------------------------------------------------------------------
# LOAD ENVIRONMENT VARIABLES IN CURRENT WORKING DIRECTORY
#
# 1. $GITHUB_WORKSPACE
# 2. Doppler
# 3. Default environment variables
# 4. Base environment variables
# 5. Local environment variables
# 6. ESM configuration
[ -d "$PWD/.git" ] && export GITHUB_WORKSPACE=$(git rev-parse --show-toplevel)
[ -f "$PWD/.env.doppler" ] && . $PWD/.env.doppler
[ -f "$PWD/.env.defaults" ] && . $PWD/.env.defaults
[ -f "$PWD/.env" ] && . $PWD/.env
[ -f "$PWD/.env.local" ] && . $PWD/.env.local
[ -f "$PWD/.env.esm" ] && . $PWD/.env.esm
# ------------------------------------------------------------------------------
# SOURCE FILES
#
# 1. autoenv
source $(brew --prefix autoenv)/activate.sh
# CERTBOT
export CERTBOT_EMAIL=''
# DBBDOCS
# - https://dbdocs.io/guide
export DB_DOCS_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxx-xxxxxxxxxxxxxxxxxxxxxxxx
export DB_DOCS_TOKEN_ADMIN=xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxx
# DOPPLER
export DOPPLER_TOKEN=secret-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
# GITHUB CONTAINER REGISTRY
export PAT_CPR=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export PAT_CPR_ADMIN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# GITHUB PACKAGE REGISTRY
export PAT_GPR=$PAT_CPR
export PAT_GPR_ADMIN=$PAT_CPR_ADMIN
# GITHUB REPOSITORY CONTROLS
export PAT_REPO=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export PAT_REPO_ADMIN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# GITHUB PAT DEFAULT
export GH_PAT=$PAT_CPR
# NPM
export NPM_TOKEN=npm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export NPM_TOKEN_ADMIN=npm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# TERMINUS
# - https://pantheon.io/docs/terminus/install#machine-token
export TERMINUS_MACHINE_TOKEN=E-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# VERCEL
export VERCEL_API_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxx
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.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/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="afowler"
# 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 $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 automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# 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.
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
# 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="yyyy-mm-dd"
# 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 $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
aws
certbot-google-dns
commitlint
dns
docker
docker-compose
docker-doppler
doppler
dotenv
gcloud
gh
git-escape-magic
git-kata
gitignore
lighthouse
nvm-use
open
random-bytes
sudo
urltools
yarn
)
source $ZSH/oh-my-zsh.sh
# User configuration
# Set language environment
export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
export EDITOR='nano'
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set prompt
PROMPT='%B%F{blue}%D{%L:%M:%S} %B%F{black}%n@%m %B%F{blue}:: %b%F{green}%0~ $(hg_prompt_info)$(git_prompt_info)%B%(!.%F{red}.%F{blue})»%f%b '
# 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"
autoload -U zmv
@unicornware
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment