Skip to content

Instantly share code, notes, and snippets.

@mkraft
mkraft / README.md
Last active June 22, 2023 15:46
Using exiftool to update a custom PDF property.

Update a PDF custom property named "signature":

exiftool -config exiftool_config -signatures='[{"page":1,"x":342,"y":646}]' -form_data='[{"name":"POS-010[0].Page2[0].Sign[0].SigDate[0]","value":"[date]"}]' my.pdf

Verify the values:

exiftool  -config exiftool_config -signatures -form_data my.pdf
@mkraft
mkraft / readme.md
Last active February 15, 2023 12:52
Get the oldest review date of an Udemy course.

Get the oldest review date of an Udemy course, since they hide the course creation date.

Requires htmlq and jq.

Example usage:

$ ./udemy-oldest-review.sh graphql-with-react-course
2017-02-15T08:53:45-08:00
@mkraft
mkraft / fdw.md
Last active February 21, 2023 18:04
foreign data wrappers POC

foreign data wrappers POC

local test setup

docker run \
    --name pg-playground \
    -p 5432:5432 \
    -e POSTGRES_DB=manifest \
    -e POSTGRES_USER=mmuser \
@mkraft
mkraft / README.md
Last active February 22, 2023 12:53
Bitnami Postgresql synchronous commit test setup

startup:

docker-compose up

psql in each a node, if desired (nodes are pg-source, pg-replica1, and pg-replica2):

docker exec -it pg-source bash -c 'PGPASSWORD=my_password psql -U my_user -d my_database -P pager=off -P expanded=auto'

read replication log sequence number (LSN) position: