Skip to content

Instantly share code, notes, and snippets.

View shahryarjb's full-sized avatar
👐
I am ready for a new job offer and relocation

Shahryar Tavakkoli shahryarjb

👐
I am ready for a new job offer and relocation
View GitHub Profile
@greven
greven / core_components.ex
Last active April 14, 2025 19:57
Phoenix CSS Icons
@doc """
Renders an icon.
Supports three icon libraries:
- [Heroicons](https://heroicons.com) - prefixed with "hero-"
- [Lucide](https://lucide.dev) - prefixed with "lucide-"
- [Simple Icons](https://simpleicons.org) - prefixed with "si-"
You can customize the size and colors of the icons by setting
width, height, and background color classes.
@mxgrn
mxgrn / lv_modal_close_confirm.md
Last active June 15, 2024 14:18
LiveView modal close confirmation on dirty form
@maennchen
maennchen / index.md
Last active March 7, 2024 16:56
Publishing of Erlang Libraries with Elixir Bindings

This post explores how you can write and publish a library that can be used directly in Erlang without the need to install Elixir, but also provide convenient Elixir bindings.

Should you create a multi-language library?

Writing a multi-language library comes with some complexity. It therefore makes sense to ask yourself first, if the additional work & complexity is worth the effort.

Any library written in Erlang and published to Hex, can also be used in Elixir. Instead of calling SomeModule.function(...), you can also call :some_module.function(...) directly.

-module(connection).
-behaviour(gen_statem).
-export([start_link/1, request/2]).
-export([callback_mode/0, init/1]).
-export([disconnected/3, connected/3]).
%% Public API.
start_link(Opts) ->