-
CORS Headers to Permit a Fixed Set of Domains (NGINX)
Your Javascript is hosted on a different domain, say for CDN purposes, and your application is on another domain. You’re using ES modules which need to be loaded on import and you find yourself needing to set or insert the necessary headers for Cross-Origin requests. A lot of tutorials online show you how to allow…
-
Mysql Multi-Value Inserts with PHP and PDO
Mysql allows you to issue a single INSERT query with multiple records at once. This can be more efficient than single row inserts in a loop, especially when the database server is several milliseconds of round-trip-time away. It’s not so obvious how to accomplish a similar kind of query when using PDO in php while…
-
A reasonably good, open source Chess GUI
I’ve been looking for a chess UI to play with on my computer for a while, mainly for the fun and curiosity of watching chess engines compete against each other in tournaments. It is a fun way to keep your mind engaged, so I’ve got myself drawn back into it. I stumbled upon a pretty…
-
Generate a Series of Dates in SQL
If you have the requirement to generate a series of dates in a Database Table, this can be a bit confusing for someone like me who immediately thinks of this as problem to be solved with the use of a loop. It turns out that using a recursive Common Table Expression, you can easily accomplish…
-
How to make a multi-level menu in bootstrap 5.2
Regardless of what UX designers may say about nested menu (submenus or even sub-submenus), sometimes you need to make one. I couldn’t find clear simple guidance for this, so I cobbled one together by following various examples and watching a few youtube videos. Finally, it made sense what is needed — You need to set…
-
Azure Text Substitution with Special Characters
It’s a common scenario that you need to perform text substitution in a Microsoft Azure pipeline, for example, in order to place a secret from the key-vault into the environment so that a running application can use it to connect to the database. Since it’s a password, it can contain all sorts of characters. People…
-
nftables Router: Howto
nftables is the new hotness in Linux packet processing, which to me mostly means routing and firewalling in my home network. If you’re like me, this is enough to make you want to try this software out. If you have a bit of a life, then it’s not so easy to find the hours needed…
-
Mount Seagate Central HDD on Ubuntu Linux
If you’ve got a Seagate Central network hard drive that developed some issues and you have removed the disk and plugged it into a drive enclosure for some recovery on Linux. Provided the drive is readable, you can save yourself some time trying to read it by: install fuse2fs and lvm2 sudo apt install fuse2fs…