Here's my quick local #WordPress CLI in action. Perfect for temporary sites for testing stuff (like the latest release candidate!):
2024-07-14 09:19:18
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)
2024-07-14 08:37:54
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”
2024-07-14 08:26:33
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!!
2024-07-12 22:46:45
Just me checking all the clues in the XKCD crossword to see if any of them don’t fit with the theme.
😂
2024-07-12 09:00:02
I’m having FOMO for both WordCamp Canada and WordCamp Whitley Bay in the UK.
Need to get meeting my WordPress friends again soon!!!
2024-07-10 22:29:08
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?
2024-07-10 19:48:50
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?
2024-07-09 23:24:31
🖥️ 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:
2024-07-09 22:33:47
✍️ 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.
2024-07-08 23:00:18
🎉 More new things… here's some more on my new job that I started today!
2024-07-08 20:33:23
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?!
🤯🙌
2024-07-07 23:48:27
🏗️ 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/
2024-07-07 22:08:53
🫠 Lots of new things! (Why I’ve not been writing much)
2024-07-07 12:44:30
“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.
😂
2024-07-07 12:40:51
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
2024-07-07 07:50:22
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.
2024-07-07 07:49:05
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? 😃
2024-07-06 10:17:04
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.
2024-07-06 10:06:55
I’ve been poking around with recording short audio.
I wanted an on-device transcription solution. MacOS and iOS have this built in. I can even access it with a Shortcut!
But how… HOW do I (or WHY CAN’T I) pass a selected input to this action?