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 FaithfulWord.Repo.Migrations.CreateUsersAuthTables do | |
use Ecto.Migration | |
def change do | |
execute "CREATE EXTENSION IF NOT EXISTS citext", "" | |
create table(:users, primary_key: false) do | |
add :id, :binary_id, primary_key: true | |
add :email, :citext, null: false | |
add :username, :citext |
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 FaithfulWord.Repo.Migrations.CreateChannels do | |
use Ecto.Migration | |
def change do | |
create table(:channels, primary_key: false) do | |
add :id, :binary_id, primary_key: true | |
add :basename, :string | |
add :description, :text | |
add :ordinal, :integer | |
add :private, :boolean |
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
// | |
// ContentView.swift | |
// MixedInsets2 | |
// | |
// Created by Michael Hanna on 2021-03-11. | |
// | |
import SwiftUI | |
struct ContentView: View { |
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
[error] GenServer #PID<0.1292.0> terminating | |
** (ArgumentError) assign @inner_content not available in eex template. | |
Please make sure all proper assigns have been set. If this | |
is a child template, ensure assigns are given explicitly by | |
the parent template as they are not automatically forwarded. | |
Available assigns: [:__changed__, :action, :flash, :id, :inner_block, :myself, :socket, :state] | |
(phoenix_live_view 0.15.0) lib/phoenix_live_view/engine.ex:870: Phoenix.LiveView.Engine.fetch_assign!/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
## jekyll deploy | |
adduser jekyll | |
adduser jekyll sudo | |
su jekyll ; cd /home | |
mkdir ~/.ssh ; cd .ssh | |
cat >> ~/.ssh/authorized_keys | |
ssh-rsa <pubkey> | |
sudo chmod 700 -R ~/.ssh && chmod 600 ~/.ssh/authorized_keys | |
mkdir -p /home/jekyll/static/my_app |
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 RedpillsWeb.CartLive do | |
use Phoenix.LiveView | |
alias RedpillsWeb.Router.Helpers, as: Routes | |
require Logger | |
@impl true | |
def mount(_params, session, socket) do | |
shopping_cart = Map.get(session, "shopping_cart", []) | |
IO.inspect(shopping_cart, label: "RedpillsWeb.CartLive shopping_cart") |
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 Markably.Application do | |
# See https://hexdocs.pm/elixir/Application.html | |
# for more information on OTP Applications | |
@moduledoc false | |
use Application | |
alias Markably.Accounts.Invitations | |
require Logger | |
def start(_type, _args) 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 Pearls.Repo.Migrations.CreateBibleBooks do | |
use Ecto.Migration | |
def change do | |
create table(:bible_books) do | |
add :name, :string | |
add :bible_id, references(:bible_versions, on_delete: :nothing) | |
add :testament, :string, null: false | |
timestamps() |
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
user_status: <%= @user.status %> | |
<div class="mb-6"> | |
<%= select(f, @user.status, @statuses) %> | |
</div> |