Scripts

Kill all proccesses at port 3000
kill -9 $(lsof -ti:3000)
Search for and display the contents of specified files in given directories, with formatted file headers.
find <DIR_1> <DIR_2> ... -type f -name "<FILE_NAME>" -print | xargs awk 'FNR==1{print "\n" "\033[1;34m===> " FILENAME " <===\033[0m\n"}1'

NPM / Yarn

Yarn 2 VSCode setup
yarn dlx @yarnpkg/sdks vscode

Vercel

Turborepo build command
cd <path-to-monorepo-root> && npx turbo run build --scope <package-name> --include-dependencies --no-deps
Turborepo install command
npx vercel-submodules --paths <path-to-package> && cd ~ && cd - ; yarn install
Project's Git Ignored Build Step command for monorepos
git diff --quiet HEAD^ HEAD <path-relative-to-package-root-directory>

Spotify

Spotify tokens
curl -H "Authorization: Basic <base64 encoded client_id:client_secret>" -d grant_type=authorization_code -d code=<code> -d redirect_uri=http%3A%2F%2Flocalhost:3000 https://accounts.spotify.com/api/token

Git

Displays detailed history for a specified file across all branches, including merges and renames
git log --all --full-history -- <path-to-file>
Not PlayingSpotify
© asobirov