"EnableP2P": true,
"TargetNumberOfActivePeers": 20,
"TargetNumberOfEstablishedPeers": 50,
"TargetNumberOfKnownPeers": 100,
"TargetNumberOfRootPeers": 100,
"TestEnableDevelopmentNetworkProtocols": true,
use aiken/hash.{Blake2b_224, Hash} | |
use aiken/interval.{Finite, Interval, IntervalBound} | |
use aiken/list | |
use aiken/transaction.{ScriptContext, Spend, ValidityRange} | |
use aiken/transaction/credential.{VerificationKey} | |
type POSIXTime = | |
Int | |
type PubKeyHash = |
// App/utilities/AndroidFontFix.js | |
import React from 'react'; | |
import { Platform, StyleSheet, Text } from 'react-native'; | |
import { getManufacturerSync } from 'react-native-device-info'; | |
// https://github.com/castle-xyz/castle-client/pull/11/files | |
// This fixes this bug: https://github.com/facebook/react-native/issues/15114 | |
// As of 6/2/2020, this bug is marked as closed and Facebook has signalled that |
sudo amazon-linux-extras install epel -y | |
sudo yum install stress -y |
This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.
For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai
# Usage: | |
# aws cloudformation --region <region> create-stack --stack-name <stack name> --template-body file://vpc-fargate.yaml | |
# This template will: | |
# Create a VPC with: | |
# 2 Public Subnets | |
# 2 Private Subnets | |
# An Internet Gateway (with routes to it for Public Subnets) | |
# A NAT Gateway for outbound access (with routes from Private Subnets set to use it) | |
# |
#!/usr/bin/env bash | |
# Copyright 2017 Jesse Wang | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF |
Reference: Sequelize docs on association
Let’s say we have two models: Films
and Festivals
We know that a film can be shown at many film festivals and that, conversely, a festival can show many films. This is what is known as a many-to-many relationship.
Knowing this, we can set up our associations:
# app deps | |
sudo yum install git | |
# erlang deps | |
sudo yum groupinstall "Development Tools" | |
sudo yum install ncurses-devel openssl-devel | |
# erlang | |
wget http://www.erlang.org/download/otp_src_19.2.tar.gz | |
tar -zxvf otp_src_19.2.tar.gz |
If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8
To use the new phx.new
project generator, you can install the archive with the following command:
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs
: