Skip to content

Instantly share code, notes, and snippets.

@atomkirk
atomkirk / ecto-url-validation.md
Last active February 14, 2024 07:20
validate url in elixir

Here's an ecto changeset validation for urls:

  @doc """
  validates field is a valid url

  ## Examples
    iex> Ecto.Changeset.cast(%ZB.Account{}, %{"website" => "https://www.zipbooks.com"}, [:website])
    ...> |> Utils.Changeset.validate_url(:website)
    ...> |> Map.get(:valid?)
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@rxaviers
rxaviers / gist:7360908
Last active April 26, 2024 03:51
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: