Skip to content

Instantly share code, notes, and snippets.

View drod3763's full-sized avatar

Derick Rodriguez drod3763

View GitHub Profile
@Haseeb-Qureshi
Haseeb-Qureshi / claude-code-harness-deep-dive.md
Created March 31, 2026 21:26
Inside the Claude Code source

Inside the Claude Code source

Anthropic's Claude Code CLI source code leaked onto GitHub recently. All of it. About 1,900 files and a lot of TypeScript.

I read through the key modules. What follows is a breakdown of the surprising parts: how the system actually works, where Anthropic made clever engineering choices, and where their approach diverges from OpenAI's Codex in ways you wouldn't guess from using either tool.

Lifecycle of a request

Here's what happens when you type a message into Claude Code:

@JasonMore
JasonMore / server-component-render-fix.js
Last active April 25, 2025 19:57 — forked from tarunsahnan/server-component-render-fix.js
This is a fix for "Jest does not support rendering nested async components." with testing library render options. Issue https://github.com/testing-library/react-testing-library/issues/1209#issuecomment-2692563090
// Added ability to pass in options for testing-library/react
//
// Lifted from https://gist.github.com/tarunsahnan/93418e81882f2e343e09894bc6de6f35 on 2025-04-25
// Thread: https://github.com/testing-library/react-testing-library/issues/1209#issuecomment-2692563090
//
// ORIGINAL BELOW
//
// While using [this solution](https://github.com/testing-library/react-testing-library/issues/1209#issuecomment-2400054404),
// I encountered a timeout issue caused by API calls in my components. Each component was waiting for its
// API call to complete before rendering, which led to delays and affected the flow to subsequent components.
@agent-kilo
agent-kilo / scroll.janet
Created January 17, 2025 06:09
A quick-and-dirty implementation of "scrolling" window managment, like PaperWM, for Jwno
# ==== scroll.janet ====
#
# A quick-and-dirty implementation of "scrolling" window
# managment, like PaperWM, for Jwno: https://github.com/agent-kilo/jwno.
#
# To test it out, put this file alongside your jwno-config.janet,
# and add these in your config:
#
# (import scroll)
# (def scroll (scroll/scroll jwno/context))
@NeoTheFox
NeoTheFox / ztnet-podman.nix
Created January 10, 2025 12:12
Running ZTNET on NixOS via docker-compose
{ pkgs, lib, ... }:
{
# Runtime
virtualisation.podman = {
enable = true;
autoPrune.enable = true;
dockerCompat = true;
defaultNetwork.settings = {
# Required for container networking to be able to use names.
@sroebert
sroebert / renderServerComponent.ts
Last active February 16, 2026 02:23
A (hacky) way to render server components for React testing library.
import type { PropsWithChildren, ReactElement, ReactNode } from 'react';
import React, { Children, cloneElement, isValidElement } from 'react';
import { render } from '@testing-library/react';
function setFakeReactDispatcher<T>(action: () => T): T {
/**
* We use some internals from React to avoid a lot of warnings in our tests when faking
* to render server components. If the structure of React changes, this function should still work,
* but the tests will again print warnings.
@cyberpunk042
cyberpunk042 / debian12_configuration_script.sh
Last active October 27, 2025 20:56
TrueNAS Scale 24.04.2 Customization
#!/bin/bash
# Set script to exit on error
set -e
# Enable logging
exec > >(tee -i /var/log/setup-script.log)
exec 2>&1
echo "Starting script execution..."
@OrionReed
OrionReed / dom3d.js
Last active May 4, 2026 11:01
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@adtac
adtac / Dockerfile
Last active December 26, 2025 00:20
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@Fanman03
Fanman03 / UAP-Guide.md
Last active May 4, 2026 20:23
UniFi AP Buyers Guide

UniFi AP Buyers Guide

(updated May 2025)

The APs in this list are ordered from highest to lowest performance. However, unless you have a very high number of devices you likely do NOT need to buy the most expensive, highest performance AP. You can also check Ebay for deals, especially on older equipment.

All APs in this list support both wired backhaul and mesh modes. However, wired connections are strongly recommended for better performance and reliability.

Number of spatial streams are listed in order of 2.4GHz, 5GHz, 6GHz.

Good Choices: