Hot tips are spicy lil' nuggets related to web development and tooling that I share on my twitter account. I've logged them here to make them easier to find.
Page 16 of 45
Three CSS tips for working with inconsistently sized logos
File this under CSS you probably shouldn't write, but can:
p[style="text-align: center"] { text-align: left !important; }
These AI based text-to-CLI commands are starting to pop up in lots of tools. Warp, Fig, Github Co-pilot + more
What do you think? Helpful? Or dumb idea to run commands from smart sand?
🔥 Forgot to add a file to your .gitignore?
.gitignore
Heres how to remove that file from your git repo after the fact
Yesterday I renamed a file from File.jpg → file.jpg, but it didn't trigger any changes in my git repo, which means I wasn't able to deploy it.
Had to use git mv to rename the file in my git repo as well.
git mv
Your language isn’t broken, it’s just doing floating point math!
🔥 CLI Bracket Expansion! Super handy when you need to create, install or rename multiple files in a single go.
touch store-{products,cart,coupons,utils}.js
🔥 take big, but nicely formatted, dumps in your console with console.table()
console.table()
🔥 use Promise.allSettled() to wait until all promises have either been fulfilled or rejected.
Promise.allSettled()
Handy for when a promise rejects, but you still want the data of the successful ones.
🔥 Pretty excited about the new JavaScript non-mutating array methods. Currently in stage 3.
.toReversed()
.toSorted()
.toSpliced() - remove items
.toSpliced()
.with() - replace items
.with()