Skip to content

Instantly share code, notes, and snippets.

View linusdm's full-sized avatar

Linus De Meyere linusdm

View GitHub Profile
@linusdm
linusdm / repro_ecto_bug.livemd
Last active March 12, 2023 20:14
Reproduction of ecto inputs_for bug

Reproduction of ecto inputs_for bug

Mix.install([
  {:ecto, "~> 3.9"},
  {:phoenix_html, "~> 3.3"},
  {:phoenix_ecto, "~> 4.4"}
])

ExUnit.start(auto_run: false)
@linusdm
linusdm / repro.livemd
Last active May 5, 2023 19:23
Reproduction ex_cldr_territories bug: missing localisation for country code CQ (`Cldr.Territory.from_territory_code/2,3`)
Mix.install([
  {:jason, "~> 1.4"},
  {:ex_cldr, "== 2.37.0"},
  {:ex_cldr_territories, github: "schultzer/cldr_territories", override: true}
])

Section

@linusdm
linusdm / repro.livemd
Created August 11, 2023 15:28
Fsmx repro transition_changeset

fsmx repro

Mix.install([
  {:ecto, "~> 3.10"},
  # change to 0.4.1 to see how it worked previously
  {:fsmx, "0.5.0"}
])
@linusdm
linusdm / elixir.lua
Last active January 20, 2024 20:24
Execute "ManipulatePipes" command in LazyVim
--[[
Triggering these keymaps will transform code that uses the pipe operator to a regular call, and back again.
It's implemented by the command "manipulatePipes" that ElixirLS exposes through the executeCommand interface.
Add this code to a new or existing file under `lua/config/plugins` so it's picked up by LazyVim.
Change the triggering key combinations to your liking.
]]--
local get_cursor_position = function()
local row, col = unpack(vim.api.nvim_win_get_cursor(0))