Skip to content

Instantly share code, notes, and snippets.

View filipevarjao's full-sized avatar

Filipe Varjão filipevarjao

View GitHub Profile
@filipevarjao
filipevarjao / postgres-cheatsheet.md
Created July 24, 2019 20: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 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)
@filipevarjao
filipevarjao / program_profile.sh
Created September 14, 2017 17:36 — forked from Miliox/program_profile.sh
Script SAR (kSar Compatible)
#!/bin/bash
#Autor: Emiliano Carlos de Moraes Firmino
#Comentario: igual a usar "sar -A 1", mas sem a interface de rede
# que não abre no kSar
#Script Variables
output_file="sar_data.txt" #arquivo de saída
interval=1 #taxa de amostragem em segundos
#Inicia rodada de testes
@filipevarjao
filipevarjao / 17503-eliminate-rescan.md
Created August 18, 2017 22:15 — forked from aclements/17503-eliminate-rescan.md
Preview of proposal go/golang#17503

Proposal: Eliminate STW stack re-scanning

Author(s): Austin Clements, Rick Hudson

Last updated: 2016-10-18

Discussion at https://golang.org/issue/17503.

Abstract