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
@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 {
@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
locals {
utils_version = "0.4.0"
}
job "game.7days.cloud" {
name = "7 Days to Blizzard"
datacenters = ["home"]
type = "service"
group "7DaysToDie" {
@renevo
renevo / burpcraft.hcl.tpl
Last active February 3, 2023 21:14
Burpcraft Nomad Template
minecraft "Burpcraft" {
version = "1.19"
snapshot = false
path = "/opt/minecraft/burpcraft/9"
fabric_loader = "0.14.7"
fabric_installer = "0.11.0"
memory_min = 4
memory_max = 8
@renevo
renevo / gvm
Created January 2, 2022 18:20
Simple Go Version Management on Linux
#! /bin/bash
GVM_COMMAND=$1
GO_INSTALL_PATH=/usr/local/go
# if this is different, then change them...
OS=linux
ARCH=amd64
@renevo
renevo / README.md
Last active July 8, 2021 19:18
Burpcraft 8

Burpcraft 8

Burpcraft is invite only approved by veteran members of Burpcraft. See discord for more info.

Property Value
Version 1.17.1
Seed Burpcraft8 (-728125623)
PVP Enabled
Whitelist Enabled
@renevo
renevo / fixfirewall.cmd
Created February 20, 2019 00:00
Open shell:startup and put this there to fix firewalls blocking DockerNAT
powershell "Set-NetConnectionProfile -InterfaceAlias \"vEthernet (DockerNAT)\" -NetworkCategory Private"
@renevo
renevo / go-wsl.md
Created September 5, 2018 18:56
Easily update/install Go in wsl

Updating/Installing Go in WSL

Remove

Removes older versions

sudo rm -rf /usr/local/go* && sudo rm -rf /usr/local/go
@renevo
renevo / create_service.sh
Created November 29, 2017 09:24
Run minecraft in docker
#! /bin/bash
docker service create \
--name aoe \
--publish 25565:25565 \
--env EULA=true \
--env MEMORY=4G \
--mount type=bind,source=/home/minecraft/aoe/world,destination=/home/minecraft/world \
--mount type=bind,source=/home/minecraft/aoe/backups,destination=/home/minecraft/backups \
--mount type=bind,source=/home/minecraft/aoe/server.properties,destination=/home/minecraft/server.properties \
@renevo
renevo / nextcloud-stack.yml
Last active September 8, 2019 14:46
Nextcloud - Cloud-Init with Docker
version: '3'
volumes:
nextcloud:
services:
app:
image: nextcloud
ports:
- 80:80