Skip to content

Instantly share code, notes, and snippets.

View renevo's full-sized avatar
🌩️
Building a private cloud!

Tom Anderson renevo

🌩️
Building a private cloud!
View GitHub Profile
locals {
utils_version = "0.4.0"
}
job "game.7days.cloud" {
name = "7 Days to Blizzard"
datacenters = ["home"]
type = "service"
group "7DaysToDie" {
@renevo
renevo / keygenerator.md
Last active August 5, 2023 01:19
NATS Embeded JWT

Generating keys and jwts

This is basically how nsc creates an operator account + system account + system user really only need to keep track of the seeds, as they can be used to make public/private keys

JWT claims aren't that bad to make, just a lot of options in there basic operation is that:

  • you create an operator KP and claims
  • operator has a signing KP
  • you create an account KP and claims, and sign the account with the operator signing KP
  • account has a signing KP
@renevo
renevo / main.go
Created November 23, 2023 00:27
I asked ChatGPT to create a Simple Raft Implementation
package main
import (
"fmt"
"math/rand"
"time"
)
// LogEntry represents a log entry in the Raft algorithm.
type LogEntry struct {