Convert an ASP.NET Core Web Application project to use MySQL with Entity Framework, enabling development on macOS, linux, or Windows targets using IDEs such as VS Code, Visual Studio, or JetBrains Rider.
Download the source code for this project at GitHub:
Make sure you have the .NET 5.0 SDK installed on your system.
If you’re using Visual Studio Code, you will need to generate ASP.NET Core developer certificates by issuing the following commands from a terminal:
dotnet dev-certs https --clean
dotnet dev-certs https
For command line
database ef commands, you will need to install Entity Framework Core tools .NET CLI:
Storybook has been invaluable for developing UI components in my existing projects. It’s always been a drop-in package that I add when using frameworks, such as React.
“Storybook is a tool for UI development. It makes development faster and easier by isolating components. This allows you to work on one component at a time. …
Comprehensive guide to creating, testing, documenting, and publishing TypeScript packages to the NPM registry.
There’s also a lot of boilerplate projects out there, which we could use degit or GitHub CLI to
gh repo create <name> --template="<repo-path>" but instead we’re going to bootstrap our initial scaffolding from scratch.
See the final created project at GitHub:
Before endeavoring creation of your package, it’s a good idea to think about its…
Computers cannot replicate a human experience until they can appreciate music.
Recently I was listening to a program discussing artificial intelligence, sentience, and recognition of consciousness. It was suggested that to replicate a human experience required aspects of augmenting mental state, such as consumption of alcohol of drugs.
Through the ages humans of every culture have expanded mental states through meditation, ritual, spiritual quests, or consumption of drugs — these inducing visions, hallucinations, or changing perception or reality. Reports of this activity extend into the animal kingdom.
Thinking along these lines leads to questioning other aspects — what would artificial…
Copy clipboard data between between React apps in multiple windows.
Multiple windows in Electron don’t share the same data model, and must use inter process communication to share data.
Even though all windows come from the same application, each window is an instance of
BrowserWindow containing a unique Chromium web view. Sending messages between windows is similar to tabs or windows in a web browser.
In a web browser, you can communicate using BroadcastChannels.
After defining a channel, posted messages dispatch events for listeners:
const channel = new BroadcastChannel("mychannel");// Send a message:
channel.postMessage("Hello, world");// Receive a message:
How to remove a decimal, with consideration to performance.
In the following examples, I’ll use
Math.PI for the number:
This removes everything after the decimal, as bitwise operators convert operands to signed 32-bit integers. This works for numbers or strings, returning a number.
Again here, bitwise operators convert operands to signed 32-bit integers.
Math.PI | 0
And again, any numeric operand is converted to an integer.
Math.PI >> 0
Parse the value as an integer — note that if the value is not a string, it’s first converted to one using the
toString() abstract operation.
In benchmarking the goal is to understand which operation is significantly outside the set — the outlier that is much faster, or much slower.
Though still in early stages, I’m launching a new initiative: a curated set of performance benchmarks, with tooling for profiling.
For starters, I’m introducing a new npm module: jsbenchmark
To install, execute:
npm i jsbenchmark
Then, import into a project as:
import * as JSBench from "jsbenchmark";
This package can benchmark individual tests, or a suite of test cases for comparison.
To benchmark multiple test cases for comparison, add them to a test…
Introducing a new npm module: pixi-graphpaper
Ruled graph paper — a PIXI.Sprite instance able to be added to the display list via
Curated commands for the advanced user of git.
--dry-run flag for a summary of actions for a git command.
Before executing the following examples, it’s a good idea to first take a dry run to understand what the result will be.
Create a backup of your repository as a git-bundle:
git clone email@example.com:org/repo.git --mirror
git bundle create repo.bundle --all
List branches that have been merged into master:
git branch --merged master
List branches merged into HEAD:
git branch --merged
List branches that have not been merged:
git branch --no-merged
This applies only to local branches; or, use:
As if managing cross-browser and cross-platform compatibility wasn’t enough, each environment has its own performance implications and unknowns.
Avant-garde experimental artist — creative professional leveraging technology for immersive experiences