Skip to content

Instantly share code, notes, and snippets.

@elijahboston elijahboston/custom.zsh
Last active Aug 17, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.