Skip to content

Instantly share code, notes, and snippets.

View hamatoyogi's full-sized avatar

Yoav Ganbar hamatoyogi

View GitHub Profile
@ladymeyy
ladymeyy / gist:4d4b92e3b38bc12dac5e712a09a5e59f
Last active February 25, 2026 10:12
Create your own KIPI
> You are Kipi Setup Assistant.
>
> Greet the user warmly and introduce yourself:
> "Hi! I'm going to help you set up Kipi — your Core-Knowledge Keeper. Kipi is an AI agent that builds and maintains deep, structured documentation for your project so that anyone — even someone who has never seen the codebase — can understand, fix, or rebuild it."
>
> Then, check for BMAD:
> Look for a _bmad/ directory in the project root.
> - If found: Say "I see you already have BMAD installed — great! I'll use the BMAD framework to build Kipi with full compliance."
> - If not found: Say:
> "Before we continue, I noticed you don't have the BMAD Method installed in this project. I strongly recommend setting it up first — BMAD provides the framework that Kipi is built on, including structured agent patterns, menu systems, workflows, and compliance validation. It will make Kipi much more robust and maintainable.

These are some notes on the performance work that went into alien-signals. I'm sharing them not as a definitive guide, but as a log of a few key discoveries. The hope is that some of these findings might be useful to others tackling similar problems in high-performance JavaScript.

The Origin: Push-Pull-Push

My journey into the depths of reactivity performance began with Vue. I was trying to solve a specific problem in Vue 3.4: even if a computed's value didn't change, it would still trigger downstream computations and effects. This seemed inefficient. My attempt to fix this resulted in a pull request (vuejs/core#5912) that, after a year of discussions, was eventually merged. This PR introduced the Push-Pull-Push model to Vue 3.4, a model also adopted by libraries like reactivity.

For a time, I thought this was near-perfect. Then I saw the plans for Vue 3.5, which adopted a doubly-linked list but also moved to a pure pull-based model. I was still convinced

@tzafrir
tzafrir / tdd_workflow.mdc
Created September 16, 2025 09:05
TDD Cursor Rule Workflow for Context Engineering
---
alwaysApply: false
---
# TDD Workflow Rules
## Core TDD Principles
- **Always start with failing tests** before writing implementation code
- Follow the Red-Green-Refactor cycle strictly
- Write the minimal code necessary to make tests pass
@pontusab
pontusab / proximity-prefetch.tsx
Created April 6, 2025 06:43
Next.js Proximity Prefetch (PPF)
"use client";
import { useRouter } from "next/navigation";
import type { ReactNode } from "react";
import { useCallback, useEffect, useState } from "react";
interface ProximityPrefetchProps {
children: ReactNode;
threshold?: number;
predictionInterval?: number;
@shilomagen
shilomagen / backend.mdc
Created March 3, 2025 07:45
Cursor Rules Example
---
description: Rules for backend (NestJS application)
globs: apps/**/*.*
---
# Backend Guidelines
You are a senior backend NodeJS, Typescript engineer with experience in the NestJS framework and a preference for clean programming and design patterns.
Generate code, corrections, and refactorings that comply with the basic principles and nomenclature.
## Basic Principles
@t3dotgg
t3dotgg / try-catch.ts
Last active March 10, 2026 03:34
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@trvswgnr
trvswgnr / fetchJson.test.ts
Last active July 5, 2025 15:00
nice lil typescript fetch wrapper with errors as values
import { describe, it, expect, spyOn } from "bun:test";
import { fetchJson } from "./fetchJson";
class MockResponse {
static instanceCount = 0;
constructor(
public readonly ok: boolean,
private jsonSuccess: boolean | "bad parse",
) {
MockResponse.instanceCount++;
import { component$, Slot, useSignal, useVisibleTask$ } from '@builder.io/qwik';
export const ResumeBrowser = component$(() => {
const csr = useSignal(false);
// eslint-disable-next-line qwik/no-use-visible-task
useVisibleTask$(() => {
csr.value = true;
});
return csr.value ? <Slot /> : null;
});
@rauchg
rauchg / p.sh
Last active December 12, 2025 08:21
Perplexity CLI in pure shell
#!/usr/bin/env bash
function p() {
jq -n \
--arg content "$*" \
'{
"model": "pplx-7b-online",
"messages": [
{
"role": "system",
"content": "Be precise and concise."
name: PlanetScale Migration
on:
pull_request:
types: [opened, synchronize]
paths:
- packages/shared/adapters/prisma/schema.prisma
env:
PLANETSCALE_ORG: flightcontrol
PLANETSCALE_DB: fc-production