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
[{"timestamp":"2023-07-10T06:52:47.127Z","identity":"Secrets","location":"Excel","entity":"user","id":"8e4dc40c-04bb-4057-b8ca-2cc278b481f9","descriptor":"email"},{"timestamp":"2023-05-27T00:56:20.647Z","identity":"Health","location":"BigQuery","entity":"bank_account","id":"dd076f4e-f778-4af2-857b-867b4a07940f","descriptor":"address"},{"timestamp":"2023-05-24T20:26:24.610Z","identity":"Health","location":"BigQuery","entity":"purchase","id":"aca763b8-6d57-486b-a336-03c9b9fa5853","descriptor":"medications"},{"timestamp":"2023-07-29T06:09:34.004Z","identity":"PII","location":"Excel","entity":"prescription","id":"726279b7-841a-4639-9056-ef5857e013af","descriptor":"medications"},{"timestamp":"2023-08-12T15:25:29.609Z","identity":"PII","location":"Rails","entity":"user","id":"e79ec197-0173-4992-8b9b-b6cb34b52c4d","descriptor":"email"},{"timestamp":"2023-07-10T21:19:33.603Z","identity":"PII","location":"BigQuery","entity":"purchase","id":"e48c890a-c6af-4555-88db-052a33bfd133","descriptor":"email"},{"timestamp":"2023 |
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 PetalFramework.Components.DataTable do | |
@moduledoc """ | |
Render your data with ease. Uses Flop under the hood: https://github.com/woylie/flop | |
## Example | |
# In a Live View | |
defmodule PetalProWeb.AdminJobsLive do | |
use PetalProWeb, :live_view | |
def mount(_params, _session, socket) do |
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 PetalBoilerplateWeb.CheckboxLive do | |
use PetalBoilerplateWeb, :live_view | |
alias PetalBoilerplateWeb.Components.Layouts.SidebarLayout | |
alias Ecto.Changeset | |
@impl true | |
def mount(_params, _session, socket) do | |
{:ok, assign(socket, changeset: build_suggestion_changeset())} | |
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 PetalProWeb.RegisterLiveTest do | |
use PetalProWeb.ConnCase, async: true | |
alias PetalProWeb.RegisterLive | |
import Phoenix.LiveViewTest | |
test "can register an account", %{conn: conn} do | |
{:ok, view, html} = live(conn, Routes.live_path(conn, RegisterLive)) | |
assert html =~ "Register" |
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 PetalProWeb.RegisterLive do | |
use PetalProWeb, :live_view | |
alias PetalPro.{Accounts, Repo} | |
alias PetalPro.Accounts.{User} | |
def mount(params, _session, socket) do | |
socket = | |
assign(socket, %{ | |
user_return_to: Map.get(params, "user_return_to", nil), | |
error_message: nil, |
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
<div class="<%= container_css() %> py-10"> | |
<div class="md:grid md:grid-cols-3 md:gap-6"> | |
<div class="md:col-span-1"> | |
<div class="px-4 sm:px-0"> | |
<h3 class="text-lg font-medium leading-6 text-gray-900">Change your name</h3> | |
</div> | |
</div> | |
<div class="mt-5 md:mt-0 md:col-span-2"> | |
<%= form_for @name_changeset, Routes.user_settings_path(@conn, :update_name), fn f -> %> | |
<div class="shadow sm:rounded-md sm:overflow-hidden"> |
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 AppWeb.PageLive do | |
use AppWeb, :live_view | |
alias App.Posts | |
alias App.Posts.Post | |
alias App.Votes | |
@impl true | |
def mount(_params, session, socket) do | |
socket = maybe_assign_user(session, socket) |
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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
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
mix help | |
iex -S mix phx.server # like rails c | |
h Enum => shows help for Enum | |
Dossy.Accounts.__info__(:functions) => will list functions in this module | |
mix phx.routes | |
# DATABASE | |
mix ecto.gen.migration add_weather_table | |
mix ecto.migrate |
NewerOlder