The following Git aliases are very helpful for my usual workflow.
[alias]
cb = switch -c
sw = switch
wip = commit -m wip
rr = pull --rebase origin
The tradition of writing Q.E.D. ("quod erat demonstrandum") at the end of a mathematical proof is the culmination of a long intellectual lineage that began with Pythagoras, evolved through Plato, Aristotle, Euclid, and Archimedes, and ultimately shaped the foundations of logical demonstration in mathematics. Each thinker built upon the ideas of their predecessors, refining the principles of proof, logic, and rigor that remain central to mathematics today.
Pythagoras and his followers were among the first to view mathematics as a philosophical pursuit, believing that numbers and geometric relationships governed the universe. They sought logical justification for mathematical truths, leading to the earliest systematic proofs in history. The Pythagorean Theorem exemplifies their approach, demonstrating how mathematical relationships could be established through reasoning rather than empirical observation. However
Automated tests with actors can result in using await
across many lines which is a lot of lock/unlock cycles which can have some unwanted side effects. In the very least it can just make your unit tests run more slowly. I wanted to see how I could set up my tests to evaluation expectations within the isolated actor scope. I found I could use an isolated parameter with a block to do it. See the code snippet for the function below.
private func run(_ actorInstance: <#actor type#>,
block: @Sendable (isolated <#actor type#>) async -> Void) async {
await block(actorInstance)
}
Open Source, self-hosted alternatives to Buffer that allow you to manage and schedule posts for multiple social media platforms. Here are some of the most popular options:
Ensure you have the following tools and accounts ready:
To ensure security, you should disallow the use of common and easily guessable 4-digit PINs. Here’s a list of such PINs to block:
With this solution, there is no CGI programming. One innefficency of CGI programming is that every request spawns another process which can be costly when there are many requests. Instead the work with this solution is done up front by generating the output from the JSON files to static files. Incoming requests are handled by rewrite rules supported by the web server which are handled in process and very quickly.
Changes can be made to the JSON files and re-run the generation script which will create output to a temporary directory and then rsync the changes to the directory used by the rewrite rules. This way removed profiles will also be removed from the web server.
(from ChatGPT)
On Bluesky and other ATProto-based platforms, users can associate their accounts with their own domain names instead of relying on service-owned subdomains. To do this, you need to prove that you control the domain by publishing a special file at a specific, “well-known” location or by adding a DNS record. Once verified, your account’s handle can become something like @username.example.com
instead of @username.bsky.social
.
For organizations that want to create multiple user accounts, using a separate hostname for each user makes management easier. By setting up a wildcard DNS record (e.g., *.example.com
), you can quickly create new hostnames for any user without having to run separate websites or add individual DNS entries. Each of these hostnames can return a unique DID (Decentralized Identifier) to ATProto services through a simple, automated process.
In the following example, DID values are stored as simple JSON files. A small CGI scri
From ChatGPT:
Below is a step-by-step guide and example setup showing how you might structure an ESP32-based Matter + Thread project using the Arduino framework within VS Code and PlatformIO. This is a conceptual walkthrough intended for beginners who are totally new to Matter and Thread. Please note that Matter and Thread support for Arduino on ESP32 is still quite limited and experimental. The code and steps below are for illustrative purposes, showing how you would approach organizing such a project. Actual implementation may require additional tooling, libraries, and following the evolving Matter ecosystem.
This code supports running a sequence of tasks with serial behavior or concurrently with max concurrent tasks. The tasks which are queued can even be constrained to a global actor like @MainActor
or a custom global actor.
This API mimics NSOperationQueue which was available prior to Dispatch. It supports max concurrent tasks and other features. One feature is barrier tasks. Normally tasks are allowed to run concurrently. When a task is a barrier it will be run serially. All pending tasks will be allowed to complete and then a the lone barrier task will be run. Then other tasks can run as before. This is a useful behavior to use when multiple tasks do work and a barrier task can run after them to gather the outputs before running another set of tasks to do more processing.