Also, here is the list of all videos from NDC Oslo 2017:
//install nginx | |
sudo apt-get update | |
sudo apt-get install nginx | |
--------- | |
//make a folder for our cache to live in | |
sudo mkdir /var/www |
defmodule Config do | |
@moduledoc """ | |
This module handles fetching values from the config with some additional niceties | |
""" | |
@doc """ | |
Fetches a value from the config, or from the environment if {:system, "VAR"} | |
is provided. | |
An optional default value can be provided if desired. |
provider "aws" { | |
region = "${var.region}" | |
} | |
### VPC | |
# Fetch AZs in the current region | |
data "aws_availability_zones" "available" {} | |
resource "aws_vpc" "datastore" { | |
cidr_block = "172.17.0.0/16" |
(* | |
Example of domain-driven design for Checkers | |
Rules from here: https://www.itsyourturn.com/t_helptopic2030.html | |
A SERIES OF SCRATCH DESIGNS | |
*) | |
// As we go through the rules, and learn things, we create a series of designs | |
module Version1 = |
// | |
// See https://github.com/louthy/language-ext | |
// | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using LanguageExt; | |
using static LanguageExt.Prelude; |
Slightly disorganized but reasonably complete notes on the algorithms, strategies and optimizations of the Akka Cluster implementation. Could use a lot more links and context etc., but was just written for my own understanding. Might be expanded later.
Links to papers and talks that have inspired the implementation can be found on the 10 last pages of this presentation.
This is the Gossip state representation:
// FP Lenses | |
const lens = get => set => ({ get, set }); | |
const view = lens => obj => lens.get(obj); | |
const set = lens => val => obj => lens.set(val)(obj); | |
const over = lens => fn => obj => set(lens)(fn(view(lens)(obj)))(obj); | |
const lensProp = key => lens(prop(key))(assoc(key)); |
This code is extracted from one of my private projects as an example of how to implement encryption of PII in event streams using two keys: a master key for each "data subject" that is stored in Vault and never transported to the systems that process the PII, and a key unique to each event that is stored (itself encrypted) with the event.
To be clear, the key that is stored with the data is encrypted by another key that is not stored with the data. The idea is that each "data subject" has an encryption key that is stored in Vault (external). When you encrypt data, the library will:
- create a new AES 256 encryption key