Skip to content

Instantly share code, notes, and snippets.

View lorecrafting's full-sized avatar
📖
crafting lore!

lorecrafting lorecrafting

📖
crafting lore!
View GitHub Profile
@lorecrafting
lorecrafting / elgordino-hasura.tf
Created May 12, 2019 19:33 — forked from coco98/elgordino-hasura.tf
Terraform spec for Hasura on Fargate and RDS
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"
@lorecrafting
lorecrafting / phx-1.4-upgrade.md
Created November 9, 2018 21:20 — forked from chrismccord/phx-1.4-upgrade.md
Phoenix 1.3.x to 1.4.0 Upgrade Guides

Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.

This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.

Install the new phx.new project generator

The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.

To grab the new archive, simply run:

@lorecrafting
lorecrafting / Knex-Setup.md
Created September 11, 2018 20:11 — forked from NigelEarle/Knex-Setup.md
Setup Knex with Node.js

Knex Setup Guide

Create your project directory

Create and initialize your a directory for your Express application.

$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init
@lorecrafting
lorecrafting / README.md
Created September 6, 2018 01:27 — forked from nakaz/README.md
Lecture on password encryption, hashing, and bcrypt

How To Safely Store A Password

Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt. Use bcrypt.

Why Not {MD5, SHA1, SHA256, SHA512, SHA-3, etc}?

These are all general purpose hash functions, designed to calculate a digest of huge amounts of data in as short a time as possible. This means that they are fantastic for ensuring the integrity of data and utterly rubbish for storing passwords.

bcrypt Solves These Problems

How? Basically, it’s slow as hell. It uses a variant of the Blowfish encryption algorithm’s keying schedule, and introduces a work factor, which allows you to determine how expensive the hash function will be.

@lorecrafting
lorecrafting / aws-deployment.md
Last active October 23, 2018 03:58 — forked from taesup/s3-deployment-devleague.md
aws-deployment-ec2

EC2 Deployment for DevLeague

{username} = your username
{ip} = your EC2 ip address
{repo} = your repo address
{email} = your email

AWS

@lorecrafting
lorecrafting / Knex-Migrations-Seeding.md
Last active April 14, 2018 16:53 — forked from NigelEarle/Knex-Migrations-Seeding.md
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables