I approve of this message from @aurooba
Revisit your own work. Make it better. It’s important!
I approve of this message from @aurooba
Revisit your own work. Make it better. It’s important!
Finally there – wanted to get it all tidied up, written and documented:
npm-free LiveReload(ish): Simple, depedency-free scripts for asset watching and auto-reload in the browser
https://rosswintle.uk/2024/03/npm-free-livereload-asset-watching-auto-reload-scripts/
This is how I'll build small, static sites locally now. Yay!
If you just want the code:
https://gist.github.com/rosswintle/d1f6428685be5eb1091dab2246015ff2
Righty. I think I have a nicely working watch script + auto-reloader that doesn't poll.
That was WAY harder than I expected – mostly because of how nginx doesn't put headers on some things.
Need to tidy up and document. But want to get this into my small site template!
Making things simple is complicated!
So having discovered Live.js and Turbowatch and then deciding to write my own simple file watcher using a shell script and Live.js as a reloader, I wondered… do you need to poll?
WebSockets was an option for sending server-side changes to the browser. But too complex for my needs.
Then I found this ancient Server-Side Events API that's been around since Chrome version 6! And it's PERFECT!
https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/
This is brilliantly nerdy and geek-funny. A chap who visited roads named after every day of the year. 5 min lightning talk.
Dang it – didn't quite get everything updated. But a @chriscoyier post referenced Turbowatch and Live.js as a simple file watcher/browser reloader combo.
I want something simpler than Turbowatch though, and more modern than Live.js.
Live.js also didn't work with Laravel Valet. 😢
BUT… I got it all working! It's 55 lines of shell script and 10k of modernised JS (uncompressed). I will build it into my small static site template and write up soon!!
😃
I’ve been thinking a lot about code style recently. Naming conventions. Simple refactors. Stuff like that.
I can’t think of who in #WordPress is doing this (outside of recommending PHPCS and WPCS).
Am I missing something/someone? Or is this a gap that needs filling?
This Dragons Den pitch (UK’s Shark Tank) had me giggling the other day. It’s a masterpiece of editing to bring out all the non-verbal communication and very funny.
I was also discussing sport with a Canadian this week and she told me that because “hockey” means “ice hockey” by default they need a term for hockey-on-grass.
And that term is “floor hockey”
Which for some reason makes me giggle.
Words that Americans seem to use a lot that I think carry cultural weight that I, as a Brit, don’t understand:
– “compelling” (as in “That’s a compelling tool”)
– “appreciate” (as in “I appreciate you.”)
I wonder what I say that carries cultural weight that my other-side-of-the-pond colleagues don’t understand.
Today will also require careful management of sugar/caffeine levels. Will be very easy to overdo it.
Yes, I’m middle-aged and these are the things I think about now when I’m socialising. 😂
I’m travelling to London today to… err… socialise with people in real life?!
Will I remember how?
Tips/advice?
Best worst advice wins.
This is a great post. I feel so much of senior dev woe!
Falsehoods Junior Developers believe about becoming Senior https://vadimkravcenko.com/shorts/falsehoods-junior-developers-believe-about-becoming-senior/
Does this make sense to anyone? Is it cheaper to buy/hire an umbrella when it’s raining?
My friend Tim is running a workshop. He’s really very smart, has a TON of experience, and he’s entertaining too:
“I'm running a workshop on how to clean a hacked #WordPress Site, it's on the 21st March and I hope I can tempt you to come! I'm excited, I think I have managed to get the balance between technical and accessible, so that it genuinely is useful to everyone.”
Hang on… ChatGPT’s voice is terrible at reading out long strings of digits? What?!
(Sound on…)
@gilest Hello fellow Wiltshire person! I seem to follow you already and I feel like we’ve interacted before. But hello again! Thanks for following.
Hang on… which newsletter am I reading here? This isn’t The Tavern?
(Inside-Baseball WordPressers know what I mean!)
Another week, another single-page web app gets spun up. These are the new domain names. 😂
This one is secret for now. But real fun to make.
Figuring out in-browser background removal with JS/CSS. Plus turning HTML into images to print.
Cool stuff!
I really need to bookmark my open tabs! 😬