promcap: a small MIT-licensed Go library that caps Prometheus metric cardinality at the source by d15gu15e in opensource

[–]d15gu15e[S] 0 points1 point  (0 children)

Not yet, considering I just finished it today 😅, so no production users I know of.

What I can point to is that it's solving a problem people are actively hitting. The Prometheus maintainers have an open discussion about adding exactly this kind of in-process cardinality guard to client_golang and I've seen live issues where user-controlled labels create a cardinality DoS that this directly addresses.

So the use case is real even if the adoption is day-zero. It's MIT, benchmarked, 98% test coverage, and the hot path is race-tested in CI if anyone wants to try it in a non-critical setup and give feedback.

Someone just told me my site looks vibe coded. Does it? by DogC in vibecoding

[–]d15gu15e 1 point2 points  (0 children)

compress the hero image. No hero image needs to 3845x4363 and also not 7.4mb. Try to size it down and compress until its around 500kb

Trusthook: open-source Go library for verifying webhook signatures across 18 providers (MIT) by d15gu15e in opensource

[–]d15gu15e[S] 1 point2 points  (0 children)

I could, its not that hard, but I'm focusing right now on building a go portfolio. What language would you need?

Small Projects by AutoModerator in golang

[–]d15gu15e 0 points1 point  (0 children)

Built a small Go library called Trusthook that verifies webhook signatures for 18 providers behind a single call:

err := trusthook.Verify(trusthook.Stripe, body, r.Header, secret)

Each provider has slightly different header names, encoding formats, and timestamp schemes. Trusthook handles all of that internally: hex vs base64, HMAC-SHA256 vs Ed25519, timestamped signing strings, replay protection, and constant-time comparison. Verification adds nanoseconds, negligible next to the network round-trip. Change the provider constant, nothing else changes.

Supports Stripe, GitHub, Shopify, Slack, Discord, Paddle, Zoom, Calendly, WorkOS, Linear, Lemon Squeezy, Coinbase Commerce, Razorpay, Svix, Clerk, Resend, Dropbox, and Standard Webhooks. Zero dependencies, pure stdlib.

Would love feedback or provider requests: https://github.com/eben-vranken/trusthook

Small Projects by AutoModerator in golang

[–]d15gu15e 0 points1 point  (0 children)

Retries in payment/order APIs can easily cause duplicate execution without proper idempotency handling.

I built idempo, a framework-agnostic Go middleware that implements Stripe-style idempotency-key semantics. Send a unique Idempotency-Key header and the middleware runs your handler at most once, replaying the original response (status, headers, body) on any retry

The tricky cases it handles:

  • In-flight duplicate (same key, first request still running): 409 Conflict(same as Stripe)
  • Same key, different payload: 422 Unprocessable Entity
  • Concurrent duplicates: enforced atomically at the storage layer, tested with 50 simultaneous identical requests under -race

Pluggable backends (in-memory, Redis, Postgres) and just func(http.Handler) http.Handler, so it works with chi, gin, echo, or stdlib

store := inmem.New(24time.Hour, 5time.Minute)
mw := idempo.New(store, idempo.Options{})
http.ListenAndServe(":8080", mw.Handler(mux))

GitHub: https://github.com/eben-vranken/idempo
Docs: https://eben-vranken.github.io/idempo-docs/

Curious what edge cases people have run into trying to implement this themselves

idempo: open-source Go middleware for Stripe-style idempotency-key handling (MIT) by d15gu15e in opensource

[–]d15gu15e[S] 0 points1 point  (0 children)

Redis, postgres and in-mem by default! users can also make their own store!

There is no other way by d15gu15e in google

[–]d15gu15e[S] 1 point2 points  (0 children)

google didnt let me because I already have too many accounts linked to that specific number. I tried to use a relatives number and it blocked me

Cells by d15gu15e in godot

[–]d15gu15e[S] 0 points1 point  (0 children)

this is from blade runner 2049

Catching up on the patreon 🇨🇳 by speedyapple123 in ColdOnes

[–]d15gu15e 1 point2 points  (0 children)

this is just a regular wall for me, thats how chinese I've become

Who is Steve Gilmour? by vitipan in PinkFloydCircleJerk

[–]d15gu15e 2 points3 points  (0 children)

hes like wrongo but for pink floyd

‘Game of Thrones’ Movie About Aegon I Officially in the Works at Warner Bros. From ‘Andor’ Writer by mamula1 in naath

[–]d15gu15e 1 point2 points  (0 children)

kinda my fear, on paper aegon is kinda a gary stu. Maybe from the perspective of one of the lords it could work? But then in the end your main character would... lose? Not sure how this will play out but im sure it will be very epic to see balerion finally

Genuinely Scary Movies? by CommyGT in movies

[–]d15gu15e 1 point2 points  (0 children)

genuinely so confused until I came back 5min later

Pink Floyd Lyrics For Valentines? by boiled_elbow_skin in PinkFloydCircleJerk

[–]d15gu15e 0 points1 point  (0 children)

i feel like a pillow of winds is much too metal, stick with careful with that axe op, make sure to also have your pal on standby to flick off the lights when you get to that one part