Skip to content

Instantly share code, notes, and snippets.

View PostgreSqlStan's full-sized avatar

PostgreSQL Stan PostgreSqlStan

View GitHub Profile
@PostgreSqlStan
PostgreSqlStan / install-pagila.md
Last active August 6, 2023 15:44
Install postgres pagila (DVD rental) database

Install pagila in local postgres db

These directions assume postgres is installed locally with a user—preferably not a superuser—with the same name as your OS username.

From the shell:

curl -OL https://github.com/devrimgunduz/pagila/archive/refs/tags/pagila-v3.1.0.tar.gz
tar -xvf pagila-pagila-v3.1.0.tar
cd pagila-pagila-v3.1.0
@PostgreSqlStan
PostgreSqlStan / bindlist.zsh
Last active September 18, 2023 02:51
zsh function: list key bindings with different display options
# NEW VERSION: see gist comment for link to refactored version
######################################################################################
# started as an alias, see https://postgresqlstan.github.io/zsh/binds/
# my 1st attempt to do anything semi-complicated with shell scripting
# don't know what i'm doing, just hacking pieces together until it works
bindlist () {
local flag_help flag_list flag_pretty
local usage=(
@PostgreSqlStan
PostgreSqlStan / bindlist.zsh
Last active April 5, 2024 18:33
bindlist (refactored)
# version 0.3 (see CHANGE NOTES comment below)
bindlist () {
local flag_all flag_help flag_list flag_raw
local usage=(
"Usage:"
" bindlist list bindings"
" bindlist -h --help print this message"
"Options:"
" -a --all include all bindings"
" -l --list single column output"