Skip to content

Instantly share code, notes, and snippets.

View kidGodzilla's full-sized avatar
👋
Working from home forever

James Futhey kidGodzilla

👋
Working from home forever
View GitHub Profile
@cedrickchee
cedrickchee / minecraft-3d-clone.md
Last active August 14, 2025 23:31
ChatGPT-5 Minecraft 3D Clone Prompt

ChatGPT-5 Minecraft 3D Clone Prompt

One-shot and a few multi-turn chats later, we got a simple "cinematic" level Minecraft-inspired (cube/voxel world) 3D game.

Model:

  • ChatGPT-5
  • ChatGPT-5 (with "think harder" prompt)
  • ChatGPT-5 Thinking

User Prompts

@kidGodzilla
kidGodzilla / barkov-chain.js
Last active April 21, 2025 08:11
🐶 Barks Endlessly (2nd order markov chain but barking)
// Barks endlessly in your console (Paste it in)
(function () {
class MarkovChainGenerator {
constructor(tokens, order = 2) {
this.order = order;
this.model = new Map();
for (let i = 0; i <= tokens.length - order; i++) {
const key = tokens.slice(i, i + order).join(',');
const next = tokens[i + order];
@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
#!/bin/bash
set -euo pipefail
#####################################################################################
# This Bootstrap Script installs Dokku latest on Ubuntu (use LTS or latest)
#
# This script also installs UFW (firewall), some basic Dokku plugins, and
# raises ulimits. Comment out any step you wish to skip in main.
#
# IMPORTANT: This script also disables password authentication via SSH for
@dangovorenefekt
dangovorenefekt / blockmetatwitter.md
Last active January 14, 2025 22:25
Block Meta and Twitter (nginx)
@linuxandchill
linuxandchill / retrievalQA.js
Last active June 10, 2024 16:04
Create and retrieve embeddings using Langchain and Supabase
////////////////////////////////////
/* "dependencies": {
"@supabase/supabase-js": "^2.13.1",
"langchain": "^0.0.44"
} */
////////////////////////////////////
import { OpenAI } from "langchain/llms";
import {
@kidGodzilla
kidGodzilla / openai-chat-completion.js
Last active April 5, 2024 21:15
OpenAI Chat Completion Example
const { Configuration, OpenAIApi } = require('openai');
let openai;
const instructions = ``;
if (process.env.OPEN_AI_API_KEY) {
const configuration = new Configuration({ apiKey: process.env.OPEN_AI_API_KEY });
openai = new OpenAIApi(configuration);
}
@overflowy
overflowy / hn-plus.user.js
Last active November 4, 2025 13:52
Hacker News Plus
// ==UserScript==
// @name HN Plus
// @match https://*.ycombinator.com/*
// @grant none
// @version 2.1
// @author overflowy
// @description Adds favicons to HN links and navigation menu for less known sections
// @inject-into content
// ==/UserScript==
class LineChart {
// LineChart by https://kevinkub.de/
constructor(width, height, values) {
this.ctx = new DrawContext();
this.ctx.size = new Size(width, height);
this.values = values;
}
_calculatePath() {
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'