Category: Code snippets

  • How to authenticate WordPress Rest API from Google Sheets / Scripts

    This is the third tutorial in my series relating to integrating Google Sheets  and WordPress using the REST API. The first post covered reading basic post information into a spreadsheet.  The second post was about getting meta data from the REST API, which can be a little tricky. This one  covers authentication. Basically as an…

  • Getting post meta via WordPress REST API

    This the second post post in my series about getting and updating WordPress data via a spreadsheet.  The first post focused on the basics of Google Apps Scripting and the API call to the WP REST API – if you haven’t seen it you can read it here. This post is about meta data. In…

  • Linking WordPress to a Spreadsheet using WP REST API and Google Sheets scripts

    This post shows you how you can link a Google Spreadsheet to a WordPress website to extract data. I will write some further posts covering authentication and updating too. However a little warning, this is a programming task and a basic understanding of javascript is really required to follow what is going on. WordPress is…

  • Problem with WordPress 4.8 screwing up your website layout?

    WordPress 4.8  has just been released, and many web designers have reported that their layout have been mucked up with this release. *** UPDATE *** Since writing this blog post I have written a plugin – https://wordpress.org/plugins/add-paragraphs-option-to-text-widget/ – that solves this problem in a very neat way. *** There could be multiple reasons for this, but…

  • Google Compute Engine Snapshot automation

    Google Compute Engine comes with an incremental snapshot capability. The product doesn’t have a specific automated method to take snapshots and to tidy them up either, but scripting using the gcloud command line is fairly straight forward, once you understand the power of the command line. I have seen many attempts at automating this using…

  • Using GIT to deploy scripts to production servers

    This is how I use GIT to deploy script configurations to multiple servers. In this instance I have fail2ban  configuration that I want to be able to deploy to multiple servers easily & quickly I assume you are root – otherwise prefix commands with sudo as appropriate I also assume that you have remote root…