When using Vim you can find your <Leader> by using echo for the value of “mapleader”, however there are some edge cases that make this less than ideal. If “mapleader” is undefined an error is thrown instead of showing the default <Leader>. If “mapleader” is not a visible character (e.g. <Space> or <Tab>), you can not see the value. I use the following command to display <Leader> while working around these edge cases.
When using Scriptless Social Sharing, you may want to add a site wide hashtag to all of your tweets. This is the code you can use to do that.
In Mac OS X version 10.14 Mojave, when taking a screenshot a thumbnail is displayed for a few seconds before the file is created. Unfortunately I don’t want this delay. I take a lot of screenshots (using `Command` + `Shift` + `4`) and typically want to upload the image without making any changes, making this delay frustrating. This is how I removed the delay.
While working on another post, I had some very large tables and I wanted to use Bootstrap Responsive Tables by adding the .table-responsive class but only in the situation where the table is too wide. This is the code I used.
In one of the slack channels I follow, the question came up on how to set WordPress posts older than a certain date to “draft” status using with WP CLI. I was surprised by how difficult I found this task and wanted to document my solution.
You can skip the required PHP version with “–ignore-platform-reqs”. This can be helpful if you’re running composer outside of your virtual machine (and your virtual machine has the correct PHP version but your host machine does not).
Recently I was working on a site using Advanced Custom Fields (ACF) and the field input boxes had stopped working. In the browser console, I saw the error “ACF Uncaught TypeError: Cannot read property ‘id’ of undefined”.
The editorconfig project allows you to standardize general coding standards on a project.
I was working on a project where I needed to follow the PHP PSR-2 standard. This is the .editorconfig file I used.
When trying to add my the dkim DNS TXT record for my domain (to authenticate outgoing emails) in Amazon’s Route 53, I received the error message: “CharacterStringTooLong (Value is too long)”. This is how I fixed it.