til
til copied to clipboard
A collection of useful things I've learned.
Today I Learned
A collection of useful things I've learned. Inspired by simonw/til.
See the full website at til.jakelazaroff.com.
Subscribe via RSS!
68 TILs so far:
1password
- Use specific SSH keys
astro
- Generate a static SVG sprite sheet
bash
- Control terminal appearance with
tput - Run commands when a shell script exits
blender
- Export a Blender file to GLB from the command line
c
- Prevent ClangFormat from breaking before curly braces
caddy
- Run a local static file server over HTTPS
- Serve Markdown files as HTML
css
- Anchor scroll position to the bottom
- Dynamically change styles from HTML or JSX
- Make a CSS variable color translucent
- Set default styles for tags
- Swap between black and white text based on background color
- Use CSS variables in a
<dialog>backdrop - Use
grid-templateto set grid columns, rows and areas
django
- Conditionally extend a template
docker
- Add root certificates to a Debian container
- Fix "At least one invalid signature was encountered"
entr
- Reload a webpage when a file changes
- Rerun a command when files change
esbuild
- Run a development server with live reload
fzf
- Make a TUI for switching and deleting git branches
git
- Ignore all
.DS_Storefiles - List all files tracked by git
- Run a command if there are unstaged changes
- Update all submodules to latest commit on origin
github
- Run GitHub Actions locally
- Trigger a workflow run in another repo
- Write an inline script in a GitHub Actions workflow
gltf
- Extract data from a mesh primitive
html
- Define a custom element
htmx
- Attach attributes to dynamically added elements
- Load modal content when a Shoelace dialog opens
javascript
- Access CSS variables from JavaScript
- Load a user-created JavaScript file in the browser
- Programmatically create SVG elements
logic
- Send stereo output through specific output channels
make
- Build all files with a given extension
- List all commands in a Makefile
math
- Check whether an angle is between two other angles
- Convert between 3D coordinate systems
- Find a point on a sphere
- Rotate a point around a circle
nextjs
- Don't server-side render a client component
nodejs
- Execute TypeScript files in Node.js
- Get
__dirnamein ESM
pnpm
- Patch a
node_modulesdependency
poetry
- Create
.venvfolders within projects
prosemirror
- Prevent extra whitespace in NodeViews
- Use a Svelte component as a NodeView
redbean
- Bundle files into a redbean zip archive
rsbuild
- Migrate from Create React App
rust
- Link against a C++ file
svelte
- Bail out of a reactive block
- Force reactive state to reevaluate
svg
- Create an SVG sprite sheet
systemd
- Set up a basic service
tailwind
- Style conditionally based on data and ARIA attributes
- Style shadow trees from the light DOM
threejs
- Display an object's bounding box
- Pick objects with the mouse cursor
- Set default camera in React Three Fiber
typescript
- Add custom element to
JSX.IntrinsicElements - Assert that a variable is not
nullorundefined - tsconfig flags to prevent common errors
- Type concrete subclasses of an abstract class
- Types and variables can share names
volta
- Install Volta with Homebrew