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 Bonfire.UI.Common.OpenModalLive do | |
@moduledoc """ | |
A button that opens a **modal** | |
""" | |
use Bonfire.UI.Common.Web, :stateful_component | |
alias Bonfire.UI.Common.ReusableModalLive | |
@doc "The title of the modal. Only used if no title slot is passed." | |
prop title_text, :string |
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
name: Generate mix docs & deploy to github pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docs: | |
name: Generate & deploy | |
runs-on: ubuntu-latest |
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 Types do | |
def typeof(nil), do: nil | |
def typeof(false), do: false | |
def typeof(true), do: true | |
def typeof(atom) when is_atom(atom) do | |
if function_exported?(atom, :__info__, 1) || Code.ensure_loaded?(atom) do | |
if function_exported?(atom, :__struct__, 0), do: :struct, else: Module | |
else | |
Atom | |
end |
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 Module.Extend do | |
@doc """ | |
Extend a module (i.e. define `defdelegate` and `defoverridable` for all functions from the source module in the current module. | |
Usage: | |
import Module.Extend | |
extend_module Common.Text | |
""" | |
defmacro extend_module(module) do | |
require Logger |
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
#!/bin/sh | |
# up - v2 - script to keep your Mac up-to-date (OS, Homebrew, and App Store updates) via the command line | |
# run thus to to install: cd /usr/local/bin && curl -s -O https://gist.githubusercontent.com/mayel/c07bc0acb91824501d5bdbdc9eb7b33a/raw/08821f64c067327ea68a1a817eb43657db10f10e/up && chmod 755 /usr/local/bin/up | |
# and then run it anytime by simply entering the command: up | |
# By https://github.com/mayel based on a script by https://github.com/imwally | |
# homebrew |
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
{ | |
"@context": [ | |
"https://www.w3.org/ns/activitystreams", | |
{ | |
"@language": "und", | |
"Hashtag": "as:Hashtag", | |
"ValueFlows": "https://w3id.org/valueflows#", | |
"alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"}, | |
"om2": "http://www.ontology-of-units-of-measure.org/resource/om-2/" |
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
[ | |
bonfire: %{total: "3.56GiB", deps: "1.95GiB", app: "2.8MiB}, | |
bonfire_ui_common: %{total: "2.04GiB", deps: "346.71MiB", app: "1.70GiB"}, | |
iconify_ex: %{total: "333.30MiB", deps: "2.99MiB", app: "330.31MiB"}, | |
bonfire_editor_milkdown: %{total: "1.80GiB", deps: "1.70GiB", app: "96.43MiB"}, | |
ex_doc: %{total: "53.90MiB", deps: "423.44KiB", app: "53.49MiB"}, | |
text_corpus_udhr: %{total: "45.08MiB", deps: "70.67KiB", app: "45.01MiB"}, | |
bonfire_ui_me: %{total: "1.74GiB", deps: "1.70GiB", app: "32.16MiB"}, | |
bonfire_editor_quill: %{total: "1.73GiB", deps: "1.70GiB", app: "27.69MiB"}, | |
paper_trail: %{total: "22.43MiB", deps: "8.61MiB", app: "13.83MiB"}, |
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 UserInput do | |
@doc "Takes a data structure and converts any keys in maps to (previously defined) atoms, recursively. By default any unknown string keys will be discarded. It can optionally also convert string values to known atoms as well." | |
def input_to_atoms( | |
data, | |
opts \\ [] | |
) | |
def input_to_atoms(data, opts) do | |
opts = |
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
iex(12)> M.infinity | |
1 : one (0 zeros) | |
10 : ten (1 zeros) | |
100 : one hundred (2 zeros) | |
1000 : one thousand (3 zeros) | |
10000 : ten thousand (4 zeros) | |
100000 : one hundred thousand (5 zeros) | |
1000000 : one million (6 zeros) | |
10000000 : ten million (7 zeros) |
OlderNewer