Adding WMIC command to the Windows path

wmic is not recognized as an internal or external command – I was quite shocked to find that a command I use on a very regular basis was not working on a fresh installation of Windows 10 1909 on my trust old ThinkPad. I don’t want to spend hours trying to find out why this was not correct in my system path, but instead, I fixed it and spent the time sharing how to fix the problem. ...

May 30, 2020 · 2 min · Tom

How To: Raspberry Pi boot from USB

The Pi enthusiasts have been waiting for official USB boot support on the Raspberry Pi for what feels like a lifetime, but finally it is on the horizon. In this post I will explain how to make your Raspberry Pi boot from USB. WARNING: Although this is official, it is still in beta testing, so rock-solid stability is far from certain. Learn more about this beta release here. ...

May 23, 2020 · 4 min · Tom

Copy Paste in vSphere before installing VMware tools

I’ve spent enough time building VMs in vSphere to know that the first few minutes between starting the VM and getting VMware Tools installed is agonising. Similar to my ‘Copy Paste With Powershell Sendkeys‘ script, I have another tool written in AutoIT which sends defined keyboard strokes to the system. So this is not exactly ‘copy paste in vSphere’, but it achieves the same goal. ...

May 18, 2020 · 2 min · Tom

Automatically pause Spotify with the 3CX client

This is a really old script that I just found in my archive, but it still works all the same. The goal was to write a small script that would automatically pause Spotify with the 3CX client when there was an inbound call. The script is written in AutoIT, meaning that it is a Windows-only solution. The Windows 3CX CTI client allows you to run a particular executable when an inbound call is received, i.e. when the phone rings. I wanted to pause the manic euro beats so that I could answer my phone and here the caller and uphold professionalism. ...

May 16, 2020 · 2 min · Tom

Python 3 SSH with Paramiko

I have a number of projects which I am currently working on which usually involve a raspberry pi and so other TCP enabled object. One project, in particular, is to control a KVM server with buttons connected to a raspberry pi (follow on social media or RSS for that future post). I have been using Python 3 SSH with Paramiko to send commands KVM server from the pi. Here is how I do that… ...

May 15, 2020 · 3 min · Tom

How To: Python infinite loops with while true

Here is a quick guide on how to create an infinite loop in python using a ‘while true’ statement. There are number of reason that you might want to implement this; a great use case would be outputting a fluctuating variable to the terminal such as a temperature reading from a sensor. loops that make your brain hurt A ‘while true’ statement allows us to run a sequence of code until a particular condition is met. In order to make that sequence of code run in an infinite loop, we can set the condition to be one that is impossible to reach. Better still, we can simply omit the condition altogether to ensure that the while true loop never ends. ...

May 5, 2020 · 2 min · Tom

How to upgrade Ubuntu from 18.04 to 20.04

Ubuntu 20.04 LTS full release is almost upon, with a scheduled release date of April 23rd 2020 (2 days as of writing this). It is packed with lots of great new features and upgrades and the Linux community is very excited to get a hold of it. If you are looking to upgrade ubuntu, there is a quick guide down below. If like me you are already running Ubuntu 18.04 LTS then you might be interested to learn how to upgrade your current version of the distro to 20.04 LTS. ...

April 21, 2020 · 3 min · Tom

Setup the Nextcloud Snap Package with HTTPS and a separate data path

https://snapcraft.io/nextcloud I have been using the Nextcloud snap package for a long time, but some recent system changes in my colocation facility mean that it is time for a big upgrade. Rather than migrate my existing Nextcloud instance, I have decided to build a new install and here are my goals for the new installation: Use lets encrypt to have automatic and valid HTTPS certificates Have the data path for Nextcloud on a HDD and the rest of the host OS on an SSD. Host OS Details For this setup, I am using Ubuntu 18.04 installed on a 30GB SSD backed partition. I then have a 1TB disk attached and mounted to /media. ...

March 29, 2020 · 3 min · Tom

Prevent Screensavers and Lock-screens with Powershell

There might be a number of reasons to want to prevent your windows screensavers and lock-screens from engaging and in some cases (no doubt yours if you have hit this article from a search engine) local policy on the machine preventing you from changing these settings. Powershell lets us work around this problem and prevent the machine from locking or activating a screensaver. Prevent Screensavers and Lock-screens The bulk of the code below has been lifted from this great write up: https://dmitrysotnikov.wordpress.com/2009/06/29/prevent-desktop-lock-or-screensaver-with-powershell/ I just took things one step further by adding an infinite loop. My version of this code will run indefinitely. ...

March 26, 2020 · 2 min · Tom

Backup Nextcloud with RCLONE

I’ve made previous posts about backing cloud services with RCLONE – Backup Google Photos with Rclone – and this post will detail how to backup a self-hosted cloud service, Nextcloud. Get started with Nextcloud There are a lot of benefits to running your own private ‘cloud’ storage system, but for me, my top concern is privacy and Nextcloud gives me the ability to take accountability for my own data. With this in mind, I am conscious of my Nextcloud server going offline or suffering data loss, so I want a way to create 1 or more backups of my datacentre hosted, Nextcloud data on my home NAS. ...

February 27, 2020 · 2 min · Tom