The recent Firefox Developer Edition update (91.0b6) seems to have broken CSS rendering or something.Continue reading post "#3459"
Last month, I finally bought a new laptop with plans to replace my aging 2009 Macbook as my primary computer. It is a Lenovo Yoga 7i, purchased from MicroCenter. It is a switch from Mac, which has been my primary OS for pretty much since I’ve been using computers, but it has touch screen and I hope to switch to the open world of Linux.Continue reading post "Purchase: New laptop, Lenovo Yoga 7i"
I recently needed to sort query results to match the order of IDs passed to it for use in a
WHERE … IN() clause. In MySQL, this can be done using the
FIELD() function in the
ORDERY BY clause. For Doctrine, which doesn’t have the
FIELD() function and doesn’t allow functions in the
ORDER BY clause, there’s a little more work needed to make use of it.
I signed up for the Ohio Vax-A-Million vaccine lottery at ohiovaxamillion.com, even though the site and domain registration seemed a little suspicious.Continue reading post "#3417"
I watched the Stir Trek conference today, live streaming. It was done virtually this year due to the Covid situation.Continue reading post "Stir Trek 2021"
I found myself needing to get the path to the current script and its directory in a local Node JS script recently. In Common JS scripts, that is available by
__dirname globals, but it isn’t available by the same means in ES modules. Instead, there is
import.meta.url, which can be used to get at the directory name if needed, like:
const __filename = import.meta.url.replace(/^file:[\/]+/, '/'); const __dirname = __filename.split('/').slice(0, -1).join('/');
I’ve been playing with JS lately, including ES modules and building with Rollup, Babel, and Terser, along with other accessories. One thing I’m disappointed with of ES modules in the Nodejs ecosystem is dealing with third party imports. Using the “bare” specifiers that Node expects works fine in that environment and thus tools running in it (possibly needing helpers), but they don’t work at all directly in the browser. This is discussed in this post by Jake Archibold, for instance.
Import maps are one solution in the works, but that requires explicitly mapping every dependency, which could get complicated fast when dependencies have dependencies. It also is only in draft stage and only works in Blink based browsers currently.
I eventually gave in to the idea of having server code rewrite the paths in the js file responses to point to a symlinked
node_modules folder, similar to what is mentioned in this post by the Polymer project. I created a PHP test server for one of my projects that does this.
xmlrpc.php file of my WordPress blog recently got hit by a single bot some 5000 times over a half hour period recently. I temporarily disabled all visitors and then limited it to just blocking the specific IP via Apache conf (htaccess).
Dreamhost has added a nicer DNS management interface, along with some other updates to its panel.Continue reading post "#3322"