Mix.install([
{:explorer, "~> 0.10.1"},
{:kino, "~> 0.15.3"},
{:kino_explorer, "~> 0.1.24"}
])
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
#! /bin/env bash | |
# Install | |
# - Get the "raw" link for the most current SHA of the file | |
# - Use that to download the file and chmod +x it to make it executable | |
# e.g. | |
# curl -o awk_netstat.sh https://gist.githubusercontent.com/.../awk_netstat.sh | |
# chmod +x awk_netstat.sh |
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 HttpUtils.Download do | |
@moduledoc """ | |
A module for interacting with the `MyApp.Downloadable` protocol in a web context. | |
This module contains a collection of functions for commonly use-cases, | |
such as sending chunked streams on a `t:Plug.Conn.t/0` | |
""" | |
alias MyApp.Downloadable |
If you just want to copy-paste this it should "just work", but you'll need to get yarn
set up. Follow the instructions at https://yarnpkg.com/getting-started/install OR just run:
npm install -g yarn
yarn set version berry
yarn install
# this should make a.yarn/
,yarn.lock
, and.pnp.js
If you want to run these outside of the context of a running phoenix server, you can also run the mix tasks, mix assets.install
and mix assets.compile
. They are a copy paste of some the CLI bits but you could abstract them out to point to a config/cmds.exs
or something if you wanted.
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
ARG ALPINE_VERSION=3.12.0 | |
FROM hexpm/elixir:1.11.0-erlang-23.1.1-alpine-3.12.0 as builder | |
ARG APP_VSN="1.0.0" | |
# Replace `your_app` with your otp application name. | |
ENV APP_NAME=your_app \ | |
APP_VSN=${APP_VSN} \ | |
MIX_ENV=prod |
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 MyMod do | |
use GenServer | |
def child_spec(args) do | |
IO.inspect(args, label: "*** MyMod.child_spec/1") | |
%{ | |
id: __MODULE__, | |
start: {__MODULE__, :start_link, [args]} | |
} | |
end |
I hereby claim:
- I am felix-starman on github.
- I am felix_starman (https://keybase.io/felix_starman) on keybase.
- I have a public key ASDJ7jlIXGmhSyJlKXtzkmIqrkk9_vjfM55sFvFH3jzk_Ao
To claim this, I am signing this object: