Skip to content

Instantly share code, notes, and snippets.

View woodward54's full-sized avatar

David Woodward woodward54

View GitHub Profile
@craigsc
craigsc / ct-worktree-functions.zsh
Created February 11, 2026 23:12
Claude Tree Helper Commands
# ct — Claude worktree helpers for parallel work
# https://gist.github.com/craigsc/46979018ee28788602d3452fb08ef814
#
# Lightweight zsh functions for managing git worktrees, designed for
# running multiple Claude Code sessions in parallel on the same repo.
#
# Each worktree gets its own branch and directory, with configurable
# symlinks so you don't have to reinstall dependencies every time.
#
# Functions:
@drewolbrich
drewolbrich / View+WindowGeometryPreferences.swift
Last active January 17, 2026 18:59
A visionOS SwiftUI view modifier that can be used to hide a window's resize handles or to constrain a window's aspect ratio
//
// View+WindowGeometryPreferences.swift
//
// Created by Drew Olbrich on 1/30/24.
// Copyright © 2024 Lunar Skydiving LLC. All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@drewolbrich
drewolbrich / ScaledVolumeContentView.swift
Last active April 1, 2025 23:56
An example of how to make visionOS volumes work correctly with Settings > Display > Appearance > Window Zoom
//
// ScaledVolumeContentView.swift
// VolumeScaleExample
//
// Created by Drew Olbrich on 11/6/23.
// Copyright © 2023 Lunar Skydiving LLC. All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
@nickyvanurk
nickyvanurk / camera.tsx
Last active October 2, 2025 11:23
Camera perspective <-> orthographic toggle in r3f and vanilla three.js
import { useEffect, useRef, useState } from 'react';
import { useFrame, useThree } from '@react-three/fiber';
import { MapControls, OrthographicCamera, PerspectiveCamera } from '@react-three/drei';
import type { OrbitControls as OrbitControlsImpl } from 'three-stdlib';
export function Camera() {
const [oldType, setOldType] = useState('PerspectiveCamera');
const [coords, setCoords] = useState({ x: 0, y: 0 });
const gl = useThree((state) => state.gl);