Tips

If you need to search for a package to be installed via apt-get, use apt-cache search <packageName>. To see all versions of that package available use apt-cache madison <packageName>. To install a particular version of a package use apt-get install <packageName>=<version> -V
linuxapt-get
If you're using lerna
(3.22.1+) to manage a monorepo that publishes to NPM and you want to automate your deployments, note that automation tokens from NPM (which don't require 2FA)
won't work unless you disable verify access.
lernanpm
If you're trying to clone a repo down over ssh from a fish shell, you'll need to have your ssh-agent started. In bash you'd run eval $(ssh-agent) in fish you have to run eval(ssh - agent - c).
fish-shellbash
In Typescript you can union an array of object-like types together by using a conditional, recursive type definition.

type UnionArrayOfTypes<T> = T extends [infer U, ...(infer K)[]] ? U & UnionArrayOfTypes<K> : T

This is often needed when building plugin systems
Typescript
If you're trying to use Chakra inside of storybooks with emotion you need to manually alias emotion to get the style props to work appropriately. See Chakra's storybook setup.
storybookschakra-uidebugging
If you're using typescript, ts-union-tools is an excellent library that gives really succinct pattern matching for discriminated unions
Typescript
await-to-js provides a leaner way to use async/await without needing a try/catch.
const [err, result] = await to(doAsyncThing)
node
The date-fns library has a compareDesc function which is helpful for sorting an array of dates from the earliest to the latest. dateArray.sort(compareDesc)
node
Use the Next.js snippets vscode plugin for a faster development experience
vscodeNext.js
Use Omit when you want to ignore a key of an object or interface, use Exclude when you want to ignore a key of a union
Typescript
++C on OSX, alt+D on windows makes the select next occurrence
(+D)
action in vscode case sensitive.
vscode