Skip to content

Instantly share code, notes, and snippets.

@hyebahi-trustarc
hyebahi-trustarc / cmp-generic-event-listener.js
Last active March 8, 2024 14:11
CMP - Generic Event Listener
window.addEventListener("message", (event) => {
let eventDataJson = null;
// We only care about TrustArc Events at this point. And TrustArc's even it encoded in JSON
try {
eventDataJson = JSON.parse(event.data);
} catch {
// Some other event that is not JSON.
// TrustArc encodes the data as JSON
// console.log(event.data);
@rponte
rponte / using-uuid-as-pk.md
Last active July 24, 2024 18:42
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active July 24, 2024 07:10
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux