Removing the latest Kernel in CentOS
I’ve had a power cut recently, which seems to have corrupted the latest Kernel I have installed on my CentOS 6 server. I can boot into the previous one just fine, but of course if I forget to make a choice on startup, the server doesn’t start up. That’s annoying. Thankfully there are ways to either fix the latest version, remove it, and even exclude a particular version from future updates. Here’s what worked for me on CentOS 6: What Kernel are we using To figure out which version is working for us, we can use the...
read moreIncluding Custom Posts on Archive Pages in WordPress
By default, Custom Posts don’t show up on regular Archive Pages. They still show regular posts, but none of the Custom Post Types are included. I suppose you’d have separate pages with custom queries for that. In my project however, which consists mainly of Custom Posts, it made sense to use the regular WordPress queries to simply include my Custom Posts. I found an elegant solution that makes this happen: // add game posts to regular WordPress queries function guru_add_games_to_query( $query ) { if ( $query->is_archive() ++...
read moreAccessing Custom Taxonomy of a Custom Post Type in the_loop
I was wondering how to access the custom taxonomy of my custom post types so it can be mentioned in the_loop. To continue my example from earlier posts, I have custom post type of “game”, with a custom taxonomy of “platform”. When I list a game, I’d like to show the platform in a list after its title. On regular posts, I have access to access to both categories and tags using the get_the_category() or get_the_tags() functions. For my project I have a custom query for the custom post type, and I’m using a...
read moreHow to fix “active developer path does not exist” with git on macOS
I’ve recently removed Xcode from my ageing MacBook. Ever since then, I’m getting an error when I try to run git from the command line. The error goes something like this: xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist That’s because Xcode had installed several command line tools provided by Apple, and one of them was Git. I thought simply installing it via Homebrew would do the trick but alas that too brings up an error message, albeit a different one. Somewhat...
read moreHow to add FTP sync in Visual Studio Code
To my delight I found out how to add an FTP destination to Visual Studio Code. It’s an extension called sftp by liximomo, available for free from the VS Marketplace. Here’s how to install, configure and use it on both Mac and Windows. Obtain it by selecting the extensions symbol in the sidebar (the bottom one, consisting of four little squares) and enter sftp in the search box. Click the green install option to proceed. Select View – Command Palette to open another scary menu, then type sftp. This will bring up a list of...
read moreHow to add the path to PHP in Visual Studio Code
I’ve recently started using Microsoft’s Visual Studio Code on my Mac. It works great, and I really like its simple useful features. The installation and most of the configuration worked flawlessly on my Mac and I was up and running very quickly. I had assumed it would be the same on Windows, but of course that wasn’t the case. Nothing is ever easy in Windows, is it? The error I got was with two PHP extensions: PHP Executable not found. Install PHP 7 and add it to your PATH or set the php.executablePath setting. Hey sure, I...
read moreHow to create Custom Post Types in WordPress
I’ve been working on a game database that’s powered by a vanilla WordPress instance. For the project it made sense to create a new post type (game), as well as a custom taxonomy (platform). I didn’t want to use a plugin and instead opted to create the new post type as part of the child theme’s function.php file. Here’s how I did it. The Custom Post Type (Game) Let’s take a look at the code for the custom post type first. We’ll assume we’re going to use the built-in taxonomies for now (Tags and...
read moreHow to use Sidechain Compression in OBS
OBS has a super neat feature that works great if you’re narrating over an existing audio track. It’s called Sidechain/Ducking, and it will automatically lower the audio of one source if an audio level is detected on another source. For example, when you’re playing a game, the audio would be lowered when you speak, and when you’re quiet the game audio could be played higher. It’s like MAGIC! In this article I’ll show you how to set it up, and the values that I’m using for some of my streams. Adding the...
read moreSVN Command Line Basics
I keep forgetting SubVersion basics from the command line, and thought this quick little cheat sheet might come in handy. I’ll cover the basics: checking outupdating your local copy checking current file statuscommitting a changeadding a fileremoving a file Checkout Out To make an initial copy of an online repository, we use the checkout command. It’ll create a new folder with the name of the online repo in the current directory and copy all its contents into it. Checkout can be abbreviated with co: svn checkout your-urlsvn co...
read moreRunning Stardew Valley without Steam (and the caveats it brings)
I’ve been playing Stardew Valley for a few days, and I’m enjoying it a lot. I have the Steam version, and as I often do, I’ve asked Steam to not create a Desktop shortcut for my game. Shortly after I thought that might have been a good idea and created one by myself and pinned to to my Start Menu. All works well: Stardew Valley starts and I can play. However, I’ve just LOST two days worth of progress because the Steam Client wasn’t running in the background. I have it disabled, because I genuinely dislike the...
read more