Skip to content

Instantly share code, notes, and snippets.

View pachiras's full-sized avatar

Akira Sekiguchi pachiras

View GitHub Profile
@LostKobrakai
LostKobrakai / form_live.ex
Last active October 14, 2024 15:16
Phoenix LiveView form with nested embeds and add/delete buttons
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
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active October 1, 2024 07:50
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target