Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Last active September 28, 2023 20:53
Show Gist options
  • Select an option

  • Save wilmoore/b3b71d23dd0edf5783c1a02d2e9dec36 to your computer and use it in GitHub Desktop.

Select an option

Save wilmoore/b3b71d23dd0edf5783c1a02d2e9dec36 to your computer and use it in GitHub Desktop.
Income Sources :: Jobs :: 2022 :: HP :: Lens :: Repos :: poly-glass :: team-mo :: tooling :: silica-local-cloud :: » db

Income Sources :: Jobs :: 2022 :: HP :: Lens :: Repos :: poly-glass :: team-mo :: tooling :: silica-local-cloud :: db

⪼ Made with 💜 by realpolyglot.com

related

examples

./db.sh match-maker

db.sh

#!/usr/bin/env sh
SERVICE=$1
PGUSER=$(cat docker-compose.yaml | grep $SERVICE: -A 30 | grep 'DB_USER:' | awk -F':' '{ print $2 }' | tr -d ' ')
PGPASS=$(cat docker-compose.yaml | grep $SERVICE: -A 30 | grep 'DB_PASS:' | awk -F':' '{ print $2 }' | tr -d ' ')
PGUSER=$PGUSER PGPASSWORD=$PGPASS psql -h localhost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment