Skip to content

Instantly share code, notes, and snippets.

@richardbporter
Created May 2, 2022 17:36
Show Gist options
  • Save richardbporter/369c3901c1d0be7642437704f9328cca to your computer and use it in GitHub Desktop.
Save richardbporter/369c3901c1d0be7642437704f9328cca to your computer and use it in GitHub Desktop.
.bash_profile
# Bash completions.
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
# Set the default system editor.
export EDITOR='code'
# Set CLI color.
export CLICOLOR=1
# Git prompt.
# export PS1='\u@mbp:\W$(__git_ps1)\$ '
export PS1='\[\033[01;32m\]\u@mbp\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ '
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWSTASHSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWCOLORHINTS=true
export GIT_PS1_SHOWUPSTREAM=auto
# Highlight grep results in color.
export GREP_OPTIONS='--color=always'
# Convert Quicktime captures to GIF.
function movtogif() {
ffmpeg -i "$1" -vf scale=800:-1 -r 10 -f image2pipe -vcodec ppm - |\
convert -delay 5 -layers Optimize -loop 0 - "$2"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment