Blog

How to find the URL for your own YouTube Playlist (2018)

Posted by on 4:18 am in Knowledge Base | Comments Off on How to find the URL for your own YouTube Playlist (2018)

I’ve seen a lot of web interfaces in my time. YouTube’s has got to be one of the worst ever. Fact! I am frequently shocked how unintuitive the simplest of things are, and how cumbersome and ugly the whole design is. Take something as simple as sharing your own Playlist. There’s this unbelievably unhelpful Google article that apparently explains how it works. Which it doesn’t. At least not at the time of writing. Here’s how to find and share your own YouTube Playlist’s URL (with screenshots, as of August...

read more

How to transcode an AFIC file with macOS Finder

Posted by on 1:54 pm in Knowledge Base | Comments Off on How to transcode an AFIC file with macOS Finder

Yesterday I had to transcode some audio files recorded with Quicktime on macOS. Quicktime works great for that, but it only stores files in its native AIFC file format. That’s the Audio Interchange File Format, a format developed by Apple in 1988, storing audio data as uncompressed PCM data. Sadly though, AIFC is not commonly readable by many applications, and as such the data needs to be transcoded to be used successfully elsewhere. And Quicktime offers that option too, simply by choosing File – Export – Audio Only. This...

read more

How to share ebooks with WordPress (EPUB and MOBI files)

Posted by on 4:54 pm in Knowledge Base | Comments Off on How to share ebooks with WordPress (EPUB and MOBI files)

If you’ve ever tried to upload an ebook in .MOBI or .EPUB format with the WordPress Media Uploader, you will have noticed an error message appear. Something along the lines of “Sorry, this file type is not permitted for security reasons”. The only way then appears to be to ZIP the file and share it. That’s not a great experience for mobile users, who would simply like to click on a file and open it in an application such as iBooks or Kindle. The solution to this puzzle lies in adding the required mime types to...

read more

How to declare a class in PHP

Posted by on 1:26 pm in Knowledge Base | Comments Off on How to declare a class in PHP

Since PHP 5 we can use object oriented features in PHP. This allows us to not only use functions and variables, but also write classes and create instances of them in our code. Here’s quick rundown on how to do it. Writing and instantiating a Class Creating classes is very similar to writing functions. Here’s an example of a class with one method and one variable: // creating a basic class with one method class Test { var $testValue = 47; function sampleFunction() { echo "Hello from the Sample Function!\n"; } } Once declared, we...

read more

How to switch off emails from Anacron in Plesk Onyx

Posted by on 1:24 pm in Knowledge Base | Comments Off on How to switch off emails from Anacron in Plesk Onyx

In 2011 I wrote an article about how to avoid emails from Dr. Web. In it I was discussing how to switch off these notifications, which are generated when the Dr. Web service updates itself. Here’s an example: /etc/cron.daily/drweb-update: Dr.Web update details: Update server: http://update.msk5.drweb.com/plesk/700/unix Update has begun at Fri May 18 03:53:47 2018 Update has finished at Fri May 18 03:53:54 2018 Following files have been updated: /var/drweb/bases/drwdaily.vdb /var/drweb/bases/drwtoday.vdb /var/drweb/bases/dwmtoday.vdb...

read more

Fan Maintenance on my Samsung NC10

Posted by on 1:46 pm in Knowledge Base | Comments Off on Fan Maintenance on my Samsung NC10

My Samsung NC10 Netbook has been in constant operation since 2013, for 24 hours a day, 7 days a week. It’s doing a great job as our internal office server, purring along quietly running CentOS 6. When I put it in operation 5 years ago, I made sure no mechanical parts we being used anymore to avoid wear and tear: I’ve added an SSD, and once a day valuable data is backed up on a permanently mounted SD card. The only mechanical thing still in use is the internal fan. I knew the day would come on which the poor thing would either give...

read more

How to host multiple websites with Apache

Posted by on 1:45 pm in Knowledge Base | Comments Off on How to host multiple websites with Apache

The Apache web server has a convenient feature called Name-based Virtual Hosting. This function allows us to have a single LAMP Stack server configured on one IP address, but serve a different set of files depending on which domain is being requested. This sounds more complicated than it is. Say we had example1.com and example2.com, both of which are to be separate websites, but both domains point to the same IP address. Apache’s Name-based Virtual hosting makes this possible. In fact, this feature forms the basis of 90% of this...

read more

How to increase the font size in Automattic’s P2 Post Box

Posted by on 12:51 pm in Knowledge Base, Themes | Comments Off on How to increase the font size in Automattic’s P2 Post Box

Front page posting is what the P2 theme is all about – but I personally find the default font size on the front page a bit too small. Perhaps it’s my raging tired eyes. In every child theme I write for P2, I usually increase this – both for immediate posting, as well as for text editing (which also happens inline on the front page). To do that, add the following to your style.css file: /* larger text for post box and editing */   #postbox textarea #posttext, textarea.posttext {   font-size: 1.3em !important; } This will...

read more

How to update legacy constructor methods in PHP 7

Posted by on 1:44 pm in Knowledge Base | Comments Off on How to update legacy constructor methods in PHP 7

When I was fiddling with my P2 Categories theme last week, debug mode generated several warnings when run in PHP 7.2.1. That’s because class methods are no longer allowed to have the same name as the class itself. This was allowed in PHP 5 and earlier, but from what I gather it’s no longer the way to do things. Back then such methods were used as constructors, or in other words, methods that would be run automatically when the class is instantiated. Let’s take an example from the P2 theme. Here’s the beginning of the...

read more

P2 Categories – Version 1.6 released

Posted by on 1:52 pm in Knowledge Base, Themes | Comments Off on P2 Categories – Version 1.6 released

  Last week I found some time to update my fork of Automattic’s P2 theme, aptly titled P2 Categories. In addition to all the greatness of P2, it’s been adding front-page category posting since 2013 (and hasn’t seen an update since then either). Here’s what’s new in the latest version: fixed the drop down menu, which was no longer working since Safari 10 rewrote the whole theme from scratch, based on P2 v1.5.8 (2016) fixed a bug that would not show the correct number of posts in a category added new...

read more