Skip to content

Instantly share code, notes, and snippets.

@Arsenalist
Arsenalist / adr.md
Created June 30, 2026 16:52
Example ADR

title: "ADR-0009: In-memory all-time computation for customer journey analytics" description: Customer journey/loyalty views compute from one all-time query grouped in Elixir, with no caps, paging, or time window for v1. adr_id: "0009" status: active date: "2026-06-05" tags:

  • analytics
  • performance
  • conventions
@Arsenalist
Arsenalist / spec.md
Created June 30, 2026 16:45
spec.md

ADDED Requirements

Requirement: Add-on fulfillment records are created on order completion

The system SHALL create one add_on_fulfillments record for each add-on unit purchased in an order. Each record MUST have a unique, globally incrementing sequence number. The formatted code MUST be stored based on the variant's fulfillment_type.

Scenario: Customer purchases 5 raffle tickets

  • WHEN an order completes containing a line item with:
    • variant.is_add_on = true
  • variant.fulfillment_type = "raffle_entry"
@Arsenalist
Arsenalist / adr.md
Created June 30, 2026 16:30
ADR.md
description Create or supersede an Architecture Decision Record under site/internal/src/content/docs/adrs/
argument-hint
short title — optional

Create / supersede an Architecture Decision Record

Use this command when documenting an architectural decision made during a task. ADRs live in the Starlight internal docs site under site/internal/src/content/docs/adrs/ (URL: /internal/docs/adrs/).

Inspired by adr-tools (Nygard format), adapted for Starlight's frontmatter and Amplify's repo layout.

@Arsenalist
Arsenalist / adr-suggest.md
Last active June 30, 2026 16:29
adr-suggest.md
name adr-suggest
description Proactively offer to draft an Architecture Decision Record (ADR) when the conversation reaches an architectural decision point. TRIGGER when the user (or you) is choosing between alternatives ("X vs Y", "go with A or B"), switching away from an established approach ("replace X with Y", "deprecate X"), adding/removing a major dependency (mix.exs, npm, system service), introducing a new core abstraction (new context module, new CQRS aggregate, new behaviour), defining a cross-cutting convention ("from now on we always..."), or revisiting a previously made architectural choice. SKIP for bug fixes, UI styling, behavior-preserving refactors, test-only changes, copy edits, or work that follows an already-documented convention.

ADR Auto-Suggest

You've been activated because the conversation has the shape of an architectural decision. Your job is not to write the ADR yourself — it is to recognise the moment and steer the user toward the /adr slash command, which owns t

@Arsenalist
Arsenalist / example.ts
Created April 4, 2019 20:11
Sample bad code
// EXAMPLE 1
class Appliance {
name: string;
constructor(name: string){
this.name = name;
}
getName() {
return this.name;
}
Index: frontier/backendservice-parent/backendservice-common/src/main/java/com/frontier/exception/common/GlobalBEControllerExceptionHandler.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontier/backendservice-parent/backendservice-common/src/main/java/com/frontier/exception/common/GlobalBEControllerExceptionHandler.java (date 1509037066000)
+++ frontier/backendservice-parent/backendservice-common/src/main/java/com/frontier/exception/common/GlobalBEControllerExceptionHandler.java (revision )
@@ -125,7 +125,7 @@
private ErrorDto createDefaultErrorInfoObject(Exception exception) {
curl "https://ctc-customs.atlassian.net/rest/api/2/search" -H "Upgrade-Insecure-Requests: 1" -H "Cookie: mywork.tab.tasks=false; ISESSION=""6e5a049ac9b42e3e3d4738f7d5cdac8d64abeba9-xsrf=4cef945d51879c05db047ced5bfac6fc63210a91""; ondemand.signup.enabled=false; __atl_path=172.26.26.14.1441930664089256; studio.crowd.tokenkey=nf1hcjgYvsbdUkmXOtHYGA00; JSESSIONID=E2C90229F8C1DC81ABFBA1B06DCB0CFD; atlassian.xsrf.token=BE6K-ZQR5-NKNV-FREP|8081549e2d184997d9f4456a3a6cea6e3fcfd52b|lin" -H "Connection: keep-alive" -H "Content-Type: application/json" -X POST -d '{"jql": "issuetype = Story","startAt":0,"maxResults":1500,"fields":["id","key","summary","status.id","issuetype"]}'
ffmpeg -i old.mkv -c copy new.mp4
zarar@zarar-ubuntu64:~/test$ ls
sports-scraper.zip
zarar@zarar-ubuntu64:~/test$ unzip sports-scraper.zip
Archive: sports-scraper.zip
creating: sports-scraper/
creating: sports-scraper/lib/
inflating: sports-scraper/lib/sports-scraper.jar
inflating: sports-scraper/lib/jsoup-1.7.2.jar
inflating: sports-scraper/lib/commons-lang3-3.3.2.jar
creating: sports-scraper/bin/
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" content="raptorsrepublic.com">
<meta name="twitter:url" content="http://www.raptorsrepublic.com/2013/10/09/practice-recap-valanciunas-english-cumulative-talent-ross-laid-back/">
<meta name="twitter:site" content="@raptorsrepublic">
<meta name="twitter:title" content="Practice Recap, Valanciunas&#8217; English, Cumulative Talent, Ross Laid Back? ">
<meta name="twitter:description" content="Recapping the practice, looking back at some wings and debating whether the current 'big three' is the best one we've had in years, and some Valanciunas and Ross talk, including a GIF or two."/>
<meta property="twitter:image" content="http://www.raptorsrepublic.com/wp-content/uploads/2013/02/ross.jpg"/>
<meta property="twitter:image:src" content="http://www.raptorsrepublic.com/wp-content/uploads/2013/02/ross.jpg"/>