# Today I Learned Short notes on things I learn day to day. Inspired by [Simon Willison](https://github.com/simonw/til). 119 TILs so far. ## misc * [TIL 06-18-2025](https://github.com/krisyotam/til/blob/main/misc/til-06-18-2025.md) - 2025-06-18 ## poetry * [Chinese Classics & Poetry — Vivien's Recommendations](https://github.com/krisyotam/til/blob/main/poetry/chinese-classics-poetry-viviens-recommendations.md) - 2024-12-10 ## programming * [Use Zod to validate File input](https://github.com/krisyotam/til/blob/main/programming/use-zod-to-validate-file-input.md) - 2025-06-17 * [Remove debugger statements in Vite](https://github.com/krisyotam/til/blob/main/programming/remove-debugger-statements-in-vite.md) - 2025-06-15 * [Type declarations for a Vite app](https://github.com/krisyotam/til/blob/main/programming/type-declarations-for-a-vite-app.md) - 2025-06-11 * [User-defined type guard in TypeScript](https://github.com/krisyotam/til/blob/main/programming/user-defined-type-guard-in-typescript.md) - 2025-06-10 * [TypeScript Template Literal Types](https://github.com/krisyotam/til/blob/main/programming/typescript-template-literal-types.md) - 2025-06-09 * [TypeScript: Satisfies operator](https://github.com/krisyotam/til/blob/main/programming/typescript-satisfies-operator.md) - 2025-06-08 * [Inferring the types from a Remix loader](https://github.com/krisyotam/til/blob/main/programming/inferring-the-types-from-a-remix-loader.md) - 2025-06-07 * [Array.prototype.reduce() can be typed in TypeScript](https://github.com/krisyotam/til/blob/main/programming/arrayprototypereduce-can-be-typed-in-typescript.md) - 2025-06-06 * [TypeScript: ElementRef for React.useRef](https://github.com/krisyotam/til/blob/main/programming/typescript-elementref-for-reactuseref.md) - 2025-06-05 * [TypeScript: Type-only imports and exports](https://github.com/krisyotam/til/blob/main/programming/typescript-type-only-imports-and-exports.md) - 2025-06-04 * [Extending HTML Element Types in React 18](https://github.com/krisyotam/til/blob/main/programming/extending-html-element-types-in-react-18.md) - 2025-06-03 * [Overriding HTML Attributes in React TypeScript](https://github.com/krisyotam/til/blob/main/programming/overriding-html-attributes-in-react-typescript.md) - 2025-06-02 * [TypeScript: @ts-expect-error](https://github.com/krisyotam/til/blob/main/programming/typescript-ts-expect-error.md) - 2025-06-01 * [TypeScript: Exhaustiveness checking in switch with union type](https://github.com/krisyotam/til/blob/main/programming/typescript-exhaustiveness-checking-in-switch-with-union-type.md) - 2025-05-31 * [TypeScript Exact Types](https://github.com/krisyotam/til/blob/main/programming/typescript-exact-types.md) - 2025-05-30 * [TypeScript: exactOptionalPropertyTypes](https://github.com/krisyotam/til/blob/main/programming/typescript-exactoptionalpropertytypes.md) - 2025-05-29 * [TypeScript Config: noUnCheckedIndexAccess](https://github.com/krisyotam/til/blob/main/programming/typescript-config-nouncheckedindexaccess.md) - 2025-05-28 * [TypeScript: Callable interface](https://github.com/krisyotam/til/blob/main/programming/typescript-callable-interface.md) - 2025-05-27 * [TypeScript Assertion Functions](https://github.com/krisyotam/til/blob/main/programming/typescript-assertion-functions.md) - 2025-05-26 * [TypeScript narrow Array.includes()](https://github.com/krisyotam/til/blob/main/programming/typescript-narrow-arrayincludes.md) - 2025-05-25 * [The Details disclosure element](https://github.com/krisyotam/til/blob/main/programming/the-details-disclosure-element.md) - 2025-05-23 * [SvelteKit Sync](https://github.com/krisyotam/til/blob/main/programming/sveltekit-sync.md) - 2025-05-21 * [Svelte components have file location meta data](https://github.com/krisyotam/til/blob/main/programming/svelte-components-have-file-location-meta-data.md) - 2025-05-20 * [Deep clone object with structuredClone()](https://github.com/krisyotam/til/blob/main/programming/deep-clone-object-with-structuredclone.md) - 2025-05-19 * [Spaces vs tabs: It's an accessibility issue](https://github.com/krisyotam/til/blob/main/programming/spaces-vs-tabs-its-an-accessibility-issue.md) - 2025-05-18 * [Microfrontend using single-spa](https://github.com/krisyotam/til/blob/main/programming/microfrontend-using-single-spa.md) - 2025-05-17 * [setTimeout(): Node.js vs Web](https://github.com/krisyotam/til/blob/main/programming/settimeout-nodejs-vs-web.md) - 2025-05-16 * [Implementing a custom RTK Query baseQuery](https://github.com/krisyotam/til/blob/main/programming/implementing-a-custom-rtk-query-basequery.md) - 2025-05-15 * [Remove React app from the DOM](https://github.com/krisyotam/til/blob/main/programming/remove-react-app-from-the-dom.md) - 2025-05-13 * [Automatically handle `updated_at` column](https://github.com/krisyotam/til/blob/main/programming/automatically-handle-updatedat-column.md) - 2025-05-11 * [Use pnpm's shell-emulator to execute scripts on all platforms](https://github.com/krisyotam/til/blob/main/programming/use-pnpms-shell-emulator-to-execute-scripts-on-all-platforms.md) - 2025-05-10 * [Make changes to a dependency using pnpm patch](https://github.com/krisyotam/til/blob/main/programming/make-changes-to-a-dependency-using-pnpm-patch.md) - 2025-05-09 * [Today I Learned: PHP](https://github.com/krisyotam/til/blob/main/programming/today-i-learned-php.md) - 2025-05-08 * [Using Nunjucks Macros in Eleventy](https://github.com/krisyotam/til/blob/main/programming/using-nunjucks-macros-in-eleventy.md) - 2025-05-07 * [Null is a billion-dollar mistake](https://github.com/krisyotam/til/blob/main/programming/null-is-a-billion-dollar-mistake.md) - 2025-05-06 * [Show data about an npm package using npm view](https://github.com/krisyotam/til/blob/main/programming/show-data-about-an-npm-package-using-npm-view.md) - 2025-05-05 * [npm using latest version of package](https://github.com/krisyotam/til/blob/main/programming/npm-using-latest-version-of-package.md) - 2025-05-04 * [npm disable audit in .npmrc](https://github.com/krisyotam/til/blob/main/programming/npm-disable-audit-in-npmrc.md) - 2025-05-03 * [Accessing stdin with file descriptor 0](https://github.com/krisyotam/til/blob/main/programming/accessing-stdin-with-file-descriptor-0.md) - 2025-05-02 * [Next.js statically typed links](https://github.com/krisyotam/til/blob/main/programming/nextjs-statically-typed-links.md) - 2025-04-30 * [Netlify Node.js Version](https://github.com/krisyotam/til/blob/main/programming/netlify-nodejs-version.md) - 2025-04-29 * [Module Federation](https://github.com/krisyotam/til/blob/main/programming/module-federation.md) - 2025-04-28 * [Logging variables in Chrome DevTools using logpoints](https://github.com/krisyotam/til/blob/main/programming/logging-variables-in-chrome-devtools-using-logpoints.md) - 2025-04-26 * [JSON.stringify replacer parameter](https://github.com/krisyotam/til/blob/main/programming/jsonstringify-replacer-parameter.md) - 2025-04-25 * [JSON.parse reviver parameter](https://github.com/krisyotam/til/blob/main/programming/jsonparse-reviver-parameter.md) - 2025-04-24 * [JavaScript WeapMap](https://github.com/krisyotam/til/blob/main/programming/javascript-weapmap.md) - 2025-04-23 * [JavaScript: Tagged Template Literals](https://github.com/krisyotam/til/blob/main/programming/javascript-tagged-template-literals.md) - 2025-04-22 * [JavaScript Symbol.iterator](https://github.com/krisyotam/til/blob/main/programming/javascript-symboliterator.md) - 2025-04-21 * [Spread operator clones enumerables properties](https://github.com/krisyotam/til/blob/main/programming/spread-operator-clones-enumerables-properties.md) - 2025-04-20 * [Signals](https://github.com/krisyotam/til/blob/main/programming/signals.md) - 2025-04-19 * [JavaScript: scrollend event](https://github.com/krisyotam/til/blob/main/programming/javascript-scrollend-event.md) - 2025-04-18 * [Using Promise.race() to implement request timeout](https://github.com/krisyotam/til/blob/main/programming/using-promiserace-to-implement-request-timeout.md) - 2025-04-17 * [JavaScript: Negative Zero (-0)](https://github.com/krisyotam/til/blob/main/programming/javascript-negative-zero-0.md) - 2025-04-16 * [Math.random() vs Crypto.getRandomValue()](https://github.com/krisyotam/til/blob/main/programming/mathrandom-vs-cryptogetrandomvalue.md) - 2025-04-15 * [JavaScript Map](https://github.com/krisyotam/til/blob/main/programming/javascript-map.md) - 2025-04-14 * [JavaScript Import Map](https://github.com/krisyotam/til/blob/main/programming/javascript-import-map.md) - 2025-04-13 * [Fetch Response.statusText](https://github.com/krisyotam/til/blob/main/programming/fetch-responsestatustext.md) - 2025-04-12 * [Copy a function in JavaScript](https://github.com/krisyotam/til/blob/main/programming/copy-a-function-in-javascript.md) - 2025-04-11 * [JavaScript Barrel File](https://github.com/krisyotam/til/blob/main/programming/javascript-barrel-file.md) - 2025-04-09 * [Add an object to existing JSON using jq](https://github.com/krisyotam/til/blob/main/programming/add-an-object-to-existing-json-using-jq.md) - 2025-04-08 * [import.meta](https://github.com/krisyotam/til/blob/main/programming/importmeta.md) - 2025-04-06 * [The Mark Text element](https://github.com/krisyotam/til/blob/main/programming/the-mark-text-element.md) - 2025-04-05 * [Hex color notation have an alpha channel](https://github.com/krisyotam/til/blob/main/programming/hex-color-notation-have-an-alpha-channel.md) - 2025-04-04 * [ ESLint's `no-restricted-syntax` rule](https://github.com/krisyotam/til/blob/main/programming/eslints-no-restricted-syntax-rule.md) - 2025-03-21 * [Dart Supports Underscore Digit Separators](https://github.com/krisyotam/til/blob/main/programming/dart-supports-underscore-digit-separators.md) - 2025-03-11 * [Cypress cy.clock()](https://github.com/krisyotam/til/blob/main/programming/cypress-cyclock.md) - 2025-03-10 * [CSS pseudo-classes and pseudo-elements](https://github.com/krisyotam/til/blob/main/programming/css-pseudo-classes-and-pseudo-elements.md) - 2025-03-09 * [CSS :is() pseudo-class](https://github.com/krisyotam/til/blob/main/programming/css-is-pseudo-class.md) - 2025-03-08 * [CSS :has() pseudo-class](https://github.com/krisyotam/til/blob/main/programming/css-has-pseudo-class.md) - 2025-03-07 * [CSS property: font-variant-numeric](https://github.com/krisyotam/til/blob/main/programming/css-property-font-variant-numeric.md) - 2025-03-06 * [CSS ::first-letter pseudo-element](https://github.com/krisyotam/til/blob/main/programming/css-first-letter-pseudo-element.md) - 2025-03-05 * [CSS.escape()](https://github.com/krisyotam/til/blob/main/programming/cssescape.md) - 2025-03-04 * [Add custom config to Axios requests](https://github.com/krisyotam/til/blob/main/programming/add-custom-config-to-axios-requests.md) - 2025-03-01 * [Get current page URL in Astro](https://github.com/krisyotam/til/blob/main/programming/get-current-page-url-in-astro.md) - 2025-02-28 * [Astro's image integration](https://github.com/krisyotam/til/blob/main/programming/astros-image-integration.md) - 2025-02-27 * [Add color using FORCE_COLOR](https://github.com/krisyotam/til/blob/main/programming/add-color-using-forcecolor.md) - 2025-02-24 * [There are actually 50 CSS length units](https://github.com/krisyotam/til/blob/main/programming/there-are-actually-50-css-length-units.md) - 2025-02-23 * [There are 44 CSS length units](https://github.com/krisyotam/til/blob/main/programming/there-are-44-css-length-units.md) - 2025-02-22 * [There are 22](https://github.com/krisyotam/til/blob/main/programming/there-are-22.md) - 2025-02-21 ## technology * [X-Robots-Tag](https://github.com/krisyotam/til/blob/main/technology/x-robots-tag.md) - 2025-06-16 * [Delete lines in vi](https://github.com/krisyotam/til/blob/main/technology/delete-lines-in-vi.md) - 2025-06-14 * [Using Netlify Redirects to build a URL Shortener](https://github.com/krisyotam/til/blob/main/technology/using-netlify-redirects-to-build-a-url-shortener.md) - 2025-06-13 * [Using GitHub Actions to push changes](https://github.com/krisyotam/til/blob/main/technology/using-github-actions-to-push-changes.md) - 2025-06-12 * [The Idiomatic Text element](https://github.com/krisyotam/til/blob/main/technology/the-idiomatic-text-element.md) - 2025-05-24 * [Using the `tar` command](https://github.com/krisyotam/til/blob/main/technology/using-the-tar-command.md) - 2025-05-22 * [Rename an AWS Lightsail instance](https://github.com/krisyotam/til/blob/main/technology/rename-an-aws-lightsail-instance.md) - 2025-05-14 * [Proxying using Netlify Redirects](https://github.com/krisyotam/til/blob/main/technology/proxying-using-netlify-redirects.md) - 2025-05-12 * [Nginx Nested Locations](https://github.com/krisyotam/til/blob/main/technology/nginx-nested-locations.md) - 2025-05-01 * [Recursively delete .DS_Store](https://github.com/krisyotam/til/blob/main/technology/recursively-delete-dsstore.md) - 2025-04-27 * [Send analytics data using the Beacon API](https://github.com/krisyotam/til/blob/main/technology/send-analytics-data-using-the-beacon-api.md) - 2025-04-10 * [Smart App Banners](https://github.com/krisyotam/til/blob/main/technology/smart-app-banners.md) - 2025-04-07 * [GitHub Issue Forms](https://github.com/krisyotam/til/blob/main/technology/github-issue-forms.md) - 2025-04-03 * [Create a release in GitHub using API](https://github.com/krisyotam/til/blob/main/technology/create-a-release-in-github-using-api.md) - 2025-04-02 * [Show contents of Git stash](https://github.com/krisyotam/til/blob/main/technology/show-contents-of-git-stash.md) - 2025-04-01 * [Restore a deleted file in Git](https://github.com/krisyotam/til/blob/main/technology/restore-a-deleted-file-in-git.md) - 2025-03-31 * [Replace a Git Repository with a New One](https://github.com/krisyotam/til/blob/main/technology/replace-a-git-repository-with-a-new-one.md) - 2025-03-30 * [Git Remove All Commits](https://github.com/krisyotam/til/blob/main/technology/git-remove-all-commits.md) - 2025-03-29 * [Git: push --force-with-lease](https://github.com/krisyotam/til/blob/main/technology/git-push-force-with-lease.md) - 2025-03-28 * [Git: Work with multiple accounts](https://github.com/krisyotam/til/blob/main/technology/git-work-with-multiple-accounts.md) - 2025-03-27 * [Use same git commit message as previous commit](https://github.com/krisyotam/til/blob/main/technology/use-same-git-commit-message-as-previous-commit.md) - 2025-03-26 * [Checkout previous branch in Git](https://github.com/krisyotam/til/blob/main/technology/checkout-previous-branch-in-git.md) - 2025-03-25 * [Add to previous Git commit](https://github.com/krisyotam/til/blob/main/technology/add-to-previous-git-commit.md) - 2025-03-24 * [Get last modified date using GitHub GraphQL API](https://github.com/krisyotam/til/blob/main/technology/get-last-modified-date-using-github-graphql-api.md) - 2025-03-23 * [Redirect stderr to stdout using 2>&1](https://github.com/krisyotam/til/blob/main/technology/redirect-stderr-to-stdout-using-21.md) - 2025-03-22 * [Enable HTTP/2 in Vite's Dev Server by using HTTPS](https://github.com/krisyotam/til/blob/main/technology/enable-http2-in-vites-dev-server-by-using-https.md) - 2025-03-20 * [EditorConfig Glob Expressions](https://github.com/krisyotam/til/blob/main/technology/editorconfig-glob-expressions.md) - 2025-03-19 * [How to Stop All Docker Containers](https://github.com/krisyotam/til/blob/main/technology/how-to-stop-all-docker-containers.md) - 2025-03-18 * [Push Docker image to self-hosted registry](https://github.com/krisyotam/til/blob/main/technology/push-docker-image-to-self-hosted-registry.md) - 2025-03-17 * [Docker: Copy files from another image](https://github.com/krisyotam/til/blob/main/technology/docker-copy-files-from-another-image.md) - 2025-03-16 * [List the files with the most disk usage](https://github.com/krisyotam/til/blob/main/technology/list-the-files-with-the-most-disk-usage.md) - 2025-03-15 * [Override web content and HTTP response headers locally](https://github.com/krisyotam/til/blob/main/technology/override-web-content-and-http-response-headers-locally.md) - 2025-03-14 * [Emulate a focused page in DevTools](https://github.com/krisyotam/til/blob/main/technology/emulate-a-focused-page-in-devtools.md) - 2025-03-13 * [Delete files by modified date](https://github.com/krisyotam/til/blob/main/technology/delete-files-by-modified-date.md) - 2025-03-12 * [No browser cache with self-signed certificates](https://github.com/krisyotam/til/blob/main/technology/no-browser-cache-with-self-signed-certificates.md) - 2025-03-03 * [Buttons can have a value like input elements](https://github.com/krisyotam/til/blob/main/technology/buttons-can-have-a-value-like-input-elements.md) - 2025-03-02 * [GPTBot is OpenAI’s web crawler ](https://github.com/krisyotam/til/blob/main/technology/gptbot-is-openais-web-crawler.md) - 2025-02-26 * [Add features to your Netlify site with Snippet Injection](https://github.com/krisyotam/til/blob/main/technology/add-features-to-your-netlify-site-with-snippet-injection.md) - 2025-02-25