An SQL injection vulnerability occurs when you use a variable in your SQL statement and someone uses the variable to add unexpected code. In this article, we’ll look at how this occurs and how to prevent it.
WordPress REST API call to Update Post Status Fails Silently
Recently, I was trying to update the post status of a post from ‘future’ to ‘publish’ publish` with the WordPress REST API and while the submission appeared to work, the value was not modified.
MySQL Query for Multiple Strings with LIKE
I recently learned that doing a MySQL “LIKE” with multiple strings separated with ‘%’ behaves the same as multiple “LIKE” statements.
Test WordPress REST API Endpoints from the Browser with jQuery
You can make WordPress REST API calls from the browser console. Here is one way I work with WordPress REST API endpoints in the browser using jQuery.
Gutenberg JS
My notes on JavaScript available methods in Gutenberg.
Git Preview Changes in Commit Message
You can set Git to preview all of the changes in your commit when you write your commit message. I find this to be a big help in writing my commits (and reminds me to keep the changes in my commits small).
Vim JSON Format
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).
git switch
Git version 2.23.0 is introduced a new command ‘git switch’. This command does a subset of what ‘git checkout’ does (because ‘git checkout’ does so many different things).
git restore
Git version 2.23.0 is introduced a new command ‘git switch’. This command does a subset of what ‘git checkout’ does (because ‘git checkout’ does so many different things).
Sending WordPress Emails Through Gmail
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.