Skip to content

Instantly share code, notes, and snippets.

@MatMoore
MatMoore / eagerloading.md
Created June 23, 2025 10:56
Django vs Rails eager loading
Rails Django Description
preload prefetch_related one query per table
eager_load select_related one query with joins
includes N/A same as preload if associated table not references, otherwise eager_load
@MatMoore
MatMoore / notes.md
Last active May 28, 2025 10:16
Automated accessibility testing with playright (python)
@MatMoore
MatMoore / Gitleaks vs Github.md
Last active April 17, 2025 16:01
Secret scanning comparison

Cost/licensing

What's detected

@MatMoore
MatMoore / Nunjucks vs Jinja.md
Last active April 10, 2025 11:18
Nunjucks / Jinja compatability spike
@MatMoore
MatMoore / logs.md
Created July 23, 2024 08:22
0.13.2.4
2024-07-03T11:39:41.2461669Z [2024-07-03 11:39:41,181] ERROR    {datahub.ingestion.run.pipeline:491} - Caught error
2024-07-03T11:39:41.2463027Z Traceback (most recent call last):
2024-07-03T11:39:41.2465452Z   File "/home/runner/work/data-catalogue/data-catalogue/.venv/lib/python3.11/site-packages/datahub/sql_parsing/sqlglot_utils.py", line 239, in try_format_query
2024-07-03T11:39:41.2467355Z     return expression.sql(dialect=dialect, pretty=True)
2024-07-03T11:39:41.2468362Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-03T11:39:41.2470085Z   File "/home/runner/work/data-catalogue/data-catalogue/.venv/lib/python3.11/site-packages/sqlglot/expressions.py", line 601, in sql
2024-07-03T11:39:41.2471674Z     return Dialect.get_or_raise(dialect).generate(self, **opts)
2024-07-03T11:39:41.2472492Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-03T11:39:41.2475987Z   File "/home/runner/work/data-catalogue/data-catalogue/.venv/lib/python3.11/site-packages/sqlglot/diale
@MatMoore
MatMoore / concat.py
Created July 17, 2024 07:53
Long query examples
expression = """
WITH T2 AS ( SELECT (
coalesce('foo', 'bar') ||
coalesce('foo', 'bar') ||
coalesce('foo', 'bar') ||
coalesce('foo', 'bar') ||
coalesce('foo', 'bar') ||
coalesce('foo', 'bar') ||
coalesce('foo', 'bar') ||
coalesce('foo', 'bar') ||
@MatMoore
MatMoore / links.md
Last active February 5, 2024 17:11
Resources for building a search form in Django
@MatMoore
MatMoore / Rspec output.txt
Created February 5, 2024 11:27
Finder frontend behaviour
TopicalFacet
#sentence_fragment
multiple values
is expected to eql "end_date"
disallowed values
is expected to be nil
single value
is expected to eql "end_date"
Registries::TopicTaxonomyRegistry
@MatMoore
MatMoore / emfs_glossary_wrangler.py
Created December 12, 2023 10:28
EMFS glossary spreadsheet to Datahub script
"""
Can't capture exactly:
- condionally required fields
- validation rules
- format
"""
import csv
from os import environ
@MatMoore
MatMoore / kotlin.md
Last active November 21, 2022 10:42
Kotlin learning pathway