Gardening, stamina and Joshua’s chalk drawings

Our back garden in a state of order
Our back garden in a state of order

One of the delights of this past weekend — apart from almost seeing the blood moon eclipse last night (there was too much cloud cover at 03:47 when I peered out of my south-westwards facing study window) — was getting the back garden tidied up.

Of course, the front garden still looks like a jungle. (Sorry neighbours!) But the back garden looks splendid and neat. The secret to tidy-looking gardens, I believe, is simply in defining straight lines and borders. It’s a bit like web design. But without the benefits of flexbox.

What is frustrating, though, is that my stamina still hasn’t returned after last year’s headache.

It’s been over a year now since I was in hospital. When I got out my GP said that I shouldn’t expect to begin to get my energy back until January or February; it was more like April when I began to feel that I was making some improvement.

But then in July the headaches began again. I know I was pushing myself too hard: cycling every couple of days, staying up too late, and I need to get my eyes tested again (appointment booked for Monday).

Time to reel myself in a bit and be a bit more sensible and disciplined.

Still, in the meantime at least the shed is tidy. And who doesn’t love a tidy potting shed?

Look! You can now walk in through the door and not tread on something.
Look! You can now walk in through the door and not tread on something.

And I think I may have discovered that Joshua is the secret identity of Banksie.

I love this cheerful drawing of a man and... a thing.
I love this cheerful drawing of a man and… a thing.

Seemingly to the right of the cheerful man is his thought bubble. I need to ask Joshua again what he’s thinking. Because I seem to recall that it was something random. Like a pie.

Bulk install packages in Sublime Text

A couple of weeks ago I was setting up a new laptop and kept putting off installing Sublime Text (my code editor of choice) because I knew that it would also involve about fifteen minutes patiently working through my curated list of packages (add-ons / plugins), installing each one by one.

There’s got to be a simpler way, I suddenly thought. Sublime Text saves me so much time doing other stuff automatically, surely they’ve thought about this too.

I was right.

In fact, front-end developer extraordinaire Paul Irish asked this very question back in 2012.

How do it it

So, here is how to do it:

  1. Install Sublime Text (2 or 3).
  2. Install Package Control.
  3. Create a JSON file listing the "installed_packages" you want (see below) and save it to Packages/User/Package Control.sublime-settings.
  4. Restart Sublime Text and allow it to pick up and install the new packages.

Just be aware of any packages that need dependences that Sublime Text cannot install, for example Git or Zeal (offline documentation browser).

Save locations

You can easily find the save location by going to Preferences > Browse Packages.

On Windows the save location is: C:\Users\[YOUR USERNAME]\AppData\Roaming\Sublime Text 3\Packages\User

Package Control.sublime-settings

This is my installed packages list from work and home; I keep a copy in Dropbox so that I can keep the two in sync.

The names listed are exactly as they are listed in the Package Control: List Packages list.

        "Bootstrap 3 Snippets",
        "Color Highlighter",
        "CSS Color Converter",
        "JSHint Gutter",
        "Markdown Preview",
        "Package Control",
        "Search WordPress Codex or QueryPosts",
        "Status Bar File Size",
        "Theme - Minimal",
        "Tomorrow Color Schemes",
        "View In Browser",
        "WordPress Developer Resources",
        "WordPress Generate Salts",

Needless to say, doing that made installing Sublime Text so much easier and quicker.

I will try to keep this list updated, as much for my own benefit as any one else’s.

Writing to the Google Chrome console from PHP

Chrome Logger is a Google Chrome extension for debugging server side applications in the Chrome console.
Chrome Logger is a Google Chrome extension for debugging server side applications in the Chrome console.

This afternoon I finally got round to figuring out why my workaround for changing the Divi projects custom post type to anything you want had broken in Divi 2.5.

In the end it was deceptively simple. I’d set the priority values for the add_action($hook, $function_to_add, $priority) and remove_action($hook, $function_to_add, $priority) functions too low.

WordPress uses the priority value to determine in which order particular actions are run. The default value is 10. The higher the value, the later it will be executed.

While I was investigating this, it crossed my mind that it would be really useful if I could write values to the Google Chrome console in the same way that you can when writing and debugging JavaScript.

It turns out you can, using Chrome Logger plus the ChromePhp library.

With the Chrome Logger extension installed and enabled on the tab I wanted to write to, all I had to do was include the library and log some data. Like this:

include 'ChromePhp.php';
ChromePhp::log('Hello console!');
ChromePhp::warn('something went wrong!');

Very useful. And as well as a library for PHP there are also libraries for

  • ColdFusion
  • Go
  • Java
  • .NET
  • Node.js
  • Perl
  • Python
  • Ruby

You can find details on the Chrome Logger website.


Robin and Carol’s wedding

Robin and Carol emerging from Kelso Registry Office
Robin and Carol emerging from Kelso registry office

Yesterday morning we drove to Kelso, in the Scottish Borders, for my first cousin Robin’s wedding.

They were married in Kelso registry office — my first ever attendance at a registry wedding — and then held their reception in the village hall in nearby Smailholm.

The highlight of the day, as far as the boys were concerned, was the bouncy castle in the hall grounds.

I spent most of the afternoon supervising our three. Isaac, especially, was really tired so every half hour or so he and I trotted across the grass to our car parked opposite the bouncy castle so that he could have a lie down in the temporary bed that I’d created for him in the boot of our Citroën Grand C4 Picasso.

It was a day of love and family and laughter… and a lot of bouncing.

Making scrollbars wider in Windows 8.1

Windows Explorer, now with wider scrollbars
Windows Explorer, now with wider scrollbars

Since last year’s dalliance with meningitis, which damaged my eyesight a little, I’ve found the standard Window scrollbars just a little too narrow for my liking.

It may only take a second or two more to adjust my mouse so that they are hovering right over them but those additional few seconds all add up. “Mony a mickle macks a muckle”, as we say in Scotland.

So last week I went looking for a way to increase the scrollbar width.

Windows 7 offers an easy way to do this within the Control Panel > Personalisation interface. Windows 8.x, however, doesn’t. You need to guddle about in the Windows Registry.

Here’s what I did:

  1. Win + R to open the Run dialog box.
  2. When the User Account Control dialog appears, click Yes.
  3. Type regedit, then click OK.
  4. Navigate to: HKEY_CURRENT_USER / Control Panel / Desktop / WindowMetrics
  5. Locate the two keys: ScrollHeight and ScrollWidth. These will both be set to -255.
  6. Change both to -375 to make them a little wider. (One site I visited recommended between -100 for thinner, and -1000 for thicker).
  7. Exit Registry Editor.
  8. Either restart the Explorer process in Task Manager, or log out and back in again, or reboot.

Getting a hp LaserJet 1320 dn to print multiple copies on Windows 7

hp 1320 dn
hp LaserJet 1320 dn (Photo sourced from AMDC)

At work I have an hp LaserJet 1320 dn (duplex and networked) plugged into my PC via USB. (It used to be networked and accessible by the whole office but since moving buildings we’ve not figured out how to do this yet.)


It’s great for printing out a quick copy of something without needing to send it to our central printing service and then walking to the other end of the corridor, logging into the printer, pulling the appropriate print job, waiting for the machine to warm up… you get the picture.

The problem

BUT until Monday I could only print out one copy of a document at a time. I’m using Windows 7 Professional 64-bit edition.

Which is fine if it’s just for me but I’ve been preparing interview papers for 14 candidates and four interview panel members. That’s 56 copies of application forms before we even get started on our own evaluation paperwork.

Anyway, my reluctance to walk down a corridor and stand in a dark, windowless room drove me to finally try to fix this. Thanks to Google and conscientious and helpful users on hp’s user forums I found the answer.

The answer

The first thing I did was make sure the latest drivers were installed.

Next, I followed these instructions:

  1. Open Start menu (in Windows 7) and select Devices and Printers.
  2. Right-click the hp LaserJet 1320 printer and select Printer properties.
  3. Select the Device Settings tab.
  4. Scroll to the bottom of the dialog window and find the “Installable Options” section.
  5. Now locate the option “Mopier Mode” and set it to “Disabled“.
  6. Click OK.
Printer properties dialog for hp LaserJet 1320 (PCL 5 driver)
Printer properties dialog for hp LaserJet 1320 (PCL 5 driver) with Mopier Mode set to Disabled.

This should resolve the issue.

I hope this helps other users (and possibly also a future me trying to remember how I did it the first time).

Note: some users, I noticed, on the hp forum reported that with their printer (e.g. LaserJet 1200) they had to do the opposite to get this to work. In other words they had to enable mopier mode rather than disable it.

What is mopier mode?

I’d never heard the word “mopier”. Seemingly a mopier is a machine that makes mopies: multiple original prints.

As more information was being created digitally and printers were becoming faster, cheaper and more reliable people started creating multiple original prints (mopiers) rather than printing one original document and then duplicating it on a traditional photocopier (copies).

The mantra appears to be: mopy—don’t copy.