Skip to content

Instantly share code, notes, and snippets.

@kevinfiol
Last active May 5, 2024 02:10
Show Gist options
  • Save kevinfiol/b7a300e8cd7ab51a5e6778268b914bb4 to your computer and use it in GitHub Desktop.
Save kevinfiol/b7a300e8cd7ab51a5e6778268b914bb4 to your computer and use it in GitHub Desktop.
shell configs
if [ -f ~/me/.profile.sh ]; then
. ~/me/.profile.sh
fi
# allow unfree nix
export NIXPKGS_ALLOW_UNFREE=1
# convenience aliases
alias m='micro'
alias cmus:update='bash ~/me/scripts/update_cmus.sh'
alias where='type'
alias docker-compose='docker compose'
alias serve='sfz --cors --render-index'
alias ld='lazydocker'
alias prof="micro $HOME/me/.profile.sh"
alias myenv="micro $HOME/me/.env.sh"
alias conf="micro $HOME/.config/home-manager/home.nix"
alias switch="home-manager switch && nix-collect-garbage"
alias run:keybase="bash $HOME/me/apps/run_nix_keybase.sh"
alias vpn:allow="bash $HOME/me/scripts/clear_zscaler_security.sh"
alias apt:update="sudo apt update && sudo apt autoclean && sudo apt clean && sudo apt autoremove"
alias rmm='rm -rf'
## git aliases
alias push='git push origin $(git branch --show-current)'
alias pull='git pull origin $(git branch --show-current)'
alias hard='git reset --hard HEAD'
alias fetch='git fetch'
alias add='git add -A'
alias commit='git commit -m '
alias delete='git push origin --delete'
## pg.sh aliases
alias pgs='ssh -i ~/.ssh/id_ed25519 pgs.sh'
alias pgs:up='scp -r * pgs.sh:/'
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
if [ -f $HOME/me/.profile-work.sh ]; then
source $HOME/me/.profile-work.sh
fi
if [ -f $HOME/me/.env.sh ]; then
source $HOME/me/.env.sh
fi
# git prompt support
# from here: https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
# see: https://archive.md/JzMYJ
source ~/.config/.git-prompt.sh
# comment the line below if you want the default prompt by linux mint
PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\] '
#PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[\033[00m\]\[\033[01;34m\]\w\[\033[00m\] '
# comment the line below if you want to disable the git prompt
PS1="$PS1"'$(__git_ps1 "\[\e[32m\][%s]\[\e[0m\] ")'
# ruby setup
# alias chruby="$HOME/me/apps/chruby/bin/chruby-exec"
alias "ruby-install"="$HOME/me/apps/ruby-install/bin/ruby-install"
source $HOME/me/apps/chruby/share/chruby/chruby.sh
source $HOME/me/apps/chruby/share/chruby/auto.sh
# fzf setup
export FZF_DEFAULT_OPTS='--reverse'
source $HOME/.local/share/fzf/key-bindings.bash
source $HOME/.local/share/fzf/completion.bash
# deno setup
export PATH="$HOME/.deno/bin:$PATH"
# fnm
eval "`fnm env`"
eval "$(fnm env --use-on-cd)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment