Skip to content

Instantly share code, notes, and snippets.

@tkersey
tkersey / the-alegbra-of-typescript.md
Last active October 17, 2021 06:08
The Algebra of [Type,Script]

Algebra

Symbols Operations Laws
0, 1, 2, x, y, z, ... +, –, x, ÷, ... 0 + x = x, ...

Algebra

Symbols Operations Laws
@kipcole9
kipcole9 / function_clause.ex
Created October 23, 2019 11:04
Debug Elixir Function Clause errors
defmodule FunctionClause do
@moduledoc """
Format function clauses using Exception.blame/3
"""
@doc """
Given a `module`, `function`, and `args` see
if that function clause would match or not match.
This is useful for helping diagnose function
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 3, 2024 20:51
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)