• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Archives for Dev Tips

Dev Tips

HubSpot API call fail INVALID_DATE not midnight!

Last updated on May 21, 2019 by Sal Ferrarello

When making a HubSpot API call to update a date picker field, I’m getting a response with “response code 400”, “error INVALID_DATE”, and the message includes “not midnight!”. This is why I’m getting this error and how I fixed this call.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming, Solution Tagged With: DateTime, HubSpot

WordPress Database Prefix

Last updated on April 29, 2019 by Sal Ferrarello

By default all of the WordPress database tables will start with the prefix “wp_” (e.g. wp_users, wp_posts, etc.). Because this is the default value, you’ll often hear the tables referred to (and written about) using the “wp_” prefix. Let’s look at how and why this prefix is modified.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming Tagged With: database, WordPress

Conditionally Add Bootstrap Table Responsive Class

Last updated on April 16, 2019 by Sal Ferrarello

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.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: Bootstrap, Genesis, WordPress

grep without exclude-dir

Last updated on April 8, 2019 by Sal Ferrarello

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.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft

How to Set Older WordPress Posts to Draft with WP CLI

Last updated on April 5, 2019 by Sal Ferrarello

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.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: WordPress, wp-cli

Composer fail required PHP version

Last updated on November 22, 2019 by Sal Ferrarello

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).

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: composer

PSR-2 EditorConfig

Last updated on February 25, 2019 by Sal Ferrarello

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.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming, Solution Tagged With: editorconfig

Git Previous Branch

Last updated on February 11, 2019 by Sal Ferrarello

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 (-).

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Dev Tips, Draft, Recommendations Tagged With: command line, Git

WordPress JavaScript async defer

Last updated on February 11, 2019 by Sal Ferrarello

When loading JavaScript on a webpage with the “script” tag, there are additional attributes you can add to tell the browser how and when to load the JavaScript (‘async’ and ‘defer’). In WordPress, there is not a native way to add these attributes but this code snippet does the trick.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming, Solution Tagged With: HTML5, JavaScript, WordPress

Get a File from Another Git Branch

Last updated on February 7, 2019 by Sal Ferrarello

I was working on one Git branch and I wanted a file from another branch. Using git checkout, we can do this.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Solution Tagged With: Git

  • «Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 8
  • Go to page 9
  • Go to page 10
  • Go to page 11
  • Go to page 12
  • Interim pages omitted …
  • Go to page 20
  • Next Page»

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in