Code Snippets. React, TypeScript, Elixir & more
Some snippets I saved, that are not enough to be a blog post.
Slowly updating and adding more
Adding delay in DEV requests with axios Slowing down requests, and making DEV env feel more natural | AxiosTypeScriptDev Environment | ||
camelCase model properties in AdonisJS Serializing AdonisJS models to camelCase globally | AdonisJSTypeScriptORMNaming Strategy | ||
Authorization module in Elixir Quick and simple authorization module in Elixir. | ElixirAuthorization | ||
Auto-hide Phoenix flash messages Automatically hide Phoenix flash messages after a certain time | ElixirPhoenixJavaScript | ||
Cloudinary image as blur hash Generating blur hash from Cloudinary images for my covers | TypeScriptImage Processing | ||
Domain Model with Zod & FP-TS One-stop-shop for all our domain needs | FP-TSTypeScript | ||
FP-TS partition Partition a collection using FP-TS | FP-TSTypeScript | ||
FP-TS ReaderTaskEither Quick look on how to use ReaderTaskEither | FP-TSTypeScript | ||
Nominal types Using nominal types to create type-safe identifiers | TypeScript | ||
Rate Limiter Service in Elixir Rate limiter service in Elixir using ETS | ElixirRate-limiterETSGen-server | ||
Rate limit in NestJS Using request rate limit | NestJSExpressRate LimitingMiddleware | ||
useCopy React hook for clipboard copy | ReactReact Hooks | ||
useDebounce React hook for debouncing value changes | ReactReact Hooks | ||
useNavigatorOnline React hook to detect when your browser is online/offline | ReactReact Hooks | ||
useObservable React hook with useSyncExternalStore to subscribe to an observable | ReactReact Hooks | ||
usePrevious React hook to keep previous value | ReactReact Hooks |