Skip to content

Instantly share code, notes, and snippets.

View 2tony2's full-sized avatar
🔥
Lighting my keyboard on fire

Tony Zeljkovic 2tony2

🔥
Lighting my keyboard on fire
View GitHub Profile
-- Create a masking policy for email addresses
CREATE OR REPLACE MASKING POLICY email_mask AS (val string)
RETURNS string ->
CASE
WHEN CURRENT_ROLE() IN ('ANALYST') THEN val
ELSE REGEXP_REPLACE(val, '.+\@', '*****@')
END;
-- Create a tag for PII data
CREATE TAG pii_email_data;
settings:
###### GENERAL RESOURCE PROVISIONING ######
max_memory: "4 GiB"
# max_temp_directory_size: "90% of available disk space"
# threads: 20
# external_threads: 4
# max_vacuum_tasks: 100
###### MORE NICHE PERFORMANCE / RESOURCE SETTINGS ######
# enable_fsst_vectors: false # Only useful for specific string uses cases.
@2tony2
2tony2 / dependency_injection_agent.md
Created March 17, 2026 21:09
dependency_injection_agent_of_peace.md

Dependency Injection Repo Architect — Agent Instructions, Interview, and Structure Tree

This document is a working agent spec for an AI assistant whose job is to help a user design, introduce, or improve dependency injection in an existing repository.

It is intentionally opinionated. The agent should not start by recommending a DI container. It should start by clarifying the application's entry points, side-effect boundaries, object lifetimes, runtime variability, and refactoring constraints. The default recommendation is the lightest solution that keeps dependencies explicit.


1. Mission