When working on projects, I often want to strictly control the version of WordPress that is running. However sometimes one of the other administrators on the site sees the “WordPress 5.9 is available! Please update now.” message and clicks it, thereby prematurely updating to a newer version of WordPress core. This notice can be disabled.
git reset –hard vs git checkout -f
I recently had a conversation about “git reset –hard” vs “git checkout -f”, and it turns out they do the same thing. This is one of the tricky things about Git, there are often multiple ways to do the same thing.
git alias tab completion for functions
When creating a Git alias that points to a function, sometimes Git provides the wrong tab completion by default (e.g. filename completion instead of branch name completion). This is how we can tell Git, which type of completion to use.
git reset vs revert
Conceptually, “git reset” is erasing your last change while “git revert” is adding a new change that undoes your previous change.
Check CORS Value from Command Line
I was checking a number of URL endpoints for CORS restrictions today and I wondered if I could check from the command line. Here are some example curl statement that get me the information I’m looking for. I think there is an opportunity for a custom function here but for now, these notes will do.
You’re Lucky to Have Special K
At breakfast, I told my son, “You’re lucky to have Special K cereal for breakfast.”
Display Keyboard Shortcut in WordPress Gutenberg
In Gutenberg (a.k.a. the WordPress Block Editor), keyboard shortcuts are displayed differently on Apple devices and other devices, e.g. ^H on an Apple device and Ctrl+H on other devices. This is accomplished with wp.keycodes.displayShortcut.
Using jq and nvm to set Node version
The nvm command allows you to switch between versions of node. Often a project will include a .nvmrc file to specify the version of node to use. Even if a project does not contain an .nvmrc file, you may be able to read the preferred node version from package.json and use that value with nvm.
ReactJS Component Limited Time Render HOC
I wanted to render a ReactJS component for a limited amount of time every time (think of a notification that pops up and then goes away). Ideally, we would like to be able to apply this limited time rendering to any component, so this was an excellent candidate for a Higher Order Component (HOC).
Percent of Doctors Vaccinated Against COVID-19
I was interested in the percent of U.S. Doctors who have been vaccinated against COVID-19 and the results I found online were surprising. While the American Medical Association (AMA) reports “96% physicians have been fully vaccinated for COVID-19”. The Association of American Physicians and Surgeons (AAPS), reported nearly 60 percent said they were not fully vaccinated against COVID. Why are these numbers so different? As a former AP Statistics teacher, I wanted to find out.