Skip to content

Instantly share code, notes, and snippets.

View K3TH3R's full-sized avatar

Kether Saturnius K3TH3R

View GitHub Profile
@K3TH3R
K3TH3R / schema.js
Created November 5, 2020 08:06
Loads/updates the schema in a Fauna database.
// Required packages: faunadb, dotenv.
// FAUNA_SECRET: should be the secret of an admin key in the target DB.
const fs = require("fs");
const https = require("https");
const path = require("path");
const { Client, query: q } = require("faunadb");
require('dotenv').config({ path: path.join(__dirname, '.env') });
@K3TH3R
K3TH3R / machine.js
Created March 25, 2021 21:16
Generated by XState Viz: https://xstate.js.org/viz
const drawingStateMachineDef = Machine({
id: 'appDrawing',
initial: 'inactive',
states: {
inactive: {
on: {
START_DRAW: 'drawing',
}
},
drawing: {