Skip to content

Instantly share code, notes, and snippets.

View celestebyte's full-sized avatar

Celeste celestebyte

View GitHub Profile
@celestebyte
celestebyte / commands.sh
Created April 28, 2025 22:46
Setup local postgres DB docker
POSTGRES_VERSION="15"
docker run --name local_postgres -e POSTGRES_PASSWORD="password-in-local" -p 5432:5432 -d "postgres:$POSTGRES_VERSION"
# if we need to mount a local volume to setup a backup
docker run --name local_postgres -e POSTGRES_PASSWORD="password-in-local" -p 5432:5432 -d -v .:/var/task/shared_volume "postgres:$POSTGRES_VERSION"
# Then get a bash command line to setup the database
docker exec -it local_postgres bash
# Inside the container we can use the tools of postgres like
@celestebyte
celestebyte / sha256folder.sh
Created April 28, 2025 22:36
sha256 of folder
find \(-name "*.js" -o -name "*.mjs"\) -not -path "./node_modules" -exec sha256sum {} \; | sort > hash-list.txt
@celestebyte
celestebyte / Dockerfile
Last active April 29, 2025 22:59
Lambda layer pyhton3.12 & python3.13 psycopg2 psycopg3
FROM amazon/aws-lambda-python:3.12
# If your system work trough proxy or VPN and got errors from the update like 'SSL certificate problem: unable to get local issuer certificate'
# add your certificates at using the following lines
# COPY my-bundle.pem /etc/pki/ca-trust/source/anchors/my-bundle.pem
# RUN update-ca-trust
#RUN dnf -y update && dnf -y upgrade && \
# dnf -y install libffi-devel postgresql-devel postgresql-libs zip rsync wget openssl openssl-devel gcc