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 / reduxsnapshot.js
Created November 29, 2018 18:18
Ex_venture redux store snapshot
{
roomInfo: {
zone: {
name: 'Bandit Hideout',
id: 1
},
y: 1,
x: 4,
shops: [],
players: [],
@lorecrafting
lorecrafting / AWS Deployment.md
Last active February 15, 2019 08:41
Nginx Certbot Reverse Proxy Docker-Compose deployment

GETTING ON YOUR SERVER

ssh ubuntu@{ip}
Enter yes to prompt

CREATE USER

sudo adduser {username} and follow prompts

SET SSH KEY FOR NEW USER

Devinar Ideas:
CSS Layout:
- Holy Grail
- Sidebar
- 2 Sidebars
CSS Transitions
CSS Animations
Spinners & Loading Screens
@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:

docker-compose.yml

version: '3'
services:
  db:
    image: postgres:10.0-alpine
    env_file: .env
    volumes:
      - pg-data-volume:/var/lib/postgresql/data
 ports:
@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 / gist:d66f2e5a51b3e2d0c2a3596832c14322
Last active October 23, 2018 05:53
Containerizing http-socket-server
@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