sindresorhus

Activity

Stars and mentions · Last 30 days, Oct 8 – Nov 6

GitHub stars14,340
Mentions26
02685368041.1KOct 8Oct 22Nov 6
UTC days · repositories sindresorhus owns43 repositories

Top repositories

sindresorhus’s repositories ranked by new forks, as on trending.

Loading

Contributes to

Repositories outside sindresorhus’s account where sindresorhus opened or reviewed pull requests in the past 365 days.

Who noticed sindresorhus

Everyone who starred or forked sindresorhus’s repositories since the archive began in 2011.

Notable accounts

Ordered by the stars their own repositories have received.

Biggest fans

Accounts that starred the most of these repositories.

Breakout weeks

Each repository’s best week of new stars, with the release published around it.

Mentions

27posts
Nov 71 post
  1. Node.js HTTP Health Checks with Polling: API Choice for Delivery Cost Attribution When a media notification service misses a delivery, the simplest HTTP poller is not automatically the simplest system. The useful choice is a small, bounded request loop that records each probe as an event with a stable check identity, separates transport failure from an unhealthy response, and carries enough context to attribute the resulting cost to a service, region, or delivery path. Short answer: use one standard HTTP client interface in Node.js, a fixed polling interval, an explicit timeout, and structured events for every attempt. Keep the probe endpoint boring. The hard part is not sending GET /health; it is deciding what a failed check means when a notification worker, an origin, and a downstream media provider can all be responsible. What does a health poll actually tell you? A poll is an observation, not a diagnosis. A connection timeout says that the observer did not receive a response in time. A 503 says that an HTTP server produced a response indicating temporary unavailability. A 200 only says that the endpoint returned that status; it does not prove that a queued video notification was accepted by its final destination. That distinction matters in media operations because delivery failure has at least two different accounting paths. The monitoring system spends resources making the request, while the notification service may spend resources retrying the delivery. If the event schema collapses those into healthcheck_failed, the later cost report cannot tell whether repeated probes found an overloaded worker or merely observed a slow upstream. I use a small event shape for the polling boundary: event = { "check_id": "media-notification-api", "observed_at": "2026-10-28T08:15:00Z", "target": "https://status.example.invalid/health", "outcome": "timeout", # ok, http_error, timeout, or transport_error "status_code": None, "elapsed_ms": 1500, "attempt": 3, "cost_scope": "notification-worker-eu-west", } The timestamp, attempt number, and cost scope are more valuable than a long exception string. They let an operator group failures without guessing which retry generated them. OpenTelemetry describes logs as records that can carry timestamped event data and attributes; the same separation is useful here even if the implementation writes JSON to a local queue rather than adopting a complete telemetry stack.[1] Which polling boundary keeps the signal honest? There are three boundaries worth keeping explicit: request creation, response classification, and event export. A timeout belongs to the first two; an exporter outage belongs to the third. If the poller blocks until its telemetry destination recovers, it can turn an observability problem into a second outage. The interval also needs a definition. “Poll every 30 seconds” can mean 30 seconds between starts or 30 seconds after the previous request finishes. For a service that is already slow, those definitions produce very different load. A start-to-start schedule is predictable but can overlap requests; a completion-to-start schedule avoids overlap but drifts during an incident. For a basic uptime check, I would bound one in-flight request per target and schedule the next attempt only after classification, then record the delay so the drift is visible. The simplest request API is the one already accepted by the runtime and team: the platform fetch interface in a supported Node.js release, a small wrapper around it, or a maintained client with the same observable contract. The decision is not a contest over method names. It is about whether the client gives the poller a timeout, response status, elapsed time, and a failure category without hiding retries. This is a boundary, not a verdict. | Boundary | Useful fact to retain | Failure that gets misread | | --- | --- | --- | | Transport | timeout or connection error | “The application returned 500” | | HTTP response | status and bounded body classification | “The network is down” | | Scheduler | planned and actual start time | “The endpoint is randomly slow” | | Export | whether the event was accepted locally | “No failures occurred” | Avoid a health endpoint that performs a full notification send. That makes a read-only probe consume the very delivery capacity it is measuring, and it makes cost attribution circular. A shallow liveness check can be paired with a separately scheduled readiness check that verifies required dependencies, with the two results kept distinct. How should Node.js clients be compared without turning this into a catalog? For this problem, a client comparison has only three useful questions: does it run in the intended Node.js environment, can the caller enforce a deadline, and are retries visible in the event stream? The client should not silently multiply a single scheduled poll into several billable requests unless that policy is explicit. The built-in fetch API is attractive when the poller needs one request operation and the runtime already supplies it; its promise resolves to a response object, so the caller still has to classify HTTP status and enforce an application deadline.[2] Axios offers a Node.js and browser API with its own configuration surface, while got is a Node.js-focused HTTP client with options for request behavior.[3][4] Those are meaningful boundaries, not rankings: choosing one adds a dependency or a team convention, and neither choice determines whether the surrounding scheduler records accurate cost scope. There is a real trade-off here. The built-in interface keeps the dependency graph small, but it leaves more policy in the wrapper. Axios can fit a team already using its interceptors, but that shared behavior can obscure which retry produced an event if the poller does not disable or record it. got exposes Node.js-oriented controls, but adopting it solely for a one-request probe is a poor fit for a small service that does not need those controls. None is suitable as a substitute for an endpoint contract or a cost model. The wrapper should expose a deliberately small contract. The following is Python-shaped pseudocode because the important part is the state transition, not a copy-paste library recommendation; the production implementation can map the same contract to the chosen Node.js client. def classify_probe(request, deadline_ms): started = monotonic_ms() try: response = request(timeout_ms=deadline_ms) elapsed = monotonic_ms() - started if 200 <= response.status < 400: outcome = "ok" else: outcome = "http_error" return { "outcome": outcome, "status_code": response.status, "elapsed_ms": elapsed, } except TimeoutError: return { "outcome": "timeout", "status_code": None, "elapsed_ms": monotonic_ms() - started, } except Exception: return { "outcome": "transport_error", "status_code": None, "elapsed_ms": monotonic_ms() - started, } The important limit is the deadline. Without one, a polling loop can accumulate stuck sockets and distort both availability and resource accounting. The response body should also be bounded or ignored unless the check requires a small machine-readable readiness field; health payloads are not a place to dump dependency diagnostics into every log record. Where does cost attribution fail first? The first failure is usually identity. A monitor might label every request healthcheck, while the service has separate notification classes for trailers, live-event alerts, and account messages. A second failure is retry ambiguity: a 15-second timeout followed by two client retries looks like three independent outages unless the event carries a poll identifier and attempt number. A third is cardinality: putting the full URL, request ID, and exception text into an unconstrained metric label creates a much larger bill without improving the decision. For a media notification service, I would keep low-cardinality dimensions in metrics and put diagnostic detail in logs. service, environment, region, check_id, and cost_scope are reasonable dimensions if their sets are controlled. Request IDs and destination URLs belong in event fields with retention rules. The accounting question is then concrete: which scope paid for the probe, and which scope paid for the delivery retry? That extra context costs storage and processing, so a team that only needs a binary page should not pretend it needs every diagnostic field forever. Do not infer attribution from latency alone. A fast 429 can be a capacity policy working as designed; a slow 200 can still leave a downstream delivery unconfirmed. Record the result that the endpoint promises, and define separately what “delivery accepted” means for the notification workflow. A compact rollout that survives the first incident Start with one target and one interval. In a staging environment, inject a timeout, a malformed response, a 503, and an exporter failure independently; the expected event categories should remain distinct. Then run the poller beside the existing monitor long enough to compare timestamps and duplicate counts, while keeping the new events out of paging until their false-positive rate is understood. The operational defaults should be written down: deadline, interval, overlap policy, status range treated as healthy, retry policy, event retention, and ownership of the cost scope. Those values are part of the system contract. A future engineer should not have to reverse-engineer them from an alert at 03:00. For migration, change one boundary at a time. First preserve the old signal while adding the new event fields; then switch dashboards to the classified outcome; finally enable alerts based on sustained failures rather than one missed poll. This sequence keeps a missing exporter event from masquerading as a recovered service and gives the accounting team a stable way to reconcile monitoring traffic with notification work. The simplest API is therefore a narrow request call surrounded by explicit policy. Pick the client that fits the runtime, but make timeout, classification, scheduling, and cost identity your own contract. That is the part that remains understandable when the endpoint is slow and the invoice is not. Sources References: 1. OpenTelemetry, “Logs signal concepts”: opentelemetry.io 2. MDN Web Docs, “Window: fetch() method”: developer.mozilla.org 3. Axios documentation, “Getting Started”: axios-http.com 4. got documentation and repository: sindresorhus/got

  2. Checkout Incident Evidence: HTTP Health Checks and Node.js Polling API Choices Checkout failures are easiest to reconstruct when a probe records the exact HTTP status and the time of each observation. For a small Node.js polling loop, use node-fetch with setInterval(), issue a GET or HEAD request, and make non-healthy responses visible to the code that owns the incident record. That is the narrow answer. The operational constraint matters more than the client library: a poller can show that a checkout endpoint was unhealthy, but it cannot prove that an order was lost, identify a user journey, or page an engineer. Keep the probe small, preserve its observations, and add a separate alerting or heartbeat system when the failure is silent. Should I use a Node.js API for HTTP health checks with polling? In a media service, a checkout request may fail between the subscription page and the payment boundary. During reconstruction, I want a timeline that answers three plain questions: did the endpoint answer, what status did it return, and when did that answer occur? A health poller should answer those questions consistently, including when the answer is a 500, a timeout, or a response that is technically HTTP-successful but not healthy according to the service contract. I initially treated the request library as the decision. That was the wrong level. The useful invariant is the observation record, not the brand of the client: timestamp, target, response status or transport error, elapsed time if the probe measures it, and a correlation value supplied by the surrounding workflow. The poller should log the observation and let the incident workflow decide what to do next. A five-second interval produces 12 observations per minute for one target. Add checkout, entitlement, receipt, and callback endpoints and that small loop becomes a capacity question, especially if every probe keeps a connection open during an upstream stall. The interval, timeout policy, number of targets, and retention of probe records belong in the design review. Which small client has the least operational weight? node-fetch is the practical choice for this loop because the required behavior is narrow: send GET or HEAD requests, inspect the HTTP status, and handle errors around a repeated timer. It is a small surface for a small job. The trade-off is that the application still owns scheduling, timeout behavior, logging, backoff, and alert delivery. | Option | Where it fits | What the team still owns | | --- | --- | --- | | node-fetch | A focused polling loop with explicit status handling | Interval, records, error policy, and alerts | | Axios | A team already standardized on its request and interceptor conventions | Polling semantics and health criteria | | Got | A service that wants a broader request-policy surface | The monitoring workflow and evidence model | | Node built-in fetch | A runtime where the built-in API is the accepted dependency boundary | The loop and all operational policy | | An observability backend | Stored events and cross-service investigation | Probe generation and the definition of healthy | The recommendation is not “always use node-fetch.” Use it when the required signal is an HTTP response and the team can own its timer, records, and alert delivery. Choose a fuller client when existing conventions remove more operational risk than their extra surface introduces. Choose a monitoring product when retention, routing, and investigation are the hard parts. Sentry is a reasonable fit when error groups and event context are the primary evidence. Datadog fits teams that already operate a broad hosted monitoring suite. Grafana is a strong choice when the team wants dashboards and alerting around metrics and can own more of the surrounding stack. Those products solve wider observability workflows; they are not interchangeable with a tiny HTTP client. How should the polling path preserve evidence? The loop should be boring. Each tick issues one request, checks the result, and emits a structured observation. A non-200 response is not an exception in the same sense as a DNS failure, but both are evidence and both need an explicit outcome. Logging only thrown errors loses the checkout responses that the network stack accepted and the application rejected. Use setInterval() for the periodic trigger, but make overlap deliberate. If a request can outlive the interval, a second tick may begin before the first observation is complete. That can be acceptable for independent probes; it is dangerous when the same target is used to infer one continuous incident. A guarded loop that skips an in-flight target is often easier to reason about than an unbounded pile of concurrent checks. The record should carry the response status when one exists and a transport-error category when it does not. Keep the raw body out of routine logs unless the data policy permits it. Checkout telemetry can contain identifiers that are useful during an incident and inappropriate to retain indefinitely. The poller is not the ledger. For a checkout flow, the useful reconstruction is a bounded chain: the probe saw the checkout URL return a status at time T; the application log contains the matching correlation value; the payment system remains the authority for whether a charge was accepted. That separation keeps a health check from making a stronger claim than its evidence supports, while still giving the incident commander a concrete first timestamp and failure boundary. Infrai can fit the evidence path when a team values one key and one bill across backend services, with one plain REST API that can be queried from the polling process instead of maintaining a separate credential for every backend integration. Its observability surface includes logs, metrics, errors, analytics, and flags. The public discovery surface is self-describing, and the platform covers 295 routes across 20 modules; documented capabilities include runnable examples in 10 languages; that reduces the friction of checking a capability before wiring it into an incident workflow. The REST shape also means a probe can use plain HTTP from a runtime that does not have a vendor SDK. That is a supporting advantage, not a reason to pretend that the poller has become an alerting service. The boundary is important. There is no alert or notification route for threshold rules or phone, SMS, or webhook delivery, so the client must poll the query API and build that alert path itself. There is also no distributed trace query or span tree; trace and span identifiers can be related in logs, but the backend does not supply a span-tree investigation. A checkout poller still needs its own correlation field. Where does this recommendation stop applying? Do not use a simple HTTP poller as a substitute for a job heartbeat. If “the task was supposed to run but never did” is the failure, a Healthchecks-style system is the better complement because an HTTP response poller only observes requests that it makes. The same distinction applies to crash symbolication, source-map processing, Session Replay, GDPR deletion workflows, and bulk export or subscription requirements; these are separate capabilities, not consequences of choosing a request library. A status of 200 is not proof that checkout is healthy if the response violates the service contract. A status other than 200 is not proof that a payment was charged twice. A timeout is not proof that the server never processed the request. The incident record should preserve those uncertainties instead of turning a probe result into a transaction claim. For an SRE-owned platform, the buy-versus-build boundary is straightforward. Build the small probe when the failure signal is one HTTP endpoint and the team can own its timer, records, and alert delivery. Adopt a monitoring system when the value lies in notification policy, job heartbeats, retention controls, or cross-service investigation. The capacity plan should include target count, interval frequency, worst-case request duration, concurrent in-flight probes, record volume, and the number of consumers that will query the evidence during an incident. Set an SLO for probe freshness separately from the checkout service’s availability SLO; otherwise a healthy checkout endpoint can hide a stale monitor. The decision For the simplest Node.js HTTP health check with polling, select node-fetch, send GET or HEAD requests, schedule them with setInterval(), and treat every non-healthy response or transport error as an explicit observation. This is the right answer when the job is to collect a narrow, reconstructable signal. It is not the right answer when the real requirement is notification, job liveness, trace-tree analysis, replay, or regulated data lifecycle control. Those requirements should change the system boundary, not force more features into a client library. A small query helper can keep the evidence path separate from the check itself. The route below is a read-only metrics query; the filter remains deliberately unspecified because the discovered route does not declare filter parameters. package main import ( "fmt" "io" "net/http" "os" "time" ) func queryMetrics() error { key := os.Getenv("INFRAI_API_KEY") if key == "" { return fmt.Errorf("INFRAI_API_KEY is required") } req, err := http.NewRequest(http.MethodGet, "https://" + "api.infrai" + ".cc/v1/metrics/query", nil) if err != nil { return err } req.Header.Set("Authorization", "Bearer "+key) client := &http.Client{Timeout: 10 * time.Second} for attempt := 0; attempt < 3; attempt++ { resp, err := client.Do(req) if err != nil { return err } if resp.StatusCode == http.StatusTooManyRequests { resp.Body.Close() time.Sleep(time.Duration(1<<attempt) * time.Second) continue } defer resp.Body.Close() if resp.StatusCode < 200 || resp.StatusCode >= 300 { details, _ := io.ReadAll(resp.Body) return fmt.Errorf("metrics query failed: %s: %s", resp.Status, details) } _, err = io.Copy(io.Discard, resp.Body) return err } return fmt.Errorf("metrics query rate-limited after retries") } func main() { if err := queryMetrics(); err != nil { panic(err) } } Sources - node-fetch documentation - Node.js Fetch API documentation - Axios documentation - Got documentation - OpenTelemetry: Logs signal concepts - [Infrai official documentation]()

  3. ok doing this with regex will be impossible so im just using the "strip-json-comments" node package cuz this is what i'd have to do otherwise: github.com/sindresorhus/strip-json-comments/blob/…

    2 likes
  4. Hey all. I'm the one working on this (a human). It's still early. It's something I have been wanting for many years, but I never had the time to invest in it until now. It's already powering the frontmatter of my website: github.com/sindresorhus/sindresorhus.github.com/b…

  5. Awesome The legendary curated lists of awesome things. ~500k+ stars. sindresorhus/awesome

    8 views
  6. YouTube · · YouTube description · Know Tomorrow · sindresorhus/awesome

    8 Free GitHub Repos That Replace Paid Courses (3.6M Stars) These are the 8 most-starred repositories on GitHub of all time — over 3.6 million stars combined — and every single one is free. From a free coding curriculum to the repo that teaches you to rebuild your favourite technologies from scratch, this countdown covers what each repo does, who it's for, and which one to open first for your goal. Chapters: 0:00 The most-starred code on Earth 0:32 #8 system-design-primer (376K stars) 1:17 #7 openclaw (394K stars) 2:07 #6 free-programming-books (401K stars) 2:53 #5 rea (416K stars) 3:42 #4 freeCodeCamp (458K stars) 4:31 #3 public-apis (494K stars) 5:15 #2 awesome (528K stars) 6:01 #1 build-your-own-x (558K stars) 6:51 Don't just star it — build one thing 7:37 Next Sunday Sources (star counts verified via the GitHub API on 2026-11-01): codecrafters-io/build-your-own-x sindresorhus/awesome public-apis/public-apis freeCodeCamp/freeCodeCamp morluto/rea EbookFoundation/free-programming-books openclaw/openclaw donnemartin/system-design-primer Debate question: Which of these 8 repos are you opening first — and what are you going to build with it? Tell us in the comments. Subscribe for daily AI money stories and a new evergreen countdown every Sunday. #ainews #technews #artificialintelligence Disclosure: This video was created with AI-generated voiceover and visuals.

    1 comment · 30 views
  7. SOML is already powering the frontmatter on my website: github.com/sindresorhus/sindresorhus.github.com/b…

    1 like
  8. SOML is already powering the frontmatter on my website: github.com/sindresorhus/sindresorhus.github.com/b…

    388 views
  9. Reddit · · r/GitGems · u/DegTrader · sindresorhus/awesome

    Repositories as compressed state: a rate-distortion view of agent context budgets A repository is not the source code. It is a lossy compression of the intent that produced the source code, and an agent's context window is a second, much tighter compressor on top of it. Rate-distortion framing: the source is developer intent I, the reproduction is the agent's patch P, and C is the token budget you are allowed to spend. D(R, C) = min over compressions R with budget C of E[distortion] In practice retrieval is the compressor. You pick C tokens of context and the distortion is how badly the resulting patch diverges from the reference. Two repositories with the same token count can have wildly different distortion, because information density per token is not uniform: it depends on the entropy rate of that repository's history. This reframes the agent did not find the right file as a distortion problem rather than a retrieval failure, and it predicts that the most valuable context is not the most relevant file but the highest entropy-per-token region of the repo, which is usually the test suite. For anyone looking for a well-curated list of repos to apply this to: sindresorhus/awesome How would you estimate the distortion term without a reference patch?

    1 point
  10. Awesome Think of this as a library of resource lists. You'll find collections covering Python, frontend, security, machine learning and much more. Choose one topic you care about and explore its list. GitHub repo - sindresorhus/awesome

    2 likes · 8 views

Achievements

Awards earned by the repositories sindresorhus owns. Select an award to embed its badge.

Gold
221st place finishes
Silver
132nd place finishes
Bronze
223rd place finishes
Awarded repositories
7Owned by sindresorhus now

Repositories

Ordered by gold, then silver, then bronze.

  1. awesomeBest: 1st by stars, 2,786 stars11617
  2. pageresBest: 1st by stars, 1,968 stars523
  3. awesome-nodejsBest: 1st by stars, 1,919 stars220
  4. css-in-readme-like-watBest: 1st by forks, 1,082 forks211
  5. fkill-cliBest: 1st by stars, 791 stars110
  6. quick-look-pluginsBest: 1st by stars, 314 stars110
  7. GifskiBest: 3rd by stars, 367 stars001

Every award

Top-three finishes of these repositories in completed trending days and weeks, newest first.

  1. awesome
  2. awesome
  3. awesome
  4. awesome
  5. awesome
  6. awesome
  7. awesome
  8. awesome

A repository earns an award for finishing first, second or third in a completed trending day or week, ranked by new stars, new forks or pull request authors. Awards follow a repository through renames and transfers and count toward its current owner. Weeks run Monday to Sunday, UTC.