Skip to content

Instantly share code, notes, and snippets.

@mikehale
Created July 26, 2016 16:05
Show Gist options
  • Save mikehale/494d8af1aed6dc9e5f8f724db3401062 to your computer and use it in GitHub Desktop.
Save mikehale/494d8af1aed6dc9e5f8f724db3401062 to your computer and use it in GitHub Desktop.
`ruby -ruri -e 'uri = URI.parse(ENV["DATABASE_URL"]); puts %(env PGPASSWORD=#{uri.password} psql --dbname=#{uri.path[1..-1]} --host=#{uri.host} --port=#{uri.port} --username=#{uri.user} --no-password)'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment