Skip to content

Instantly share code, notes, and snippets.

@lalunamel
lalunamel / gist:91c049e4168097e99b8f42726d0cc6fb
Created April 22, 2024 16:26
VSCode Extensions Made By Gusto Engineers
Please comment on the gist with a link to your extension!
@lalunamel
lalunamel / how-does-reacts-act-work.md
Last active May 11, 2024 01:21
How does React's act work?

How does React's act work?

tl;dr: It wraps some work you'd like to do and waits for that work to complete before returning

Why do I get this error?

An update to Component inside a test was not wrapped in act(...).

tl;dr: A React component is updating (probably as a result of changing state, props, or hooks) but that update is not happening inside of something wrapped in act.

  • Implemented in ReactFiberWorkLoop
  • That error is produced when running react in a test environment (not sure how it knows this tbh) and actQueue is null (actQueue is set when act is called)
@lalunamel
lalunamel / how-to-learn-drumming.md
Last active May 8, 2024 15:51
How to learn drumming

https://www.rifton.com/resources/webinars/2018/progressive-gait-training

Also interesting: https://gmb.io/motor-learning/

Vocab

  • Discrete Skills - skills with a beginning and end - e.g. going from sitting to standing
  • Complex Skills - skills that combine many discrete skills - e.g. getting out of bed
  • Continuous Skills - skills that have no defined beginning or end - e.g. walking through a crowded cafeteria
  • Massed Practice - Practicing different skills for a long period of time without rest
  • Distributive Practice - Practicing different skills for short periods interspersed by rest
@lalunamel
lalunamel / graphql-spec-notes.md
Created May 26, 2024 13:11
Notes on my reading of the GraphQL spec
@lalunamel
lalunamel / mcp-spec-notes.md
Created March 27, 2025 13:22
Model Context Protocol - Spec

https://modelcontextprotocol.io/introduction

MCP - A standard protocol (like LSP for IDEs) to connect LLMs with context and tools. Uses JSON-RPC - An RPC standard that uses JSON - pass a method name and some params, get a result back.

Vocab

  • Hosts - LLM applications (i.e. your IDE or Claude Desktop). Takes all the output from the clients and manages it. Acts as the UI.
  • Clients - Connects to one server instance. Does handshaking (capability exchange), manages talking back and forth between host and server.
  • Servers - Implement tools, contexts
  • Resources - Context, data
  • Prompts - Templates for querying an LLM