pvesh get /cluster/nextid
pct create 100 \
local:vztmpl/ubuntu-16.04-standard_16.04-1_amd64.tar.gz \
--cores 2 --cpuunits 1024 \
| # How to use it: | |
| # | |
| # Plug it at the end of your :browser pipeline in your Phoenix app router.ex | |
| # Make sure it is plugged before your session-based authentication and authorization Plugs. | |
| # | |
| # pipeline :browser do | |
| # plug :accepts, ["html"] | |
| # plug :fetch_session | |
| # plug :fetch_flash | |
| # plug :put_secure_browser_headers |
I have been struggling to start a new project with Phoenix 1.3 and the new vue-cli 3 for Vue.js. There are tons of example already but none of them suited my needs, because:
Assuming that you have Elixir and Phoenix 1.3 are both installed, let's build our new App.
| defmodule Languafy.Web.Context do | |
| @behaviour Plug | |
| import Plug.Conn | |
| alias Languafy.User | |
| def init(opts), do: opts | |
| def call(conn, _) do | |
| case build_context(conn) do | |
| {:ok, context} -> |
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use PVE::Tools qw(file_get_contents); | |
| use PVE::QemuConfig; | |
| use PVE::QemuServer; | |
| use PVE::QemuServer::Cloudinit; |
| Phoenix esbuild with Tailwind+Fontawesome |
| # see https://www.openmymind.net/Elixir-Without-Ecto/ | |
| defmodule A.DB do | |
| defmacro __using__(_) do | |
| quote location: :keep do | |
| @name __MODULE__ | |
| def child_spec(opts) do | |
| %{ | |
| id: __MODULE__, |
| { | |
| "GenServer Template": { | |
| "scope": "elixir", | |
| "prefix": "gs", | |
| "body": [ | |
| "defmodule ${1}.${2} do", | |
| "\tuse GenServer", | |
| "", | |
| "\t# Client", | |
| "", |