Skip to content

Instantly share code, notes, and snippets.

View cmackenzie1's full-sized avatar
🏠
Working from home

Cole Mackenzie cmackenzie1

🏠
Working from home
View GitHub Profile
@cmackenzie1
cmackenzie1 / 01_init.sql
Created November 16, 2025 21:09
PostgreSQL DDL for users, invitations, friends, and password based authnetication
CREATE TABLE users (
id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
email TEXT NOT NULL UNIQUE,
name TEXT,
password_hash TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
activated_at TIMESTAMPTZ,
email_verified_at TIMESTAMPTZ
);
# Install dependencies
sudo apt update
sudo apt install -y xz-utils
# Create factorio user
sudo useradd -m -r -s /bin/bash factorio
# Download and extract Factorio headless server
cd /opt
sudo curl -L -o factorio-headless.tar.xz "https://factorio.com/get-download/stable/headless/linux64"