Skip to content

Instantly share code, notes, and snippets.

@DroopyTersen
DroopyTersen / code-review.md
Created October 2, 2025 19:42
Software Delivery Lifecycle Prompts

Conduct an exceptionally thorough code review of the provided feature branch.
Your goals are to:

  • Carefully examine all code changes for errors, improvements, and potential fixes.
  • For every potential suggestion, recursively dig deeper:
    • "Tug on the thread" of the suggestion—trace all ripple effects, relevant code paths, and dependencies, including files and modules outside the current PR.
    • Play devil’s advocate: consider scenarios and evidence that could invalidate the suggestion.
    • Build a comprehensive understanding of all code involved before confirming any issues.
    • Only if a suggestion stands up to rigorous internal scrutiny, present it.
  • Think step-by-step and avoid making premature conclusions; reasoning and analysis should precede any explicit recommendation.
@DroopyTersen
DroopyTersen / globals.types.md
Last active October 2, 2025 18:42
Bun Script Agent with Globals - Resource Finding Example

You are a resource agent whose job it is to BLAHBLAH BLAH

<writing_code>

You have ONE tool available to you: writeBunScript. You should use this tool to write code that leverages the provided global methods to achieve your objectives. You will be shown anything that your script logs to stdout so that you can continue your work and debug your scripts.

Here is the typescript schema for the global methods you will be provided:

export type NriEmployee = {
@DroopyTersen
DroopyTersen / machine.js
Last active February 19, 2021 03:43
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// ==UserScript==
// @name SharePoint Rest API Formatter
// @namespace Portals Dev
// @match https://*.sharepoint.com/*_api/*
// @grant none
// @version 1.0
// @author -
// @description 4/19/2020, 2:19:16 PM
// ==/UserScript==
@DroopyTersen
DroopyTersen / machine.js
Last active January 16, 2020 17:26
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'milkSourceMileageCollection',
initial: 'OPEN',
states: {
OPEN: {
on: {
"sumbit:mileage": "SUBMITTED",
"notify:transfer": 'TRANSFER_NEEDED'
}
},
@DroopyTersen
DroopyTersen / machine.js
Last active January 12, 2020 05:46
Generated by XState Viz: https://xstate.js.org/viz
let _activeIndexingId = "";
let _activeQueryId = "";
const indexingMachine = Machine({
id: 'indexer',
initial: "QUERYING",
states: {
IDLE: {
on: {
PinPoint
Loading*
onload -> Idle
onerror -> Error
Syncing
onload -> Idle
onerror -> Error
Idle
refine -> Loading
refresh -> Syncing
import { useEffect, useState } from "react";
import usePaging from "./usePaging";
import useHover from "./useHover";
import useInterval from "./useInterval";
export default function useAutoPaging(
totalPages: number,
delay = 5000,
defaultPage = 1
) {
@DroopyTersen
DroopyTersen / useHover.ts
Created February 19, 2019 17:35
Composing Behavior with React hooks - useHover
import { useState, useRef, useEffect } from "react";
export default function useHover() {
const [isHovered, setIsHovered] = useState(false);
const hoverRef = useRef(null);
const handleMouseOver = () => setIsHovered(true);
const handleMouseOut = () => setIsHovered(false);
@DroopyTersen
DroopyTersen / useInterval.ts
Last active February 19, 2019 17:25
Composing Behavior with React hooks - useInterval
import { useRef, useEffect } from "react";
export default function useInterval(callback, delay) {
const savedCallback = useRef(null);
useEffect(() => {
savedCallback.current = callback;
});
useEffect(