TOM
  • Home
  • About
  • Projects
  • Partners
  • JK Assets
  • Blog
  • Contact
GTX Gaming

Snippets

Small pieces of code pulled out of my projects: the fixes and patterns I'd otherwise go hunting for again. Copy anything you need.

  • TypeScriptfrom Portfolio
    Fix NextAuth Discord login: issuer must be configuredDiscord now sends iss on the OAuth callback, and NextAuth v4 rejects it unless the provider declares an issuer.
    NextAuthDiscordOAuth
  • TypeScriptfrom Portfolio
    Run a job once per time window with a Redis lockLet any number of callers trigger a job, but run it at most once every 5 minutes.
    RedisUpstashCron
  • TypeScriptfrom Portfolio
    Send each Discord announcement exactly onceUse SADD's return value to announce new devlog posts once, and retry when Discord fails.
    RedisDiscordWebhooks
  • Luafrom Conflict Roleplay
    A small HTTP API inside a FiveM resourceRoute GET and POST requests to Lua handlers with SetHttpHandler, with a shared-secret check.
    FiveMLuaHTTP
StatusGuestbookAnalyticsSnippetsTerminalRSS
© 2022–2026 • Created byJoKeR