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.
How to use grep to search for a word in a file while excluding certain directories is easy with the “–exclude-directory” option, but even when this option is not available we can still get the same results with some command line magic.
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 tell composer to install dependencies as if you’re using a specific version of PHP. 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).
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 working with Git on the command line, I spend a lot of time switching back and forth between two branches. Even with Git tab completion, it is a lot of typing. However Git has a shortcut for the previous branch, a single dash (-).
I was working on one Git branch and I wanted a file from another branch. Using git checkout, we can do this.
A quick table of the differences in 301, 302, 303, and 307 Redirects.
I’ve written about using “git push –force-with-lease” instead of git push –force” because “force-with-lease” will only force push changes if your local copy is aware of all of the commits on the remote branch but how is git “aware” of the commits.