Last active
August 5, 2024 14:36
-
-
Save christo8989/b402707a19fce6d283882f784c327254 to your computer and use it in GitHub Desktop.
Front End (Angular) developer .bash_profile file.
This file contains 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
# https://stackoverflow.com/a/416931 | |
# https://askubuntu.com/a/121075 | |
# load bash_profile from a gist | |
reload() { | |
# Windows | |
# $user_path="$USERPROFILE" | |
# curl -o "$USERPROFILE/.bashrc_gist" -H "Cache-Control: no-cache" https://gist.githubusercontent.com/christo8989/b402707a19fce6d283882f784c327254/raw/.bashrc_gist | |
# source "$USERPROFILE/.bashrc_gist" | |
# Mac / Linux? | |
# https://stackoverflow.com/a/57734278 | |
# user_path="~" | |
# source /dev/stdin <<<"$( curl -sS -H 'Cache-Control: no-cache' https://gist.githubusercontent.com/christo8989/b402707a19fce6d283882f784c327254/raw/.bashrc_gist )" | |
} | |
reload; | |
welcomemessage; |
This file contains 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
# BASH Shortcuts | |
tohistory() { | |
command="$1"; | |
history -s $command; | |
$command; | |
} | |
# ng | |
alias nrs="npm run start" | |
alias lint="ng lint" | |
alias nrb="npm run build" | |
alias nrt="npm run test" | |
module() { tohistory "ng g m $1 --dry-run"; } | |
component() { tohistory "ng g c $1 --changeDetection=OnPush --skipTests --entryComponent=false --export=false --flat=false --prefix=app --dry-run"; } | |
# npm | |
alias install="npm install --no-save" | |
alias pinstall="npm i -P" | |
alias dinstall="npm i -D" | |
alias uninstall="npm uninstall" | |
alias audit="npm audit fix" | |
alias hail-mary="npm cache clear --force" | |
# git | |
pull() { [[ -z "$1" ]] && git pull || git pull origin "$1"; } | |
gpl() { [[ -z "$1" ]] && git pull || git pull origin "$1"; } | |
alias push="git push" | |
alias gph="git push" | |
alias branch="git checkout -b" | |
alias gbc="get checkout -b" | |
alias branches="git branch" | |
alias gb="git branch" | |
alias checkout="git checkout" | |
alias gco="git co" | |
clone() { tohistory "git clone https://github.com/christo8989/$1.git"; } | |
# test | |
alias welcomemessage="echo 'node:' $(node --version) '\ngit:' \"${$(git version):12:-1}\" '\n\nHello Chris! Welcome to the Matrix.\n'" | |
# godot | |
alias godot="/Applications/Godot.app/Contents/MacOS/Godot --path $PWD" | |
alias gut="godot -s addons/gut/gut_cmdln.gd" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment