Skip to content

Instantly share code, notes, and snippets.

@elijahboston
Last active August 17, 2019 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elijahboston/c08e85b823129d27f82470ed2ba14740 to your computer and use it in GitHub Desktop.
Save elijahboston/c08e85b823129d27f82470ed2ba14740 to your computer and use it in GitHub Desktop.
ZSH Aliases and Functions
### GENERAL PURPOSE
# Find out what's running on the given port
# > onport 8080
onport() {
lsof -w -n -i tcp:${1}
}
### AWS
# Quick SSH into EC2 node
# > ec2 <ip/hostname>
ec2 () {
ssh -i ~/keys/mykey.pem ec2-user@${1}
}
### DOCKER
# SSH into container
dcsh() {
docker-compose exec ${1} sh
}
# Deploy stack from docker-compose.yml
# > dsd mystack
dsd() {
docker stack deploy ${1} --compose-file docker-compose.yml
}
### ALIASES
# Enable Google Analytics logging to console
alias logcatga="adb shell setprop log.tag.GAv4 DEBUG;adb logcat -v time -s GAv4;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment