Skip to content

Instantly share code, notes, and snippets.

View graydenshand's full-sized avatar

Grayden graydenshand

  • Beta Technologies
  • Vermont
View GitHub Profile
@graydenshand
graydenshand / create_permission_groups.sql
Created July 25, 2023 17:52
Basic Postgres Permission Groups
-- Create a groups to assign permissions to
CREATE GROUP main;
CREATE GROUP read_only;
-- Revoke default permission settings
REVOKE ALL ON DATABASE <database_name> FROM PUBLIC, main, read_only;
REVOKE ALL ON SCHEMA public FROM PUBLIC, main, read_only;
REVOKE ALL
import argparse
import secrets
import string
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-s", "--symbols", help="Include symbols in password", action="store_true")
parser.add_argument("-l", "--length", type=int, default=16, help="Password length")
args = parser.parse_args()