Skip to content

Instantly share code, notes, and snippets.

View jawj's full-sized avatar

George MacKerron jawj

View GitHub Profile
@jawj
jawj / pgconf.eu.2023.sql
Created November 12, 2024 17:19
Load pgconf PDFs in psql
\set contents `base64 < "path/to/pgconf.eu.2023/2023.pgconf.eu Zero Downtime PostgreSQL Upgrades.pdf"`
insert into docs (name, fulltext) values ($$2023.pgconf.eu Zero Downtime PostgreSQL Upgrades.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/20231215_PGConfEU_What-cant-pgBackRest-do-for-you.pdf"`
insert into docs (name, fulltext) values ($$20231215_PGConfEU_What-cant-pgBackRest-do-for-you.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/A journey into postgresql logical replication.pdf"`
insert into docs (name, fulltext) values ($$A journey into postgresql logical replication.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Breaking Up Massive Tables with Partitioning.pdf"`
insert into docs (name, fulltext) values ($$Breaking Up Massive Tables with Partitioning.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 <
@jawj
jawj / gist:04a90e51196ac054d6741c8d079d9cff
Created January 16, 2025 18:29
Signature algorithm digest name from X.509 certificate
function x509Error() {
throw new Error('Could not extract signature algorithm digest from server certificate to perform channel binding')
}
function readASN1Length(data, index) {
let length = data[index++]
if (length < 0x80) return { length, index }
const lengthBytes = length & 0x7f
if (lengthBytes > 4) x509Error()
@jawj
jawj / sslrootcert.md
Last active March 24, 2025 17:29
sslrootcert=system support