Skip to content

Instantly share code, notes, and snippets.

View maennchen's full-sized avatar

Jonatan Männchen maennchen

View GitHub Profile
@maennchen
maennchen / add-licenses.exs
Last active February 5, 2025 12:24
Elixir License Completion Script
#! /workspace/bin/elixir
require Logger
supported_extensions = ~w[.ex .exs .erl .md .cheatmd .yml .yrl .hrl .src .escript .jsonc]
root = Path.dirname(__ENV__.file)
{tracked_files, 0} = System.cmd("git", ["ls-files"], into: [], lines: 1024, cd: root)
@maennchen
maennchen / hex_version_stats.livemd
Created December 3, 2024 13:50
Hex Version Stats

Hex Version Stats

Mix.install([
  :hex_core,
  :explorer,
  :kino_explorer,
  :kino_vega_lite
])
@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.

@maennchen
maennchen / TODO.md
Created April 27, 2021 15:16
Zitadel Elixir

IAM Setup Zitadel

Phoenix (Code Flow)

  • Add deps to (mix.exs)
  • Add config (config/config.exs)
  • Add routes to (lib/acme_web/router.ex)
  • Start IAM Config (lib/acme/application.ex)
    • Set WEB_IAM_CLIENT_ID & WEB_IAM_CLIENT_SECRET env variables
  • Add IAM utilities (lib/acme/iam.ex)

Keybase proof

I hereby claim:

  • I am maennchen on github.
  • I am maennchen (https://keybase.io/maennchen) on keybase.
  • I have a public key ASBgYnFi6nFzi1CvGeuF-09XLdcERWU8xaYYLOs3mZvoZgo

To claim this, I am signing this object: