Skip to content

Instantly share code, notes, and snippets.

View karmadonov's full-sized avatar
🥷

Kirill Karmadonov karmadonov

🥷
View GitHub Profile
@Kartones
Kartones / postgres-cheatsheet.md
Last active June 26, 2024 18:01
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)
@dlo
dlo / gist:3710050
Created September 12, 2012 21:26
Delete All Remote Merged Branches
git b -r --merged | grep -v master | grep -v HEAD | sed 's/origin\///g' | sed 's/ //g' | xargs -I {} git push --delete origin {}
@karmadonov
karmadonov / Nightbook.yaml
Created January 3, 2012 10:28
Ludovico Einaudi - Nightbook YAML example
title: Nightbook
artist: Ludovico Einaudi
tags: [classical, neoclassical, contemporary classical]
release_date: 2009-09-20
label: Sony Classical
country: United Kingdom
barcode: 028947636397
cover: cover.jpg
files: