Anyone want to play Scrabble?
Start here and send me a link:
Here's my quick local #WordPress CLI in action. Perfect for temporary sites for testing stuff (like the latest release candidate!):
I should also note that yes, while diagnosing this, my script did create a subdirectory of my current working directory called “~”.
And yes, I DID then try to delete that with the command:
“rm -rf ~”
🤦♂️
(Backups are your friend)
Weirdly I could not find a way to replicate shell-expansion of file paths (like “~/test1”) in PHP or Laravel.
Is this because it wouldn’t work cross-platform?
Ended up doing this, but it doesn’t seem ideal.
exec(“echo $filepath”, $output);
$fullpath = $output[0];
Context: I’m passing a CLI option like “path=~/test1”
I’m aiming to get an update to Turbo Admin out soon.
Before I do that I wanted a quick way to spin up temporary local #WordPress sites.
So I got some fixes done for my CLI tool that does exactly that!
Sadly, the name I wanted to use for this is now being used by another project. 😢
I’m also not really allowed to promote such a tool. But know that it exists!!
Just me checking all the clues in the XKCD crossword to see if any of them don’t fit with the theme.
😂
I’m having FOMO for both WordCamp Canada and WordCamp Whitley Bay in the UK.
Need to get meeting my WordPress friends again soon!!!
Sportsball/England Kickmen observations
It’s probably just some weird bias/perception thing, but in all these England football games, they’ve seemed fine when in possession, but I feel like every time there was a counter attack they just got sliced apart. Every counter has felt like a moment of peril.
Is that just me?
So what did I learn in new job land today? More “How to use a mouse” tricks? Or “How not to create symlinks?”
No. I learned that, in the website programming language I’ve used for, like, 14 years, request or POST variables are only populated for requests with certain Content-Type’s.
If you POST an API request with JSON content to plain PHP, you won’t get ANYTHING in the $_POST superglobal.
How have I not found this before? Have I just been spoilt by frameworks?
🖥️ Finished my day by picking back up my series of Readable Code Tips.
Today: Use “is” or “has” for Boolean variables/functions
https://rosswintle.uk/2024/07/readable-code-tips-use-is-or-has-for-boolean-variables-functions/
Find out why I’m sharing these tips at the introduction page:
✍️ I’m on a blogging roll!
I want to talk (again) about friction. Things that slow us down. How some friction is good, and some is bad. And how this relates to decision you make while coding.
🎉 More new things… here's some more on my new job that I started today!
Best thing I learned in my first day of new job:
Shift-scrollwheel does horizontal scrolling.
On the one hand: How did I not know that?!
On the other hand: How was I supposed to know that?!
🤯🙌
🏗️ In case you’ve not heard enough about it already…
I have just moved out of my old "proper office" and into a new garden studio. Here's why and how!
https://rosswintle.uk/2024/07/the-great-office-move-of-2024/
🫠 Lots of new things! (Why I’ve not been writing much)
“You could introduce a state-sponsored croissant to price into the market and then let competition encourage other vendors to sell at £1.10”
All sounds totally legit.
😂
This investigation into satirical politician “Count Binface”’s policy of price-capping croissants is hilarious (especially as it’s so dead pan in delivery) but also quite educational from an economics standpoint.
“You could have a black market for croissants that are sold above the price ceiling” spoken in complete seriousness is perfection.
https://pca.st/episode/95bb7ecd-6a30-4255-925a-ca478dd3aa77?t=1246.0
I also was writing about myself the other week and coined the phrase “intellectually nerdy but not culturally nerdy”.
I think that fits me well. It might have to go in my bio at some point.
I used to call myself a “recreational coder”. I enjoy coding. I had many side projects.
But the last few months I have been focussed on other, more physical projects!
With the physical work mostly complete, and my new job starting on Monday and requiring a real shift back to back-end development, I’m pining to get back into my recreational code.
What’s first? 😃
This is the closest I’ve got.
– Encode a media input as audio only
– Save with a known filename
– Transcribe the saved file
But it doesn’t seem to transcribe the whole thing.