Backend tools update
As part of a backend tools update I’ve ended up changing DNS providers.
Germany
So I moved to Germany. Oh boy.Search Eloquent Macro
Based on an interesting macro that @FreekMurze published on Twitter and later on his blog, I extended it first by multiplying the number of LIKE’s by the number of whole words in the search string and later on going back to the original logic, only substituting spaces in the search string for “%” instead.
That new version permits to search for “AAH BEE” and find “AAH ANYTHING BEE” but respecting order (it will not find “BEE AAH”), which appears to me to be a nicer implementation.
As someone on twitter already said, beware, this is a index-killer SQL condition: Its full of LIKE “%something%something%”, which is un-indexable.
But if you want to provide a handy search function to your end users, this macro is really handy and users love the functionality. It’s not a full text search, but will do the trick without any complex infra.
Continue readingLatest Amazon Linux AMI
Again, found on the internet (but with some old code that was not getting the latest images), so again as the case of the latest CentOs ami post, as public memory
Assuming:
- You want an HVM, EBS backed, x86_64 image of the latest version of Amazon Linux
- You have configured the desired region and credentials for the AWS SDK
- Owned by Amazon, of course.
Wordpress is no more, long live Hugo
After some (great deal of) abandonment, I’ve created some new random stuff in my blog, only to actually see the sad state it was. I’ve contemplated the idea of still maintaining it, update wordpress and all that jazz. The last drop of water was some uploaded php in it. So no more. Wordpress is no more, live long and prosper Hugo. Out is the old php runtime, in is the pre-generated static content. Continue readingchmod recursive doing the right thing
chmod -R u=rwX,go=rX <TARGET> The trick being X instead of x and = instead of +. Go read the chmod man page.Latest Centos 7 AMI
That’s around the internet but I keep searching for it every time, so here it is as a public memory:
Assuming:
- You want an HVM, EBS backed, x86_64 image of the latest version of CentOS 7
- You have configured the desired region and credentials for the AWS SDK
- The Owner ID for the official CentOS organisation remains 679593333241