Skip to content

Instantly share code, notes, and snippets.

View timmoti's full-sized avatar
🎯
Focusing

Timothy Tan timmoti

🎯
Focusing
View GitHub Profile
@timmoti
timmoti / postgres-cheatsheet.md
Created September 6, 2017 08:26 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -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)
@timmoti
timmoti / gist:0833d53ae7dd321dce6e7d8e8bceaee2
Created July 13, 2020 02:00 — forked from hpjaj/gist:ef5ba70a938a963332d0
RSpec - List of available Expectation Matchers - from Lynda.com course 'RSpec Testing Framework with Ruby'
## From Lynda.com course 'RSpec Testing Framework with Ruby'
describe 'Expectation Matchers' do
describe 'equivalence matchers' do
it 'will match loose equality with #eq' do
a = "2 cats"
b = "2 cats"
expect(a).to eq(b)