Recently I was talking to another developer about how to detect ‘WP_DEBUG’ being set on a WordPress installation. Here is the code I use.
While there are many ways to customization your command line prompt, one that can help readability is adding a blank line at the beginning of each prompt.
When creating a block for the WordPress block editor (a.k.a. Gutenberg), I find that most of the documentation is for class components. However, with React hooks we can use functional components. When you need to import ‘useState’ from React, you can do it as follows in a WordPress block.
Vim allows you to run all (or some) of your content through an external program. In this case, we want to use Python to format (i.e. pretty print) our JSON with ‘python -m json.tool’. We an also setup a Vim user defined command to reduce typing (and make it easier to remember).
Typically, if you’re sending any volume of email or sending emails to visitors you’ll want to use a third-party. Sometimes, you only need to send yourself notifications and are having deliverability problems with these notifications – this is the case, where you may want to send your emails through Gmail’s SMTP.
I find it frustrating in JIRA that I can not link to a specific comment in an issue. By triggering the old Jira view, you can link directly to a comment.
When the permissions on a file change in a commit, Git will include this in the diff. Git refers to this as a mode change. When I’m looking at a “git diff” (or specifically a “git diff –name-only” where I’m looking for a list of files that have been changed), I often want to ignore mode changes (a.k.a. permission changes). By adding “-G.” to the command, mode changes will be ignored.
When I tried to run Local by Flywheel I received the notification, “Regenerating Machine Certificates:
Local detected invalid Docker Machine TLS certificates and is fixing them now.” over and over again making Local by Flywheel unusable.
Ideally, the PHP package manager Composer can update itself with the command composer self-update Unfortunately, when I ran this command I got [RuntimeException] SHA384 is not supported by your openssl extension, could not verify the phar file integrity This is a known issue (see Composer Issue 7669) but unfortunately the thread does not offer a […]
Recently, I tried to import a site into Local by Flywheel and it failed with the message, “TypeError: Cannot read property ‘devMode’ on null”. It turns out the site export was created with “Local Lightning” while I’m using the classic Local by Flywheel. By modifying the local-site.json file in the import, I was still able to import the site.