Mix.install([
{:kino, "~> 0.13"},
{:phoenix, "~> 1.7"},
{:phoenix_live_view, "~> 0.20"},
{:plug_cowboy, "~> 2.7"}
This file contains hidden or 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
| # The Problem: Marketing Team requires to crosscheck the list of products available | |
| # in all the websites of the Company | |
| # Input: A Excel File that contains "Model" and "Item Path" columns | |
| # Requirements: Models are duplicated, Remove the duplicated models and keep the Item Path | |
| # The problem: The cells in the "Model" columns contains extra spaces which makes all the models be unique | |
| # even if they are not | |
| # This script will remove extra spaces, remove the cells duplicated by keeping the first item found | |
| # author: Soraya Ruiz | |
| # date of creation: 27-08-2021 |
This file contains hidden or 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
| # Clean the database | |
| DROP TABLE IF EXISTS _orders CASCADE; | |
| DROP TABLE IF EXISTS _users CASCADE; | |
| DROP TABLE IF EXISTS orders CASCADE; | |
| DROP TABLE IF EXISTS users CASCADE; | |
| # Build the database (for hard deletion) | |
| CREATE TABLE users ( | |
| id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY, | |
| name text NOT NULL |
This file contains hidden or 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 Super.RepoTest do | |
| use Super.DataCase, async: true | |
| require Logger | |
| @skipped_schemas [UserService.User] | |
| defp tenant_schemas do | |
| {:ok, mods} = :application.get_key(:super, :modules) | |
| Enum.map(mods, fn mod -> |
This file contains hidden or 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 MyApp.ReplicatedConCache do | |
| @moduledoc """ | |
| Utility to replicate local ConCache operations via Phoenix.PubSub. | |
| Only those ConCache functions that we need are replicated. | |
| Prerequisites: | |
| - for all relevant cache ids, there is a ConCache instance running on | |
| each node connected to the PubSub system | |
| - these ConCache instances are all configured same (TTL etc.) |
OlderNewer