LAMP Stack for Humans – now available on Amazon

Lampstack-SoftcoverMy book LAMP Stack for Humans is now available on Amazon, as Paperback and for Kindle Devices!

In this 284 page guide I’ll walk you through the process of turning an old laptop into an always-on server. You can use it to run web applications in the comfort of your own home or office – no “cloud” required.

Together we will configure the entire server: you will learn how to install CentOS, Apache, PHP and MySQL (or MariaDB) and WordPress. I will show you how you can reach your server from other computers on the network and how to create regular backups.

Perfect for the Linux newbie and those who want to get started with web applications without spending money “in the cloud” (in my opinion THE WORST expression for describing remote computers).

If you’re an avid reader of this site and have always wished that some instructions would be presented in a more cohesive form rather than in snippets, then LAMP Stack for Humans is perfect for you.

Grab your free sample today, or read the entire book for free via Kindle Unlimited!

Continue reading LAMP Stack for Humans – now available on Amazon

How to transfer files from your GoPro to your computer via WiFi

There is an iOS and Android App available to transfer files directly from a GoPro camera to a mobile device. Those apps transcode files and compress them for easier viewing, and to save storage space.

While that approach gets footage onto my iPhone, I still need to transfer the files to my Mac for editing. Plus, there’s an additional compression step involved which can’t be good for picture quality. Besides, it takes forever to do its job.

A much more useful approach would be to hook directly into the GoPro and transfer files that way. This leaves the SD card place and doesn’t disturb the (sometimes hard to reach or difficult to recreate) position of the camera.

Here’s how to do it.

Continue reading How to transfer files from your GoPro to your computer via WiFi

How to centre an element in CSS

In the olden days of HTML development, in the late 90ies, we only had inline styles. Centring an element was done using the <center> property. That approach isn’t very elegant anymore in modern CSS 🙂

Today we can use something like this:

It’s slightly more complicated than a single tag, but also opens up more options to tweak top and bottom margins at the same time.

How to add something to the_content in WordPress using PHP

Sometimes we need to add additional text or elements to the_content in WordPress. This can include links, icons, shout outs, author biographies, and so forth. I wanted to add an Apple Podcasts badge underneath each post in my podcast categories, adding a link to the badge, depending on the category. I’ll elaborate how I did this in a later post.

Right now, let’s have a look at how we can add elements to the content retrieved from WordPress. This should work independently of your theme, and no theme-file-hacking is necessary to accomplish this.

All we need to do is intercept the_content as it is requested, append our elements and return an amended version of the_content. Let’s see how this works.

Continue reading How to add something to the_content in WordPress using PHP

How to find your Public Profile on Amazon

As much as I like Amazon, UI design isn’t their strong point. They have so many links to so many things hiding in their interface that it’s difficult to find what you’re looking for at times. Your Public Profile is one of those hidden gems.

It’s a collection of all your community activity you’ve engaged in on Amazon, such as post reviews or videos, your wish lists, Spark posts, Reviewer Ranking and so forth. Here’s a screenshot of what mine currently looks like:

Continue reading How to find your Public Profile on Amazon

ZAFFIRO Lapel Microphone comparison B074SF96X9 vs B0765NGK4N

In this episode I’m taking a look at two lapel microphones by ZAFFIRO. They’re both called “Lavalier Lapel Microphone”, and the description is more or less identical on both items – yet there are significant differences between these products.

I bought both of them back in March 2018, and given the sound quality and amount of accessories you get, for less than $20 each, these mics are good bargains for casual users. But no matter how detailed (or vague) their shop descriptions are, and no matter how hip the people in those pictures look, you can only really judge a microphone by what it sounds like.

In this review I’ll tell you all that I’ve learnt in my six months with the ZAFFIRO lapel mics.

Continue reading ZAFFIRO Lapel Microphone comparison B074SF96X9 vs B0765NGK4N

Catch this episode on my WP Guru Podcast:

How to bring back the date on Sticky Posts in TwentyThirteen

By default, the TwentyThirteen theme suppresses the date byline when a post is marked as Sticky (in which case, it’ll always be displayed at the top of the posts list).

That’s usually great, because Sticky Posts are often timeless announcements, and the fact that they’re a year or two out of date doesn’t look as handsome as if the date byline would simply be removed. I like this as a default behaviour.

Here’s what a default sticky post looks like, without the date displayed:

But of course, every now and again you may want to break the rules and shake up the whole universe. I did this on my iOS Dev Diary recently, where an announcement post would have been very helpful with the date displayed (I didn’t intent to keep it there for long).

So how do we bring back the date on Sticky Posts in TwentyThirteen? Let’s find out!

Continue reading How to bring back the date on Sticky Posts in TwentyThirteen

How to take a screenshot on a Chromebook

My wife recently got hold of an Acer Chromebook. She just got a promotion in her job, and part of said promotion was a laptop so that she can work 18 hours a day more efficiently.

The biggest question we both had less than 10 monies after switching it on was: how to we take a screenshot with this thing?

Short Answer

To take a full screenshot, press CTRL + F5.

To take a partial screenshot, press SHIFT + CTRL + F5. Now left-drag the area you’d like to take a screenshot of.

If your Chromebook doesn’t have F keys, look for a rectangle with two lines next to it. It’s known as the Switch Window key. It’ll most likely be the fifth key from the left in the top row, not including the ESC key. It looks like this:

Resulting files will be stored in the Downloads folder.

Further Reading

Let Google dazzle you with a whole host of keyboard shortcuts available for Chromebooks:

  • https://support.google.com/chromebook/answer/183101?hl=en

How to bring back the Author Byline in TwentyThirteen

I could have sworn that when I started using Automattic’s TwentyThirteen theme over five years ago, it displayed an Author Byline in the meta description. That’s the text right underneath the title of a post, the same line that displays the post date, categories and tags.

I remember this because there were many an instance on which I had to hide that Author Byline, because on single author websites, crediting yourself over and over again just leads to a cluttered reading experience. Furthermore, if you have several tags and categories to display, the meta line can easily run over into a second line, adding to more clutter than we want to see.

Turns out that over time, the WordPress team have had a lot of feedback about the Author Byline, and it turns out that nine times out of ten, people just didn’t want to see it. So they decided to invisibilise it by default.

Thanks to David Greene and P. Chandra for bringing this to my attention.

Let’s take a look at two options that can bring it back in TwentyThirteen. Continue reading How to bring back the Author Byline in TwentyThirteen

How to fix the Disappearing Mobile Header in TwentyThirteen

I’ve recently changed themes on this site, from my own development of P2 Categories to Automattic’s TwentyThirteen. P2 Categories was not mobile friendly by default, and TwentyThirteen gives all my major notebook sites a cohesive look, making maintenance easier for me.

One thing I’ve noticed about TwentyThirteen is a small bug that’s been discussed several times around the web: when no header text elements are shown (under Appearance – Customise – Site Identity), a graphical header image disappears on mobile devices. Or more accurately, when the screen width changes to anything below 767 pixels.

If a site title and description are shown, the bug does not present itself, and instead the theme resizes the header image as well as the text without issues. That’s the behaviour I’m experiencing on both my 3D Dev Diary and my iOS Dev Diary.

I did some digging and found a suitable solution for this problem. Let me share it with you here.

Continue reading How to fix the Disappearing Mobile Header in TwentyThirteen

How to build an Amazon link efficiently

When you want to share a product on Amazon with someone else, the easiest thing to do is to copy whatever is in the browser bar at the time and paste that elsewhere. While this works, it’s not an efficient way to link to a product.

The URL is often extremely long and contains additional parameters that tell Amazon’s systems either how the product was found or referred, or what else to display on the current product page. Most of that additional information makes the URL longer than it needs to be.

In this article I’ll show you how to build a short and efficient link without additional parameters, such as tracking information.

All we really need is the regional Amazon domain and the ASIN of the product and add these two together, separated by the letters “dp”.

Continue reading How to build an Amazon link efficiently