Disable WordPress Trackbacks to avoid spam

I’ve intended to disable all comment or trackback functionality to avoid having spam and dealing with it in form of anti-spam plugins like Akismet. While I already had comments disabled, Trackbacks were still active.

Even when you disable Trackbacks in the WordPress settings via „Settings / Discussion“ under „Allow link notifications from other Weblogs (Pingbacks and Trackbacks)“, your existing pages needs manual update to take effect.

Connect to your MySQL database of your blog (e.g. with PHPMyAdmin) and execute these two queries:

 

I’ve found this information on Andreas blog, thank you!

Howto convert a Windows 10 installation from legacy BIOS to UEFI boot

I’m currently trying to build a Hackintosh. I had some troubles with bootloaders and modified BIOS, as they weren’t able to detect my existing Windows 10 installation. Windows 10 was installed in legacy BIOS mode, which means you have a traditional boot layout using a Master Boot Record (MBR) instead of GPT (which is also used by Mac OS).The Windows 10 installation would be visible if I could somehow change it from MBR to GPT.

Normally you would do a reinstall and would create a new installation of Windows 10, but this time you would select the Installer as UEFI Installer and it would suggest to reformat the disk with GPT.

However, I don’t want to reinstall everything so I searched for a solution. With one of the recent Windows 10 updates Microsoft added support for a tool called MBR2GPT. This tool can update your existing installation to GPT.

WARNING: The following assumes that you’ve created a working backup of your installation and that your computer supports booting via UEFI.

The necessary steps are:

  • Start your computer, so that Windows 10 is loaded.
  • Select restart and press and hold the shift key.
  • The computer will restart into Windows PE mode.
  • Select Troubleshooting, Advanced options, Command Prompt.
  • Windows will ask you to select a user name with admin rights.
  • Login with that user.
  • The Command Prompt opens and you can start the process with
  • If that command succeeds without errors, you can start the conversion with
  • You can exit the Command Prompt.
  • Reboot your computer.
  • It should boot from the found GPT partition scheme and should present you the Windows boot screen.

 

How to clean install Mac OS High Sierra without APFS on internal SSD

Did you ever wonder how you can make a clean install on your Mac with High Sierra without being forced to use APFS? Well, I just reinstalled my mac using this method and want to explain how I acomplished this:

First of all, you’ll need to boot from a Mac OS Version below 10.13 High Sierra. Otherwise you’ll get an error message „Helpertool crashed“. So in my case I booted from a 10.12 Sierra USB stick.

You can now use the Disk Utility of the recovery OS you currently booted from to clean you complete disk. Format the volume HFS+ journaled and choose a simple name without spaces like „internal“ (which I used for my internal SSD). Attach the USB stick which contains the High Sierra installer. You can create this installer following these instructions.

Now exit Disk Utility and open a Terminal. Go to the Volume of your attached High Sierra USB Stick.

cd /Volumes/“Install macOS High Sierra“

Start the installation of High Sierra to the freshly formatted HFS+ volume mounted as „internal“. This clean installation will also create the Recovery HD partition.

„Install macOS High Sierra.app“/Contents/Resources/startOsInstall –agreetolicense –converttoapfs NO –volume /Volumes/internal

More information can be found here. A video of the process and more details are here. If you execute the startOsInstall command with –usage you’ll get a list of available parameters.

 

DIY HomeKit with Raspberry Pi and Xiaomi Robot Vacuum

Inspired by tweets of Steven Troughten-Smith, people started to experiment with Raspberry Pi’s as DIY HomeBridge devices. One of them is Wojtek Pietrusiewicz. He wrote a nice article which I used as base for this post.

Introduction

I own a Xiaomi Robot Vacuum. This robot can be controlled by the Xiaomi app, however, I don’t like it very much. The idea is to control this robot over HomeKit. To use HomeKit, I use an old Raspberry Pi 1B. The software will be HomeBridge.

Setting up the Pi

Installation and Configuration of Raspbian

Use Etcher to write the image to the SD card. Remount that SD card and add a file called „ssh“ in the root of the mounted partition. This will enable SSH from the beginning so that you can login directly to the Pi. I don’t want to attach a screen or keyboard to that machine so it will only be reachable over the network. Now boot your Pi from this SD card.

Identify the Pi’s IP (e.g. by looking at the network overview in your router). Now connect to that IP with user „pi“. The default password is „raspberry“. Please change the password now with passwd and assign a new user password.

Update everything with apt:

 

Install nodejs 8.9.4

According to Wojtek only this version works currently with HomeBridge. I did not test any other version so I’m just describing what I did on my machine:

  1. Download nodejs for the PI into your users homefolder, e.g. with wget https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-armv6l.tar.xz
  2. Unpack the file with tar -xvf node-v8.9.4-linux-armv6l.tar.xz
  3. cd node-v8.9.4-linux-armv61
  4. sudo cp -R * /usr/local/
  5. add export PATH=$PATH:/usr/local/bin to e.g. ~/.bashrc
  6. node should be now available

Install HomeBridge

  1. Install the necessary libraries: sudo apt-get install libavahi-compat-libdnssd-dev
  2. Install HomeBridge with npm: sudo npm install -g --unsafe-perm homebridge
  3. open /etc/default/homebridge and safe it with this content:
  4. open /etc/systemd/system/homebridge.service and safe it with this content:

Setting up HomeBridge with Xiaomi Robot Vacuum

  1. sudo npm install -g homebridge-xiaomi-mi-robot-vacuum miio
  2. open ~/.homebridge/config.json and safe it with this content:

    Generate a new MAC address separated by : using this website. You’ll need the IP address of your Xiaomi robot as well as the token. There are several ways to get the token. I’ve extracted mine from the iOS backup. Instead of uploading the token I’ve used this command on the token taken from the sqlite database:
  3. Check if everything is working by starting homebridge for the first time. It should show a QR code. If it does, cancel the process with ctrl+c

Automate HomeBridge startup

Adding the HomeBridge to iOS devices

  1. Install the Home app, if you’ve removed it from your device. You can reinstall it from the App store.
  2. Open the Home app and add a new device
  3. If you’ve give the app access to your camera, you can scan the QR code you’ve seen earlier. However, HomeBridge is now running as a daemon in the background so you won’t see that QR code. You can add the bridge manually by using the PIN you’ve set in the config.

Raspberry Pi 3 with Kodi, Netflix, Spotify Connect, Hyperion and RetroArch

I’m currently using an old Mac Mini from 2009 as my media center. I’ve updated it recently with more RAM and an SSD but it has its problems with Bluetooth, regardless my used bluetooth card or USB adapter. Before this setup I’ve used a Raspberry Pi 3 with LibreElec which I’ve now reactivated successfully.

I’m using the Mac Mini for hearing Spotify, watching Netflix and Sky Go Connect, SNES Emulator with Xbox 360 and PS3 Gamepads and of course Kodi as media center in combination with Hyperion on a Raspberry Pi 1 as Ambilight clone. I’ve had to replace all this functionality with the Pi 3, but luckily it is possible!

I’ve started with LibreElec (8.0.2 stable) and installed it on the Pi 3. I had to copy the necessary Kodi files for setting the used sources and mysql database, so that I get my existing library and its viewing status.

Hyperion was easy to install via HyperionRemote. I only had to enable guest control for external resources in Kodi, so that Hyperion could properly shut down the backlight while the main menu is being displayed.

The SNES emulator can be used on LibreElec using the Kodi add-on Gamestarter. Just follow the GitHub instructions.

My Xbox 360 Gamepads where installed without problems. I just had to connect them via the USB adapter and pair them with the adapter. They are usable in Kodi as well as in Gamestarter without further configuration. I think that PS3 gamepads will probably behave similar.

The Bluetooth Mac Keyboard and Trackpad can also be paired with the Pi 3 via LibreElecs system settings. This allows a better search since you don’t need to use the onscreen Keyboard.

For Spotify I’ve just wanted the Pi 3 to appear as a Spotify connect speaker. The mobile apps and my other machines in the network are a better solution to select the music I want to hear, so I just wanted the Pi 3 to appear as a target. The Librespot provides this cool feature and also enables you to add easily Spotify connect to other rooms in your house with just a Raspberry Pi. Just search in the add-on for Librespot and install it. After a restart its active. Spotify connect is available immediately and stops automatically once a movie is started. It will be available again once the movie is really stopped (being paused is insufficient). Connecting to Librespot is really fast and works even better than with my Heos speakers!

Netflix is a completely different beast. Netflix is relying on a library called WideVine which handles the DRM. Google created a version for Chrome on ARM devices and some LibreElec and Kodi developers found a great way to integrate all this into the next version of LibreElec 9 and Kodi 18. So you need to update to  LibreElec 9 alpha. Copy the downloaded update file for Raspberry Pi 2 and 3 and put it into the update folder of your Pi 3. Now just restart and you’ll get the new version. However, be sure to make a backup of your library, just in case anything doesn’t work as expected!

You’ll now need the WideVine libs, you can install them with this command on your Pi:

You’ll now only need the plugin.video.netflix add-on. Once it is started you’ll be asked for your Netflix credentials. If you enter everything correctly you’ll have all the options of Netflix displayed as nice library entries in Kodi. Really comfortable if you ask me! It even works directly with the Hyperion Ambilight which is a cool feature. I was able to use 720p without problems, 1080p is too much for the Pi 3 to decode only in software.

Now with LibreElec 9 you’ll have problems starting RetroArch via Gamestarter. Luckily there’s a version for LibreElec 9 which you can just install and update your existing add-on.

 

Congratulations! You’ve got now a Rasperry Pi 3 with Kodi 19, Hyperion Ambilight, RetroArch Emulator, Xbox 360 Gamepad support and Spotify Connect. Only thing not working is Sky Go Connect Ticket, due to a missing browser and probably DRM related issues. But since I’m just using it for 3 months to see Game Of Thrones I can workaround this with connecting my MacBook to the TV.