Skip to content

Instantly share code, notes, and snippets.

View jdnichollsc's full-sized avatar
🏠
Working from home

J.D Nicholls jdnichollsc

🏠
Working from home
View GitHub Profile
@jdnichollsc
jdnichollsc / README.md
Last active April 8, 2026 02:24
Fine-tuning LLMs with Blackwell, Unsloth and my RTX 5090 (32GB VRAM) + 128GB RAM

Recommended Architecture

  ┌──────────────────────────────────────┐
  │         Windows 11 (Host)            │
  │                                      │
  │  ┌──────────────┐  ┌──────────────┐  │
  │  │  LM Studio   │  │ .wslconfig   │  │
  │  │  (Inference) │  │ memory=96GB  │  │
  │  │  loads .gguf │  │ processors=8 │  │
@jdnichollsc
jdnichollsc / README.md
Last active March 23, 2026 04:41
SKILLS en Claude Code: la guía completa para empezar hoy - https://x.com/santtiagom_/status/2030305647535751338

SKILLS en Claude Code: la guía completa para empezar hoy

Cuando usás Claude Code todos los días, empezás a notar un patrón. Le pedís un code review el lunes y te da un análisis detallado. El martes lo mismo y te lista tres bullets genéricos. Mismo modelo, mismo pedido, resultado completamente distinto.

No es que esté mal. Es un modelo que predice tokens, no una máquina exacta. Cada vez que lo usás, empieza de 0. Sin memoria de cómo lo hizo antes. Sin contexto de cómo trabajás vos.

¿Y si hubiera una forma de enseñarle? ¿De escribir una vez cómo querés que trabaje y que lo aplique siempre?

Eso son las Skills.

@jdnichollsc
jdnichollsc / README.md
Last active March 23, 2026 03:15
Lessons from Building Claude Code: How We Use Skills by Anthropic - https://x.com/trq212/status/2033949937936085378

Skills have become one of the most used extension points in Claude Code. They're flexible, easy to make, and simple to distribute.

But this flexibility also makes it hard to know what works best. What type of skills are worth making? What's the secret to writing a good skill? When do you share them with others?

We've been using skills in Claude Code extensively at Anthropic with hundreds of them in active use. These are the lessons we've learned about using skills to accelerate our development.

What are Skills?

If you're new to skills, I'd recommend reading our docs or watching our newest course on new Skilljar on Agent Skills, this post will assume you already have some familiarity with skills.

@jdnichollsc
jdnichollsc / README.md
Last active October 28, 2025 21:52
Real-world validation Forms with React-Router/Remix and Conform @conform-to/react; The formId Pattern controls whether a form resets or preserves its state after submission through React's reconciliation mechanism. This provides automatic form reset on success while preserving user input on validation errors.

Form Validations with Conform

The formId Pattern

Why We Use formId

The formId controls whether a form resets or preserves its state after submission through React's reconciliation mechanism. This provides automatic form reset on success while preserving user input on validation errors.

How It Works

@jdnichollsc
jdnichollsc / CHALLENGE.md
Last active August 9, 2025 00:35
Prorating Subscriptions - Challenge

Prorating Subscriptions

Background

Our company has started selling to larger customers, so we are creating subscription tiers with different feature sets to cater to our customers’ unique needs. We previously charged every customer a flat fee per month, but now we plan on charging for the number of users active on the customer's subscription plan. As a result, we're changing our billing system.

Instructions

You’ve picked up the work item to implement the logic to compute the monthly charge:

Prorating Subscriptions (#8675309)

We'd like you to implement a monthlyCharge function to calculate the total monthly bill for a customer.

@jdnichollsc
jdnichollsc / CHALLENGE.md
Last active July 22, 2025 01:34
Customer Record Search

Customer Record Search

Ground Rules

  1. You may google references needed to complete the exercise, but you may not google the solution itself. If this happens, the result will be an automatic failure.

Criteria for Success

  1. The implementation should be full, so all methods are implemented.
  2. The implementation should be compilable, so no compilation errors in output window.
  3. The task should be completed within this hour.
  4. The implementation should be correct.
@jdnichollsc
jdnichollsc / helpers.ts
Last active June 17, 2025 18:54
NodeJS MongoDB/Mongoose UUID conversion for .NET Guid compatibility using BSON Binary (subtype 3) - https://replit.com/@jdnichollsc/MongoDB-Guid-conversion-for-NodeJSNET-compatibility?v=1
import mongoose from "mongoose";
// Converts a legacy MongoDB Binary (subtype 3, UUID_OLD) to a UUID string.
// Note: The issue is not with .NET's Guid type (which is just a 128-bit integer),
// but with how the legacy MongoDB driver (and the old BinData subtype 3) handled byte order.
// The legacy driver stored UUIDs with a mixed-endian format due to a lack of specification in early MongoDB versions.
export function legacyBinaryToUuidString(binaryData: mongoose.mongo.Binary | null) {
if (!binaryData?.buffer) return undefined;
const buffer = binaryData.buffer;
@jdnichollsc
jdnichollsc / docker-compose.yml
Created February 15, 2025 07:47
Enable Redis Streams, TimeSeries and Cluster mode with Docker
version: '3.6'
# Define name templates
x-name-templates:
project-name: &project-name ${COMPOSE_PROJECT_NAME:-projectx}
service-names:
redis-node-0: &name-redis-0 ${COMPOSE_PROJECT_NAME:-projectx}-redis-node-0
redis-node-1: &name-redis-1 ${COMPOSE_PROJECT_NAME:-projectx}-redis-node-1
redis-node-2: &name-redis-2 ${COMPOSE_PROJECT_NAME:-projectx}-redis-node-2
redis-node-3: &name-redis-3 ${COMPOSE_PROJECT_NAME:-projectx}-redis-node-3
@jdnichollsc
jdnichollsc / Dockerfile.postgres
Last active February 12, 2025 15:20
Async Data ingestion with Hugging Face datasets
# Use official Postgres image with multi-arch support
FROM postgres:17-bullseye
# Install required packages and build pgvector
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# SSL certificates
ca-certificates \
# PostGIS
postgis \
@jdnichollsc
jdnichollsc / prompt_1.md
Created February 12, 2025 04:13
AI prompts for documentation

Analyze the entire codebase of this software project, including package.json scripts, dependencies, existing READMEs, and the current folder structure.

Then, generate a structured and developer-friendly documentation set within a /docs folder at the root of the repository. Ensure modularity by splitting documentation into separate markdown files, including:

  1. /docs/README.md - High-level project overview, purpose, and quick start guide.
  2. /docs/architecture.md - System architecture, service interactions, and outline high level designs with all important components using diagrams in Mermaid format with Material Design colors and high-contrast text.
  3. /docs/folder-structure.md - Explanation of the project directory structure and file purposes.
  4. /docs/development-guide.md - Setup instructions, key dependencies, and important scripts.
  5. /docs/operations.md - Deployment guide, CI/CD details, and configuration options.
  6. /docs/api-reference.md - API endpoints, request/response stru