This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule AsyncAssigns do | |
import Phoenix.LiveView, only: [connected?: 1, assign: 2, assign: 3] | |
@doc """ | |
Provides ability to assign default values to the socket, and kick off a | |
process that will send a message to the LiveView. The message payload will | |
be assigned as specified. | |
## Usage | |
Add the following lines to a specific LiveView, or to the web module |
Presented by Evadne Wu at Code BEAM Lite in Stockholm, Sweden on 12 May 2023
We have celebrated 10 years of Elixir and also nearly 25 years of Erlang since the open source release in December 1998.
Most of the libraries that were needed to make the ecosystem viable have been built, talks given, books written, conferences held and training sessions provided. A new generation of companies have been built on top of the Elixir / Erlang ecosystem. In all measures, we have achieved further reach and maturity than 5 years ago.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
status is-interactive | |
or exit 0 | |
if test -n "$XDG_RUNTIME_DIR" | |
set -g __starship_async_tmpdir "$XDG_RUNTIME_DIR"/fish-async-prompt | |
else | |
set -g __starship_async_tmpdir /tmp/fish-async-prompt | |
end | |
mkdir -p "$__starship_async_tmpdir" | |
set -g __starship_async_signal SIGUSR1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule DynamicChangeset do | |
@moduledoc """ | |
This module provides helper functions to extend `Ecto.Changeset` to support | |
dynamic embeds. | |
""" | |
alias Ecto.Changeset | |
@doc """ | |
Casts the given embed with the embedded changeset and field which is used to define it's type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: v1.0 | |
agent: | |
machine: | |
type: e1-standard-2 | |
os_image: ubuntu1804 | |
fail_fast: | |
stop: | |
when: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Context do | |
@moduledoc false | |
defmacro __using__(opts) do | |
repo = Keyword.fetch!(opts, :repo) | |
quote do | |
import Context, only: [context: 1, context: 2] | |
Module.put_attribute(__MODULE__, :__repo__, unquote(repo)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Sizes - Calculate and sort all filesizes for current folder Includes | |
# directory sizes, colorized output Brett Terpstra 2019 WTF License | |
VERSION = "1.0.1" | |
require 'shellwords' | |
# Just including term-ansicolor by @flori and avoiding all the | |
# rigamarole of requiring multiple files when it's not a gem... - Brett | |
# |
NewerOlder