Last active
August 17, 2019 17:41
-
-
Save elijahboston/c08e85b823129d27f82470ed2ba14740 to your computer and use it in GitHub Desktop.
ZSH Aliases and Functions
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
### 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