Skip to content

Instantly share code, notes, and snippets.

View georgfaust's full-sized avatar

Sebastian Fey georgfaust

  • Aachen
View GitHub Profile
@georgfaust
georgfaust / demo.html
Created February 20, 2023 11:40
Delegating slot inner-content and attributes to a component
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
</head>
<body>
<.select>
<:opt label="label1">opt-inner-1</:opt>
<:opt label="label2" selected>opt-inner-2</:opt>
<:opt label="label3" />
@georgfaust
georgfaust / readme.md
Created December 3, 2021 16:00
WIP - nerves bootstrap walkthrough

>>> WARNING THIS IS WIP <<<

What?

This is a walkthrough of whats going on when you do

mix nerves.new dummy
@georgfaust
georgfaust / gist:5291b17ecdb112984866e1b26a6d53bd
Last active January 24, 2022 21:01
Surviving without --live generating some files

mix phx.new hello --no-ecto

add lib/hello_web/live/hello_live.ex

defmodule HelloWeb.HelloLive do
  use Phoenix.LiveView, layout: {HelloWeb.LayoutView, "live.html"}

  def mount(_, _, socket) do
 {:ok, assign(socket, :attrs, %{})}
@georgfaust
georgfaust / server.ex
Created July 11, 2021 19:04
ping-pong UDP server in Elixir
defmodule UDPServer do
@moduledoc """
startup iex
```
$ iex -S mix
iex(1)> UDPServer.start_link
{:ok, #PID<0.220.0>}
```