Skip to content

Instantly share code, notes, and snippets.

@mazz
mazz / vm.swift
Created February 18, 2022 22:44
viewmodel
struct SectionModel: Identifiable {
public var id: String
public var index: Int
public var title: String
public var subtotal: String
public var items: [MarkItemModel]
public var commentItems: [MarkItemModel]
}
struct MarkItemModel: Identifiable {
//
// HomeView.swift
// Markably
//
// Created by Michael on 2021-07-17.
//
import SwiftUI
struct HomeView: View {
@mazz
mazz / Dockerfile
Created January 6, 2022 20:00
Dockerfile
# STEP 1 - BUILD RELEASE
# cannot use alpine 3.14.0 because of issue here with bcrypt-elxir compiling using make on docker:
# https://github.com/riverrun/bcrypt_elixir/issues/26#issuecomment-881966412
FROM hexpm/elixir:1.12.3-erlang-24.0.6-alpine-3.13.5 AS build
# install build dependencies
RUN apk add --update git \
build-base \
ffmpeg \
--update npm
@mazz
mazz / app.css
Created November 12, 2021 00:42
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "./phoenix.css";
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
.hidden {
# STEP 1 - BUILD RELEASE
# cannot use alpine 3.14.0 because of issue here with bcrypt-elxir compiling using make on docker:
# https://github.com/riverrun/bcrypt_elixir/issues/26#issuecomment-881966412
FROM hexpm/elixir:1.12.3-erlang-24.0.6-alpine-3.13.5 AS build
# install build dependencies
RUN apk add --update git \
build-base \
nodejs-current \
nodejs-npm \
@mazz
mazz / Dockerfile
Created September 14, 2021 03:20
phx 1.6rc0
# STEP 1 - BUILD RELEASE
# cannot use alpine 3.14.0 because of issue here with bcrypt-elxir compiling using make on docker:
# https://github.com/riverrun/bcrypt_elixir/issues/26#issuecomment-881966412
FROM hexpm/elixir:1.12.3-erlang-24.0.6-alpine-3.13.5 AS build
# install build dependencies
RUN apk add --update git \
build-base \
nodejs-current \
nodejs-npm \
key s3_key: "7365f9db-c0cc-457a-bd8a-e69f48d740fd.jpg"
fields: %{
"acl" => "public-read",
"content-type" => "image/jpeg",
"key" => "7365f9db-c0cc-457a-bd8a-e69f48d740fd.jpg",
"policy" => "ewogICJleHBpcmF0aW9uIjogIjIwMjEtMDctMjBUMDM6MDk6MjguNDcxMTA3WiIsCiAgImNvbmRpdGlvbnMiOiBbCiAgICB7ImJ1Y2tldCI6ICAid2l0cm9vcy1tYWluIn0sCiAgICBbImVxIiwgIiRrZXkiLCAiNzM2NWY5ZGItYzBjYy00NTdhLWJkOGEtZTY5ZjQ4ZDc0MGZkLmpwZyJdLAogICAgeyJhY2wiOiAicHVibGljLXJlYWQifSwKICAgIFsiZXEiLCAiJENvbnRlbnQtVHlwZSIsICJpbWFnZS9qcGVnIl0sCiAgICBbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwgMCwgODAwMDAwMF0sCiAgICB7IngtYW16LXNlcnZlci1zaWRlLWVuY3J5cHRpb24iOiAiQUVTMjU2In0sCiAgICB7IngtYW16LWNyZWRlbnRpYWwiOiAiMUNCQ0M5NUQwQTRCNEU3RDA5QTMvMjAyMTA3MjAvdXMtZWFzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LAogICAgeyJ4LWFtei1hbGdvcml0aG0iOiAiQVdTNC1ITUFDLVNIQTI1NiJ9LAogICAgeyJ4LWFtei1kYXRlIjogIjIwMjEwNzIwVDAzMDkyOFoifQogIF0KfQo=",
"x-amz-algorithm" => "AWS4-HMAC-SHA256",
"x-amz-credential" => "1CBCC95D0A4B4E7D09A3/20210720/us-east-1/s3/aws4_request",
"x-amz-date" => "20210720T030
config :faithful_word, FaithfulWordWeb.Endpoint,
http: [port: 4000],
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: [
yarn: ["run", "watch", cd: Path.expand("../assets", __DIR__)]
]
UPDATE on my tailwind/jit/webpack5/docker adventures:
I used these docker image deps instead:
`webpack docker build`:
```
FROM node:14.15.5-alpine3.13 AS webpack
LABEL maintainer="Nick Janetakis <[email protected]>"
---
- name: Install aptitude using apt
apt:
name: aptitude
state: latest
update_cache: yes
force_apt_get: yes
- name: Install haveged
apt: