Skip to content

Instantly share code, notes, and snippets.

View justin-carver's full-sized avatar
🦀
Up-and-Coming Rustacean!

Justin Carver justin-carver

🦀
Up-and-Coming Rustacean!
View GitHub Profile
@justin-carver
justin-carver / Rust Challenges
Last active June 20, 2024 01:10
A small Rust application that pulls random lines from a challenges.txt file to produce a "Programming Challenge" that users can attempt when starting new projects.
# challenges.txt
Build Your Own wc Tool
Build Your Own JSON Parser
Build Your Own Compression Tool
Build Your Own cut Tool
Build You Own Load Balancer
Build Your Own Sort Tool
Build Your Own Calculator
Build Your Own Redis Server
Build Your Own grep
@justin-carver
justin-carver / sysprobe.sh
Last active July 13, 2023 05:53
Gathers basic information about Linux systems and outputs them to a log file.
# sysprobe.sh - System Probe Script
# Copyright (C) 2023 Justin Carver
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@justin-carver
justin-carver / backup.sh
Last active July 4, 2023 04:55
Docker Minecraft Server Backup Shell Script (itzg/minecraft-server)
# Your server's docker name
DOCKER_NAME="minecraft_server"
# The directory of your Minecraft world. (This will be depdendent on your server structure)
WORLD_DIRECTORY="/var/lib/docker/volumes/MINECRAFT_SERVER_VOLUME_NAME/_data/FeedTheBeast/Server-Files-1.0.21/world"
# The directory to store your backups
BACKUP_DIRECTORY="/backups/minecraft/"
# Get the current timestamp
@justin-carver
justin-carver / xorShift128Plus.ts
Last active April 17, 2023 04:23
This is a very quick version of the xorShift128Plus algorithm. This appears to have a 29% performance boost over the V8 engine's implementation in Math.random() and includes the ability to manipulate a number-based seed.
export const xorShift128Plus = (seed: number): XorShift128Plus => {
let s1 = seed ^ (seed << 10);
let s2 = (seed ^ (seed >> 10)) & 0xffffffff;
return {
seed: [s1, s2, s2, s1],
next() {
let [s1, s2, r1, r2] = this.seed;
s1 ^= s1 << 23;
s1 ^= s1 >> 17;
@justin-carver
justin-carver / bleak.js
Created January 31, 2023 02:40
Bleak Lands Chapter Generator
const rumors = [
'Lost Artifact',
'Ravenous Beast',
'Forbidden Knowledge',
'Dire Prophecy',
'Splintered Chains',
'Cursed Flame',
'Hidden Truths',
'Dark Odyssey',
'Phantom Sword',
@justin-carver
justin-carver / vektur.js
Last active January 19, 2023 03:19
Vektur | A command-line application to convert simple B&W images into vectorized SVGs.
const fs = require('fs');
const path = require('path');
const potrace = require('potrace');
// Folder containing the images
// Input folder has to exist before hand to process images.
const inputFolder = 'input';
// Folder to save the vectorized images
const outputFolder = 'vectorized';
@justin-carver
justin-carver / training.jsonl
Created October 22, 2022 10:40
GPT-3 Fine-Tuning SaaS Name Training Data
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Pukket, Description: Social Media Management App focused on Local SMBs.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Stock AI, Description: Get Stock Images Generated by AI + In-built blogpost image generator.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Rewardful, Description: Build Your own affiliate program to scale your business.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: PageFlow, Description: Storytelling Tool to generate content in English & German.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Arcade Software, Description: To create Interactive Product Demos for Landing Pages.\n###"}
{"prompt": "Generate a unique SaaS Name and description: ->", "completion": " SaaS Name: Lanva.io, Description: Turn Your Long form
@justin-carver
justin-carver / class_names.txt
Last active December 14, 2021 07:40
Pre-Mysteria API Idea Written in Python
Barbarian
Bard
Cleric
Druid
Fighter
Monk
Paladin
Ranger
Rogue
Sorcerer