There are a number of different inline conditionals I use when working with PHP (i.e. ternary conditionals and the null coalescing operator). As a reminder of how some of these common inline conditionals work, I put together this table for reference.
Draft Posts
License for my Open Source Software
These are my reminder notes on how to quickly populate the LICENSE information for one of my projects from the command line.
WordPress Code to Get the Privacy Policy URL
With WordPress version 4.9.6 a number of Privacy Related Options, Hooks and Capabilities were added (predominantly in response to the EU General Data Protection Regulation (GDPR) legislation. One option that was added is ‘wp_page_for_privacy_policy’, which stores the page id of the site’s privacy policy page. This is great for programmatically determining the permalink of the Privacy Policy page.
Marshmallow Gun
Building a mini-marshmallow blow gun was a lot of fun and quite affordable. With some PVC pieces and an inexpensive cutter, you can craft one of these beauties.
Bootstrap 4 Browser Support
The Bootstrap 4 documentation includes their list of Bootstrap 4 supported browsers. When deciding whether or not to use Bootstrap 4, you’ll want to compare the list of supported browsers to the browser information of your visitors in Google Analytics (Audience > Browser & OS – you’ll probably want to drill down on the Internet […]
How the WordPress Block Based Editor Stores Blocks
Traditionally, when working with values in WordPress they would be stored in post meta. Now with the new upcoming WordPress editing experience (Gutenberg), these values are often stored right in the content. These are some of my notes on how they are stored.
Git Target Commit by Message
There are lots of ways to target a git commit and one way that I often forget to use (but really like it when I remember) is targeting a specific git commit by the commit message.
Checksum on Mac OS X Command Line
The checksum is like a fingerprint for the file. A file is processed through a known algorithm which results in the checksum, a.k.a “hash”, which is a string of letters and numbers unique to that file, e.g. 8ab686eafeb1f44702738c8b0f24f2567c36da6d. If the file is modified, the resulting checksum will be different. This allows a quick way to […]
Transcriptions
At php[tek], I got the opportunity to meet Nicolas Steenhout. In addition to everything else he does, in the php[tek] slack channel he shared some recommendations for transcription companies.
Command Line Delete All Directories Except One
On the Mac OS X bash command line, you can delete all directories, with the exception of one, in the following way. If our current directory has sub-directories and we want to delete all of them except, ./really-important-do-not-delete, we can run $ shopt -s extglob $ rm -rf !(really-important-do-not-delete) $ ls really-important-do-not-delete $ original source