Skip to content

Instantly share code, notes, and snippets.

View ken-kost's full-sized avatar

Kenneth Kostrešević ken-kost

  • Reintegrate
  • Zagreb
  • 19:55 (UTC +01:00)
View GitHub Profile
@ken-kost
ken-kost / rules.md
Last active May 13, 2025 18:22 — forked from zachdaniel/rules.md

Generating Code

Use list_generators to list available generators when available, otherwise mix help. If you have to run generator tasks, pass --yes. Always prefer to use generators as a basis for code generation, and then modify afterwards.

Ash

Use code interfaces on domains to define the contract for calling into Ash resources. See the Code interface guide for more.

After creating or modifying Ash code, run mix ash.codegen <short_name_describing_changes> to ensure any required additional changes are made (like migrations are generated).

@ken-kost
ken-kost / HookAnimatedSparkles.js
Created January 14, 2025 11:51 — forked from tylerbarker/HookAnimatedSparkles.js
Phoenix LiveView - Animated Sparkles JS Hook
/**
Phoenix LiveView - Animated Sparkles JS Hook
Ported from this excellent React tutorial:
https://www.joshwcomeau.com/react/animated-sparkles-in-react
SETUP:
Add to your tailwind.config.js theme.extend.animation:
"sparkle-spin": "sparkle-spin 600ms linear forwards"