Skip to content

Instantly share code, notes, and snippets.

@ianebeckett
Last active July 4, 2024 18:04
Show Gist options
  • Save ianebeckett/2075c94f48dea22e55ab24fac40f8d80 to your computer and use it in GitHub Desktop.
Save ianebeckett/2075c94f48dea22e55ab24fac40f8d80 to your computer and use it in GitHub Desktop.
# git
alias gs='git status'
#alias cc='git commit -v'
# aliases in ~/.dotfiles/.gitconfig
alias gl='git l'
alias glg='git lg'
alias gld='git ld'
alias ls='ls -lh --color=auto --group-directories-first --format=single-column'
alias la='command ls -lha --color=auto --group-directories-first' # aliases are recursive
alias path='<<<${(F)path}'
alias mv='mv -i'
alias rm='rm -I'
alias mkdir="mkdir -p"
# cdls that works with git bash
alias cd='f(){ cd "$@" && ls; unset -f f;}; f'
nodeVersions() {
# installed via official bash script at github.com/nvm-sh/nvm
echo "nvm --version"
nvm --version; echo
echo "nvm ls"
nvm ls; echo
# installed via `node install`
# Check that this matches nvm's node version. Mismatch may indicate that
# node was installed using a different package manager e.g. apt
echo "node --version"
node --version; echo
echo "npm --version"
npm --version; echo
echo "npm list -g"
npm list -g; echo
echo "npm list"
npm list; echo
echo "yarn --version"
yarn --version; echo
echo "yarn global list"
yarn global list; echo
echo "yarn list"
yarn list; echo
}
case "$SHELL" in
/usr/bin/bash) # git bash
cd /c/devroot
;;
/bin/bash) # WSL
cd /mnt/c/devroot
;;
*)
echo '.bashrc: unexpected value for $SHELL'
;;
esac
# environment variables
# use the new Docker CLI (docker buildx) for builds instead of the classic Docker CLI (docker build)
export COMPOSE_DOCKER_CLI_BUILD=1
@ianebeckett
Copy link
Author

ianebeckett commented Jun 19, 2024

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