sudo systemctl restart nginx
How to list installed packages on Ubuntu
apt list --installed
How to download YouTube video to MP3 file using YT-DLP
brew install yt-dlp
yt-dlp --extract-audio --audio-format mp3 YouTubeVideoURL
How to switch Git branches
git checkout BranchName
How to delete a local branch in Git
git branch --delete BranchName
git branch --delete --force BranchName
How to list all Git branches
git branch --all
How to create a new Git branch
git branch BranchName
How to use Prettier to format source code and sorting Tailwind CSS classes
npm install --save-dev prettier prettier-plugin-tailwindcss
package.json
"scripts": {
...
"format": "prettier --write ."
},
"prettier": {
"plugins": [
"prettier-plugin-tailwindcss"
]
}
npm run format
How to read a program documentation
Don't read in order, just start with the topic that interests you.
How to rename files by replacing text in Shell
for i in $(ls); do mv -v "$i" "$(echo "$i" | sed 's/OldFilename/NewFilename/g')"; done