Skip to content

Instantly share code, notes, and snippets.

View guipdutra's full-sized avatar

Guilherme Dutra guipdutra

View GitHub Profile
@guipdutra
guipdutra / postgres-cheatsheet.md
Created May 14, 2019 19:34 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@guipdutra
guipdutra / capybara cheat sheet
Created February 28, 2013 18:11 — forked from zhengjia/capybara cheat sheet
Capybara reference
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')