This is a CFP for ReactiveConf 2017's open call for Lightning talks. If you'd like to see this talk become a reality, please ⭐ star this gist. #ReactiveConf
This file contains hidden or 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
| import { createCipheriv, createDecipheriv, randomBytes } from "crypto"; | |
| const ENCRYPTION_KEY: string = process.env.ENCRYPTION_KEY || ""; // Must be 256 bits (32 characters) | |
| const IV_LENGTH: number = 16; // For AES, this is always 16 | |
| /** | |
| * Will generate valid encryption keys for use | |
| * Not used in the code below, but generate one and store it in ENV for your own purposes | |
| */ | |
| export function keyGen() { |
This file contains hidden or 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
| aws lightsail create-key-pair \ | |
| --key-pair-name 'lightsail_demo' \ | |
| --query 'privateKeyBase64' \ | |
| --output text > 'demo.key' | |
| chmod 700 "demo.key" |
This file contains hidden or 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
| sudo apt-get update | |
| sudo apt-get install -y apt-transport-https ca-certificates | |
| sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
| echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list | |
| sudo apt-get update | |
| sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual | |
| sudo apt-get install -y docker-engine | |
| sudo service docker start | |
| sudo docker pull php:5.6-apache |
