Skip to content

Instantly share code, notes, and snippets.

View ZavierChambers's full-sized avatar
🎯
Focusing

Zavier Chambers ZavierChambers

🎯
Focusing
View GitHub Profile
@ZavierChambers
ZavierChambers / llmstudio-caller.js
Created March 29, 2026 03:15
Simple, reusable LM Studio client (OpenAI-compatible local API)
// lmstudio.js
// Simple, reusable LM Studio client (OpenAI-compatible local API)
const LMSTUDIO_BASE_URL = "http://localhost:1234/v1";
/**
* Non-streaming completion
*/
export async function lmChat({
messages,
@ZavierChambers
ZavierChambers / random_ipv4_generator_plus_blocklist.py
Created March 26, 2026 21:42
This lets you generate an IPv4
import random
import ipaddress
# -------------------------------
# BUILT-IN EXCLUDED RANGES (IANA + Reserved)
# -------------------------------
EXCLUDED_CIDRS = [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
@ZavierChambers
ZavierChambers / random_file_generator.py
Created November 23, 2025 23:49
Generates a file of precise size using random bytes.
import os
def make_random_file(path, target_size_bytes, chunk_size=1024 * 1024):
"""
Create a file filled with random bytes until it reaches target_size_bytes.
chunk_size just controls memory use while streaming!!!!
1 = Byte 1 KB = 1024**1, 1 MB = 1024**2, 1 GB = 1024**3
"""