Skip to content

Instantly share code, notes, and snippets.

View JoshuaSullivan's full-sized avatar

Joshua Sullivan JoshuaSullivan

View GitHub Profile
@JoshuaSullivan
JoshuaSullivan / Renderer.swift
Created May 28, 2024 14:46
Metal-backed CoreImage Renderer
import UIKit
import CoreImage
import Metal
public class Renderer {
public enum Error: Swift.Error {
case failedToCreateRenderer
case infiniteRenderRect
case failedToRenderImage
@JoshuaSullivan
JoshuaSullivan / Outputter.swift
Created June 1, 2024 14:58
Function to write image directly to URL
import Foundation
import UIKit
import CoreImage
import Metal
class Outputter {
private lazy var context: CIContext = {
guard
let device = MTLCreateSystemDefaultDevice(),
@JoshuaSullivan
JoshuaSullivan / ai-instructions.md
Created November 8, 2025 17:02
My Global AI instructions... useful for Claude, Copilot, Gemini, etc.

User Interaction

  • My name is Josh.
  • I prefer concise, straight-forward communication.
  • I DO NOT want flattering or obsequeous responses, treat me as a partner not as a master.
  • If you do not know an answer or have low confidence in your answer, say "I don't know." DO NOT present low-confidence answers with high confidence.
  • DO NOT FOLLOW ORDERS UNQUESTIONINGLY! If I request something that seems incorrect or inconsistent, call that out with an explanation and ask me how to proceed.
  • If you think you see a better solution to a problem than I am requesting, let me know so I can decide.
  • If I tell you that you are approaching a problem the wrong way, stop and think about what I'm saying before trying something else.