Last active
September 5, 2024 11:17
-
-
Save dylanjcastillo/fe78ec60059ea44c184abd72daae3590 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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="/Users/dcast/.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="refined" | |
# 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="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 $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=(git 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" | |
# 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" | |
# >>> conda initialize >>> | |
# !! Contents within this block are managed by 'conda init' !! | |
__conda_setup="$('/Users/dcast/miniforge3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" | |
if [ $? -eq 0 ]; then | |
eval "$__conda_setup" | |
else | |
if [ -f "/Users/dcast/miniforge3/etc/profile.d/conda.sh" ]; then | |
. "/Users/dcast/miniforge3/etc/profile.d/conda.sh" | |
else | |
export PATH="/Users/dcast/miniforge3/bin:$PATH" | |
fi | |
fi | |
unset __conda_setup | |
# <<< conda initialize <<< | |
# GCP | |
# Aliases | |
alias ls='eza -lh --group-directories-first --icons --hyperlink' | |
alias lsa='ls -a' | |
alias lt='eza --tree --level=2 --long --icons --git' | |
alias lta='lt -a' | |
alias sysinfo="system_profiler SPSoftwareDataType SPHardwareDataType" | |
alias start-redis="docker run --rm --name redis-local -p 6379:6379 redis" | |
alias n='nvim' | |
# Functions | |
function setup-ssh-key() { | |
set -e | |
KEY_NAME="$1" | |
ORIGIN_DIR="$(pwd)" | |
ORIGIN_KEY="$ORIGIN_DIR/$KEY_NAME" | |
DEST_DIR="$HOME/.ssh" | |
DEST_KEY="$DEST_DIR/$KEY_NAME" | |
mkdir -p "$DEST_DIR" | |
cp "$ORIGIN_KEY" "$DEST_KEY" | |
chmod 600 "$DEST_KEY" | |
eval "$(ssh-agent -s)" | |
ssh-add "$DEST_KEY" | |
echo "SSH key '$KEY_NAME' has been setup successfully." | |
} | |
function mov2mp4() { | |
speed=${2:-1} | |
ffmpeg -i "$1" -filter_complex "[0:v]setpts=1/${speed}*PTS[v];[0:a]atempo=${speed}[a]" -map "[v]" -map "[a]" -vcodec h264 -acodec aac "${1%.*}.mp4" | |
} | |
function gen-key-here() { | |
ssh-keygen -t ed25519 -C "$1" -f "./id_ed25519_$1" | |
} | |
# Variables | |
export icloud_path=~/Library/Mobile\ Documents/com~apple~CloudDocs/ | |
# add poetry to path | |
export MAGICK_HOME="/opt/homebrew/Cellar/imagemagick/7.1.1-8" | |
. "$HOME/.cargo/env" | |
export GOPATH=$HOME/go | |
export PATH="$PATH:usr/local/go/bin:$GOPATH/bin" | |
# Add homebrew to PATH | |
export PATH="/opt/homebrew/bin:$PATH" | |
export PATH="/opt/homebrew/sbin:$PATH" | |
# Add local/bin to PATH | |
export PATH="/usr/local/bin:$PATH" | |
# Add .local/bin to PATH | |
export PATH="$HOME/.local/bin:$PATH" | |
# Fix for missing python | |
export PATH="$(brew --prefix python)/libexec/bin:$PATH" | |
# Use rbenv for ruby | |
eval "$(rbenv init -)" | |
# Created by `pipx` on 2024-05-18 17:47:22 | |
export PATH="$PATH:/Users/dcast/.local/bin"l | |
# direnv | |
eval "$(direnv hook zsh)" | |
# fnm | |
export PATH="/Users/dcast/Library/Caches/fnm_multishells/46341_1716826464997/bin":$PATH | |
export FNM_MULTISHELL_PATH="/Users/dcast/Library/Caches/fnm_multishells/46341_1716826464997" | |
export FNM_NODE_DIST_MIRROR="https://nodejs.org/dist" | |
export FNM_RESOLVE_ENGINES="false" | |
export FNM_COREPACK_ENABLED="false" | |
export FNM_DIR="/Users/dcast/Library/Application Support/fnm" | |
export FNM_LOGLEVEL="info" | |
export FNM_ARCH="arm64" | |
export FNM_VERSION_FILE_STRATEGY="local" | |
rehash | |
# pnpm | |
export PATH="/opt/homebrew/opt/pnpm/bin:$PATH" | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '/Users/dcast/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/dcast/google-cloud-sdk/path.zsh.inc'; fi | |
# The next line enables shell command completion for gcloud. | |
if [ -f '/Users/dcast/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/dcast/google-cloud-sdk/completion.zsh.inc'; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment