Skip to content

Instantly share code, notes, and snippets.

@heypoom
Created April 19, 2018 18:45
Show Gist options
  • Save heypoom/d94e72a055643341fa0cc6a58bc91ab3 to your computer and use it in GitHub Desktop.
Save heypoom/d94e72a055643341fa0cc6a58bc91ab3 to your computer and use it in GitHub Desktop.
# --- Workspaces Management Commands ---
# ws: Manage Workspaces
ws() {
make -C "$HOME/Workspaces/$1" $2
}
# wg: Go to Workspace
wg() {
cd "$HOME/Workspaces/$1" || return
}
# wsh: Shell into the Workspace
wsh() {
docker exec -it "$1" bash
}
# wr: Run the Workspace
wr() {
(wg $1 && docker-compose up -d)
}
# wk: Kill the Workspace
wk() {
(wg $1 && docker-compose down)
}
# --- Project Commands ---
# pr: Manage Projects
pr() {
make -C "$HOME/Projects/$1" $2
}
# pg: Go to Projects
pg() {
cd "$HOME/Projects/$1" || return
}
# psh: Shell into the Project
psh() {
docker exec -it "$1" bash
}
# prn: Run the Project
prn() {
(pg $1 && docker-compose up -d)
}
# pk: Kill the Project
pk() {
(pg $1 && docker-compose down)
}
# --- Lab Commands ---
# lb: Manage Labs
lb() {
make -C "$HOME/Labs/$1" $2
}
# lg: Go to Labs
lg() {
cd "$HOME/Labs/$1" || return
}
# lsh: Shell into the Project
lsh() {
docker exec -it "$1" bash
}
# lrn: Run the Experiment
lrn() {
(lg $1 && docker-compose up -d)
}
# pk: Kill the Experiment
lk() {
(lg $1 && docker-compose down)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment