Last active
April 9, 2024 10:03
-
-
Save santhosh-chinnasamy/02486a2afd3ff0f9b65af7ea06197d4c to your computer and use it in GitHub Desktop.
~/.aliases
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
## source rvm | |
source /Users/santhosh/.rvm/scripts/rvm | |
alias y=yarn | |
alias python=python3 | |
di(){ | |
docker images | |
} | |
dp(){ | |
docker ps -a | |
} | |
gen_brewfile(){ | |
brew bundle dump --file=~/Brewfile --force | |
} | |
alias dc="docker-compose" | |
alias dex="docker exec -ti" | |
alias cat="bat" | |
alias sp="RAILS_ENV=test bundle exec rspec" | |
## docker remove dangline images | |
dclean() { | |
docker rmi $(sudo docker images -f "dangling=true" -q) | |
} | |
dvclean(){ | |
docker volume ls | |
echo "----------------------------------" | |
echo "\n \n" | |
sleep 0.5 | |
docker volume prune | |
} | |
## Minikube setup without k3s | |
#alias mkube_setup="minikube start --docker-opt=bip=172.17.42.1/16 --no-kubernetes --cpus=4 --disk-size=80g" | |
zrc(){ | |
echo -e "sourcing zsh...." | |
source ~/.zshrc | |
} | |
hg(){ | |
history | grep $1 | |
} | |
pkill(){ | |
kill -9 $1 | |
} | |
# generate random string | |
rand(){ | |
LENGTH=${1:-16} | |
head /dev/urandom | tr -dc 'A-Za-z0-9!#$%&*+,-.<=>?@_' | head -c $LENGTH ; echo '' | |
} | |
## SSH via tunnel | |
alias t="ssh -J tunnel" | |
## Public IP | |
alias pi="curl -4 ifconfig.so" | |
## print generate paths for vscode-ruby-debugger | |
get_rvm_path(){ | |
printf "\n\"env\": {\n \"PATH\": \"$PATH\",\n \"GEM_HOME\": \"$GEM_HOME\",\n \"GEM_PATH\": \"$GEM_PATH\",\n \"RUBY_VERSION\": \"$RUBY_VERSION\"\n}\n\n" | |
} | |
## terraform | |
alias tf=terraform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment