This file contains 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
# GET http://ninive-6292.sandbox-quadernoapp.com/api/tax_rates/calculate | |
my_client.calculate_tax_rate( | |
amount: 10.0, | |
currency: "EUR", | |
from_country: "FR", # CK Customer's business address | |
to_country: "ES", # Purchaser's location | |
tax_code: "ebook", | |
product_type: "good", | |
tax_behavior: "inclusive" | |
) |
This file contains 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
{ | |
"awards": [], | |
"basics": { | |
"email": "", | |
"image": "https://www.gravatar.com/avatar/295bcb1e7e9279bf05ba41a28205d079?s=136&d=identicon&r=PG", | |
"label": "Engineer @convertkit", | |
"location": { | |
"address": "", | |
"city": "San Luis Obispo", | |
"country_code": "", |
This file contains 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
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] Patching process is started! | |
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] Cleaning! - Cleaning P.A.T.C.H. workspace! | |
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] Checking version... - Found version 0.3.2.17 | |
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] Version null - False | |
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] Checking... - Checking for remote service! | |
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] Looking for software - MastersToolkit | |
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] PatchEntry - 0.2.6.11>0.2.6.12>vqavo8tddIqTTzav1wqZlX3PWak>ZIP | |
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] PatchEntry - 0.2.6.12>0.2.7.0>UGyxajxUtUttD5ZCI3Q4xzFR0OY>ZIP | |
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] PatchEntry - 0.2.7.0>0.2.8.0>sGh1JnReqJ3JBQaE3pD9PXae3nc>ZIP | |
[P.A.T.C.H. - 5/28/2021 1:09:22 PM] PatchEntry - 0.2.8.0>0.2.9.2>XW2dRa9LMT4D2rcDbKWdqUXc+dE>ZIP |
This file contains 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
# ./terraform/webhook_processor.tf | |
provider "aws" { | |
access_key = "ACCESS_KEY_HERE" | |
secret_key = "SECRET_KEY_HERE" | |
region = "us-west1" | |
} | |
resource "aws_instance" "webhook_processor" { | |
ami = "ami-063aa838bd7631e0b" # Ubuntu 18.04 |
This file contains 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
def project do | |
[ | |
app: :webhook_processor, | |
version: "0.1.1", | |
elixir: "~> 1.7", | |
start_permanent: Mix.env() == :prod, | |
deps: deps() | |
] | |
end |
This file contains 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
# ./lib/mix/taks/docker.ex | |
defmodule Mix.Tasks.Docker do | |
use Mix.Task | |
@shortdoc "Docker utilities for building releases" | |
def run(["release"]) do | |
# Build a fresh Elixir image, in case Dockerfile has changed | |
docker("build -t elixir-ubuntu:latest .") | |
# Get the current working directory |
This file contains 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
# ./lib/mix/tasks/docker.build.ex | |
defmodule Mix.Tasks.Docker.Build do | |
use Mix.Task | |
@shortdoc "Docker utilities for building releases" | |
def run(args) do | |
Mix.Task.run("docker", args) | |
end | |
end |
This file contains 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
# ./lib/mix/tasks/docker.build.ex | |
defmodule Mix.Tasks.Docker.Build do | |
use Mix.Task | |
@shortdoc "Docker utilities for building releases" | |
def run(args) do | |
Mix.Task.run("docker", args) | |
end | |
end |
This file contains 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
#!/usr/bin/env bash | |
# place this file here: | |
# ./rel/bin/release | |
set -e | |
cd /opt/build | |
# Install updated versions of hex/rebar |
This file contains 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
# ./Dockerfile | |
# ENV matching production target host | |
FROM ubuntu:18.04 | |
# Mostly locale related env config | |
# Elixir expects to be built on a system with UTF-8 | |
ENV REFRESHED_AT=2018-08-16 \ | |
LANG=en_US.UTF-8 \ | |
LANGUAGE=en_US.UTF-8 \ | |
LC_ALL=en_US.UTF-8 \ |
NewerOlder