Copying large amounts of data from an old drive to a new one on macOS using rsync

Whenever you buy a new hard drive, the question comes up:

How do you copy a huge amount of data from old drive(s) to the new one reliably and quickly?

Dragging files and folders in Finder is not a good option, because if something goes wrong, you will have no idea what went wrong and where it went wrong. And there is no way to resume a previous copy. 

rsync to the rescue!

Continue reading “Copying large amounts of data from an old drive to a new one on macOS using rsync”

How to extend Gutenberg Cover Block past the Container

One of my favourite blocks in the current version of Gutenberg is the “Cover”. It’s perfect to break up content into sections using large full-width images. 

However, if your page template has a container, the cover will stay within that container and while it does look ok, you might want to stretch it past the container all the way to the edge of the browser window. 

It’s a common style of block I need to reproduce while transitioning a site from WPBakery Page Builder to Gutenberg (not something I can recommend yet but I think it’ll be a common thing people will do eventually). Moving away from the shortcode-laden output of WPBakery seems to be more future-proof than trying to live with it for the next few years. But that’s for another post. Let’s get started!

The "cover" block in WordPress' Gutenberg editor
the “cover” block in WordPress’ Gutenberg editor
Continue reading “How to extend Gutenberg Cover Block past the Container”

Syntax Highlighting in WordPress

After I tried out a few of the available plugins for syntax highlighting, I ended up with a DIY solution that I’m really happy with. 

The main part of it is PrismJS which is an excellent JS/CSS solution for the job. 

I was trying to avoid anything that’s not out-of-the-box or requires custom shortcodes and PrismJS not only looks great, it also is very simple to use with the Classic Editor as well as the current version of Gutenberg.

Continue reading “Syntax Highlighting in WordPress”

Remove WPBakery Page Builder (formerly Visual Composer) shortcodes from the Excerpt

I’ve had this issue on a site where we’re using WPBakery Page Builder and its built-in “Grid Builder” for showing a selection of pages. Within the Grid Builder, we’re outputting the page excerpt. 

This means that WordPress shows certain shortcodes (or some variations of them) within the excerpt:

Continue reading “Remove WPBakery Page Builder (formerly Visual Composer) shortcodes from the Excerpt”

iOS Shortcut: create an image grid of album covers from a Spotify playlist

This iOS Shortcut might be very specific, but it’s certainly a great place to get started with APIs in the app. The image grid it creates is only one example. You can do so much more! Maybe create spreadsheets with the track information, extract ISRCs or similar information that Spotify has available through their API. Or do you want to download and backup your Spotify playlist track lists to Dropbox? This is certainly a good place to start!

Continue reading “iOS Shortcut: create an image grid of album covers from a Spotify playlist”

iOS Shortcuts User Guide on Apple’s Website

Apple has released a great guide for their new Shortcuts app on their website. It’s the best starting point if you want to dive into Shortcuts and work out how it can make your automated life easier. 

There’s also a great resource on macsparky.com for anyone who prefers to learn by watching videos. It’s not free but it’s worth checking out!

Last, but most certainly not least: there’s much more on macstories.net!

Deleting Yoast SEO metadata for a Custom Post Type

I needed to delete 20.000+ rows in the wp_postmeta table which related to a Custom Post Type and Yoast SEO. The SQL I ended up using was this:

DELETE pm 
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.post_type LIKE '%CUSTOMPOSTTYPENAME%'
AND pm.meta_key LIKE '%_yoast_%'

IMPORTANT: Don’t try this at home. And backup your database! I’m not responsible for any case of data loss! 

Blender 3D: rendering an animation across multiple computers

Quick tip on rendering 3D animations on more than one computer to speed things up but without a proper setup or render farm or similar:

I’ve been using Dropbox for all kinds of syncing and this is another useful one:

If you have multiple computers set up with the same dropbox path and they are in sync, you can simply open the same .blend file on all of them and uncheck “Overwrite” and check “Placeholders” in the Render -> Output settings. Then render into your dropbox folder and each computer will see the placeholders and move on to the next frame during rendering.

 

Sometimes you might get some overlap and 2 computers rendering the same frame but it’s no big deal because it simply shows up as a conflicting copy on all computers and is quickly cleaned up. Overall it’s still a huge timesaver.

Out of nowhere: updated MacBook Pro (2018)

The updated MacBook Pro (2018) is here and it’s what I expect in a pro computer:

  • 6-core Intel 8th generation (Coffee Lake) Core i7 and Core i9 processors up to 2.9 GHz with Turbo Boost up to 4.8 GHz
  • Up to 32GB of DDR4 memory (FINALLY!)
  • Radeon Pro graphics with 4GB of video memory
  • Up to 4TB of SSD storage (if you have more money than god)
  • True Tone displays
  • Apple T2 chip

The main improvement seems to be the extra RAM on the 15 inch and the (hopefully fixed) keyboard. 

I have the maxed out 2016 Touch Bar MacBook Pro and the main thing I noticed compared to my previous machine (late 2013 maxed out MacBook Pro) is that it’s maybe around 15% faster when rendering a 3D scene. Not worth the AU$5600 I paid for the upgrade.

Keyboard Trouble

Especially if you look at the keyboard issue I had where Apple first replaced a key and then ended up replacing the entire top case (keyboard, battery etc.) as well as the display. A AU$1500 repair for a sticky “B” key on a laptop!

Alternative: iMac Pro

If you want to fork out top dollar for this MacBook Pro, I would recommend that you look at the iMac Pro instead. You’re entering similar pricing territory but the iMac gives you better performance by a long shot. 

In my informal rendering tests, the iMac Pro (mid-level) outperforms the top of the line 2016 MacBook Pro by a factor of 3!

If you don’t need the portability or you’re willing to be this guy

Why?

it’s worth considering the iMac Pro instead of the top-of-the-line MacBook Pro 2018.

But seriously… Don’t be THAT guy.

Let‘s talk backups

You could say that I‘m crazy about backing up. Let’s face it: most people don’t think about it. In 2018, it is still difficult to set up, can get expensive and there is no “set it & forget it” solution.

If you’re all-in on Apple, you can pay for iCloud and it will cover you for most scenarios even though some of the Desktop and Documents syncing is unreliable at best. Your iOS devices and photos are pretty well backed up.

But is that enough? 

Of course not! Like most people who are thinking about backups, I have adopted the 3, 2, 1 backup strategy. But I also added a fourth copy because it doesn’t take that much extra work once you have the basics in place.

My setup 

My setup consists of an iMac and a MacBook Pro which are more or less in sync using cloud services: a mix of Dropbox, iCloud and Google Drive for work. Some might see that as backed up already, but remember: Dropbox is not a backup! It’s very close to that though! It’s the first place I go to when I need to revert a corrupt file or restore a previous state of my documents. It’s faster and more intuitive than any “real backup”.

What’s the “real backup”?

  1. First copy: the main copy on the internal drive
  2. Time Machine: this is just running in case I need to revert something that can’t be done through Dropbox
  3. Backblaze: off-site copy of all important parts of my system
  4. Super Duper Scheduled bootable clone: every day at the end of the working day, Super Duper creates a bootable copy of my internal drive on an external USB drive. 

Add in the cloud services and the habit to store everything on Dropbox instead of using the Desktop or Document folders locally and you’ve got a pretty solid backup strategy with plenty of room to recover from any possible failures.

Especially since these backups are running on 2 separate computers where the files are in sync as well. That means that I can also revert from my iMac to my MacBook Pro and vice versa. Which makes this an 8-7-6-5-4-3-2-1 backup!? 😂

Let’s quickly talk external drives

Any external drive also has to be backed up to Backblaze and will need at least one scheduled copy. This has the unfortunate site effect that every harddrive purchase means that you need to buy two drives instead of one. Depending on your storage needs, that might not be feasible.

But if losing data is the other option, buying 2 drives is really worth it!