Exclude a folder from your git diff
Unfortunately I have my /dist/
folder in my repository (Long story), but it makes looking at differences in git a tad of a nuisance.
Git actually has an exclude pattern which removes this noise and makes doing diffs a lot cleaner. I just updated my git alias in my ~/.gitconfig
[alias]
df = diff --color-words -- ":(exclude)dist"
What does this mean?
Well in my terminal I can do:
$ git df
Which will show all my changes (with coloured words rather than line changes but thats a different story) while excluding the /dist/
folder ๐
Magic.
Chrome bugging you about insecure connections on localhost?
Sick of clicking Trust this site on your own Localhost. Like seriously chrome ๐คฆ๐ผโโ๏ธ
Get Cloudflare geolocation data client side
Cloudflare provide a very handy HTTP Header called `CF-IPCountry` which you can use to detect your users geolocation but there is another way.
Sync your uploads
I’ve had to do this a few times recently and I had to keep looping through my bash history to find it. If you need to pull down your prod / staging uploads directory from a server you have ssh access to:
What yโall thought