2026-01-17: Ubuntu hyper-v guest imported to new laptop kept losing time. Probably was an update to the way laptops sleep. Needed to explicitly prefer the hyper-v clock which was missing from /etc/chrony/chrony.conf:
# prefer the hyper-v clock
refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0 prefer
2025-12-11: The maven shade plugin by default strips netty property files that cause messages about mismatched/missing jars with the azure bom (“The following Netty versions were found on the classpath and have a mismatch with the versions used by azure-core-http-netty”). Adding this transformer for shade in pom.xml fixes:
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> <resource>META-INF/io.netty.versions.properties</resource> </transformer>
2024-10-30: React in “strict” dev mode will mount components twice to ensure you’re cleaning things up properly. For OAuth (e.g., FHIR) auth return that can cause a problem if your effect attempts to hit the token endpoint twice with the same code. Protect against this with a window var that tracks the last code that was submitted.
2024-10-24: To create a new vite project with auto-generated SSL cert:
# initialize project
npm create vite@latest (follow prompts)
cd PROJECTNAME
npm install
# add auto-generated SSL even though they discourage it
npm install --save-dev "@vitejs/plugin-basic-ssl"
# add to vite.config.js:
# import basicSsl from '@vitejs/plugin-basic-ssl'
# basicSSl() # in plugins array
# run
npm run dev -- --host 0.0.0.0
# build
npm run build
2024-10-24: To install the latest version of node; make sure to remove current versions first if needed:
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
2024-10-21: To delete a git branch both local and remote:
git push -d origin <branchname> # Delete remote
git branch -D <branchname> # Delete local
2024-09-03: When running on a Windows host, make a VirtualBox VM auto-start at boot time with Task Scheduler; see here.
2024-09-03: LetsEncrypt / Certbot creates certs that can only be read by root. If you want to access them as a non-root user, add a “post hook” to /etc/letsencrypt/cli.ini that sets the group on the files as needed (hat tip):
post-hook = chmod 0640 /etc/letsencrypt/archive/*/privkey*.pem && chmod g+rx /etc/letsencrypt/live /etc/letsencrypt/archive && chown -R root:GROUPNAME/etc/letsencrypt/live /etc/letsencrypt/archive
2024-08-10: If you want to use delegated (“on behalf of”) tokens in with Azure AD authentication in app service or container apps, you have to start with a token that has an “aud” corresponding to your client id: (1) Make sure that your “API Permissions” include YOURCLIENT/user-impersonation; (2) Using Resource Explorer, under your app’s authConfigs/current (container app) or authSettingsV2 (web app), make sure the “login” object has a “loginParameters” array like this: [“scope=openid profile email 8128055e-2d0d-49c3-9ead-6150d71eea7e/user_impersonation”] (where 812… is the client id). You can then use the token as a base to aquire tokens to other resources.
2024-07-23: By default Easy Auth for Azure Container Apps only provides X-MS-CLIENT-PRINCIPAL and similar headers. If you need access OIDC tokens (e.g., X-MS-TOKEN-AAD-ID-TOKEN and X-MS-TOKEN-AAD-ACCESS-TOKEN for calling APIs on the user’s behalf (i.e., via X-MS- you need to add a token store to the app. At this time you can only do this with the CLI, see: https://learn.microsoft.com/en-us/azure/container-apps/token-store
