Thanks to the original blog post: https://equimper.com/blog/how-to-setup-tailwindcss-in-phoenix-1.4
cd assets
npm i --save-dev tailwindcss postcss-loader postcss-import
FROM golang:1.12 AS build | |
COPY ./main.go . | |
# ARG here is to make the sha available for use in -ldflags | |
ARG GIT_SHA | |
# -ldflags "-X main.sha=${GIT_SHA}" allows main.sha to be set at build time | |
RUN go build -ldflags "-X main.sha=${GIT_SHA}" -o /app | |
FROM scratch |
; Test ledger cost/price syntax, lots, revaluation, capital gains | |
P 2019-01-01 ETC 11 EUR | |
P 2019-02-01 ETC 12 EUR | |
; Fluctuating cost/price | |
; @, @@ https://www.ledger-cli.org/3.0/doc/ledger3.html#Posting-cost | |
; { }, {{ }} https://www.ledger-cli.org/3.0/doc/ledger3.html#Commodity-prices | |
; "functionally.. no difference" https://www.ledger-cli.org/3.0/doc/ledger3.html#Prices-versus-costs |
Thanks to the original blog post: https://equimper.com/blog/how-to-setup-tailwindcss-in-phoenix-1.4
cd assets
npm i --save-dev tailwindcss postcss-loader postcss-import
<fieldset> | |
<legend>Occupation</legend> | |
<select class="form-control dropdown" id="occupation" name="occupation"> | |
<option value="" selected="selected" disabled="disabled">-- select one --</option> | |
<optgroup label="Healthcare Practitioners and Technical Occupations:"> | |
<option value="1">- Chiropractor</option> | |
<option value="2">- Dentist</option> | |
<option value="3">- Dietitian or Nutritionist</option> | |
<option value="4">- Optometrist</option> | |
<option value="5">- Pharmacist</option> |
library(httr) | |
library(magrittr) | |
library(xml2) | |
library(rvest) | |
url_raw <- "http://dados.cvm.gov.br/dados/FI/DOC/INF_DIARIO/DADOS/" | |
output_file <- "fundos/api/informe_diario.csv" | |
csv_links <- httr::GET(url_raw) %>% | |
httr::content("text") %>% |
SASS Versions of
in Phoenix 1.3 and 1.4 via Webpack
def calc_allocations(self, date, quantity, cap): | |
"""Figure out ideal allocations for a given date""" | |
# { | |
# coin_name: (percent_allocation, data) | |
# } | |
top_market = self.get_top_market(date, quantity) | |
total_cap = sum([coin.market_cap for coin in top_market]) | |
allocations = [{ |
defmodule AppWeb.AuthConnCase do | |
alias AppWeb.Router | |
use ExUnit.CaseTemplate | |
import Phoenix.ConnTest, only: [dispatch: 5, json_response: 2] | |
@doc """ | |
Allows you to call the same set of tests with the same describe block | |
Setups is an array of named setups, i.e. [first_setup: [:setup_conn, :thing], second_setup: [:different_setup, :neato_setup]] | |
## Examples |
# How to create a user authentication systems with email verification in phoenix framework. | |
Phoenix Framework is built with the powerful and resilient programming language called Elixir Lang. It is gaining momentunm by the day thanks to it's expressive sytanx which makes you productive and it's built upon the shoulders of the Erlang vm called BEAM which makes your code performant. | |
Here will build a user registration with Email verification and a login systems. Phoenix framework can be used to build normal html 5 crud apps, json api and real time backends. We'll be building a real time backend using Phoenix channels and an Elixir library Guardian jwt. | |
You can find installation instructions on the [Elixir site](http://elixir-lang.org) and [Phoenix framework](http://phoenixframework.org) . | |
We be using Phoenix 1.3 which is the current version. |