Skip to content

Instantly share code, notes, and snippets.

View ChristianAlexander's full-sized avatar

Christian Alexander ChristianAlexander

View GitHub Profile
@ChristianAlexander
ChristianAlexander / db_transaction_id.ex
Last active February 7, 2026 20:53
Passing metadata as ash_json_api response headers
defmodule KitchenManager.Changes.DBTransactionId do
use Ash.Resource.Change
@impl true
def atomic?(), do: true
@impl true
def change(changeset, _opts, _context) do
Ash.Changeset.after_action(changeset, fn _changeset, record ->
record =
@ChristianAlexander
ChristianAlexander / update-deps.md
Created January 29, 2026 14:58
Update Elixir Dependencies Skill

Update Elixir Dependencies

Update all outdated dependencies in this Elixir project, handling both safe updates and breaking changes.

Workflow

1. Identify Outdated Dependencies

Run mix hex.outdated to get a list of all outdated dependencies. Parse the output to identify:

  • Safe updates: Dependencies where only the patch or minor version has changed (no major version bump)
@ChristianAlexander
ChristianAlexander / reqllm.livemd
Last active November 28, 2025 05:31
req_llm Demo Livebook

ReqLLM Demonstration

Mix.install([
  {:zoi, "0.8.1"},
  {:req_llm, github: "agentjido/req_llm", ref: "main"},
  {:kino, "~> 0.17.0"}
])

Reactor Demo

Mix.install([
  {:reactor, "~> 0.15.5"},
  {:kino, "~> 0.16.0"},
  {:nanoid, "~> 2.1"}
])
@ChristianAlexander
ChristianAlexander / Coding Agent README.md
Last active February 12, 2026 08:50
Setup Steps for Copilot Coding Agent in Phoenix Apps

Setup Steps

Workflow File

Add copilot-setup-steps.yml to your .github/workflows directory so Copilot Coding Agent doesn’t get lost trying to set up Elixir and Erlang.

This also ensures a postgres database is running, which is helpful for Phoenix apps out of the box.

Dependencies are cached to make the agent start up quickly, as well as saving on metered GitHub Actions compute time.

Copilot Instructions

@ChristianAlexander
ChristianAlexander / notebook.livemd
Created February 21, 2025 14:15
Pythonx: Python in Elixir

Pythonx

Mix.install([
  {:pythonx, "~> 0.3.0"},
  {:kino, "~> 0.14.2"},
  {:kino_vega_lite, "~> 0.1.13"}
])

Benchee Demos

Mix.install([
  {:benchee, "~> 1.3"},
  {:kino_benchee, "~> 0.1.0"},
  {:jason, "~> 1.4"},
  {:jiffy, "~> 1.1"},
  {:benchee_markdown, "~> 0.3.3"}
])
@ChristianAlexander
ChristianAlexander / detect.livemd
Last active November 7, 2025 18:05
Face Detection in Elixir

Face Detection in Elixir

Mix.install(
  [
    {:evision, "~> 0.1"},
    {:kino, "~> 0.7"}
  ],
@ChristianAlexander
ChristianAlexander / Podcast Transcription.livemd
Created April 12, 2024 23:03
Podcast Transcription LiveBook

Podcast Transcription

Mix.install([
  {:req, "~> 0.4.14"},
  {:fast_rss, "~> 0.5.0"},
  {:bumblebee, "~> 0.5.3"},
  {:exla, "~> 0.7.1"},
  {:kino, "~> 0.12.3"}
])
function formatMatch({ indices, value }) {
let lastIndex = 0;
return (
<span>
{indices.map(([start, end], index) => {
const nonMatch = value.slice(lastIndex, start);
lastIndex = end;
const match = value.slice(start, end);
return (
<React.Fragment key={index}>