Mix.install([
{:zoi, "0.8.1"},
{:req_llm, github: "agentjido/req_llm", ref: "main"},
{:kino, "~> 0.17.0"}
])
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 Task do | |
| defp await_one(tasks, timeout \\ 5_000) when is_list(tasks) do | |
| awaiting = | |
| Map.new(tasks, fn %Task{ref: ref, owner: owner} = task -> | |
| if owner != self() do | |
| raise ArgumentError, invalid_owner_error(task) | |
| end | |
| {ref, true} | |
| end) |
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
| import Ecto.Changeset | |
| @spec validate_email(Ecto.Changeset.t(), atom) :: Ecto.Changeset.t() | |
| def validate_email(changeset, field) when is_atom(field) do | |
| changeset | |
| |> validate_length(field, max: 160) | |
| |> validate_change(field, &validate_email_rfc5322/2) | |
| end | |
| defp validate_email_rfc5322(field, email) do |
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
| # THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
| # PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
| # | |
| # | |
| # Libraries and infrastructure | |
| sudo apt update -y | |
| sudo apt install -y \ | |
| docker.io docker-buildx \ | |
| build-essential pkg-config autoconf bison rustc cargo clang \ |
This is an opinionated handbook on how I migrated all my Rails apps off the cloud and into VPS.
This is how I manage real production loads for my Rails apps. It assumes:
- Rails 7+
- Ruby 3+
- PostgreSQL
- Ubuntu Server 24.04
- Capistrano, Puma, Nginx
- Upgrade Radarr to at least v4.1.0.6133 or newer. This brings in support for Postgres. This will also ensure that all of your SQLite tables have the latest schema migrations applied before we migrate to Postgres. If you want to upgrade further, that's fine too, but make sure you've completed all upgrades first before continuing.
- Create your Postgres databases (one for the "main" database and one for the "logs" database) and configure Radarr with the relevant Postgres credentials. Both databases need to be owned by/accessible from the same Postgres user.
- Restart Radarr, and ensure it connects to Postgres and runs all schema migrations.
- Once all schema migrations have been applied, and no other activity is occurring, stop Radarr.
- Copy the SQLite databases from the Radarr instance/pod, both the main database and logs database. For this guide, we'll assume these files are called
radarr.dbandlogs.db. - Using
pg_dump -s, dump the schema for the main Radarr database . P
Crossplane is an Open-Source project that enables management of almost anything in the Cloud via the Kubernetes API.
Crossplane version 1.14 released November 1, 2023, is one of the most consequential releases in the project's history.
While Composition Functions and Provider performance improvements are headline features, there are substantial updates across the project: from a focus on developer and operator experience, Upbound's code donation to the CNCF, to API maturation.
This Document was updated November 7, 2023.
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 NestedWeb.FormLive do | |
| use NestedWeb, :live_view | |
| require Logger | |
| defmodule Form do | |
| use Ecto.Schema | |
| import Ecto.Changeset | |
| embedded_schema do | |
| field :name, :string |
NewerOlder