πŸ”₯ There are 449 Hot Tips!!

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.

πŸ”₯ Here is how I use Cloudflare workers to intercept and modify SASS requests to add my own custom endpoints, links and CSS

1318234
1K112219K
3398.6K

πŸ”₯ CSS object-fit: cover; is super handy for aligning images.

Works really well with CSS Grid image galleries too!

9131118311
781
4869.9K
4.2K1674767K

πŸ”₯ Use JavaScript’s new array.at():

.at(0) β†’ first item

.at(-1) β†’ last item

It also floors the index, which is handy for random items!

dogs.at(Math.random() * dogs.length)
47310K
85413117160
959374120K

Three CSS tips for working with inconsistently sized logos

120K5.2K5591.5M
19K2.8K2676.6K
1.8K24K

File this under CSS you probably shouldn't write, but can:

p[style="text-align: center"] {
  text-align: left !important;
}
636503795
3148K
981262918K

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?

133101425
43512K
498241814K

πŸ”₯ Forgot to add a file to your .gitignore?

Heres how to remove that file from your git repo after the fact

3955512133
1K262228K
3529.2K

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.

3027.1K
4327198.8K
478533186

Your language isn’t broken, it’s just doing floating point math!

3.9K131K
5.3K10813689K

πŸ”₯ 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
14420714
2847.6K
2632106.2K