Ubuntu 19.10 - How to upgrade python 2.7 to python 3.7

Much to my surprise, I found that a fresh install of Ubuntu 19.10 was set to use python 2.7 as the default python instance. I have covered changing the default version of python in Debian, however for those looking to Google for a quick fix on Ubuntu 19.10, I hope that this reaches you well. This was tested on a completely fresh install of Ubuntu 19.10 with no other alterations made prior. ...

November 24, 2019 · 2 min · Tom

Getting started with Python 3 - a beginner's cheat sheet

Python.Org I have been getting started with python 3 – I want to make this my primary scripting language. One way I like to assist myself whilst I learn the rope is to maintain a crib sheet filled with all the trivial things I would otherwise forget. Python 3 Cheat Sheet #Define Variables programming_languages: "Python", "VB", "C++", "C#" #Print Variables print(programming_languages) print('--------------------') #Basic for loop + variables for language in programming_languages: print(language) print('--------------------') #Basic Function def FuncExample(): i: 1 for language in programming_languages: #Concatinate Strings and Integers in print statements print("Language " + str(i) + ":" + language) #Increment Integer i += 1 FuncExample() print('--------------------') #Functions with Variables #1 - Strings def FuncVarExample1(fname, lname): #Print with CRLF print("First Name: " + fname + "\r\n" + "Last Name: " + lname) FuncVarExample1("Joe","Bloggs") print('--------------------') #Functions with Variables #2 - Integers + Returning Values def FuncVarExample2(x, y): #Basic integer maths return x+y #Concatenating Strings and Integers print("33 + 42: " + str(FuncVarExample2(33,42))) print('--------------------') You can also find more code snippets here: https://exitcode0.net/code-samples/ ...

November 23, 2019 · 1 min · Tom

Clipboard and Shared Folders on Kali Linux with VirtualBox

I spent more time that care to admit trying to setup a shared folder between my windows host and Kali VirtualBox VM. So hopefully the Google algos pick this one up and save you the time trying to find the right packages to fix this a clipboard sync. apt-get update apt-get install -y virtualbox-guest-x11 Go for a quick reboot once the above commands are complete and you should have clipboard sync (text) and shared folders should mount successfully. ...

November 21, 2019 · 1 min · Tom

[SOLVED] - Running Docker on a Raspberry Pi 4

The Raspberry Pi 4 has now been released offering up to 4GB of RAM! All of the horsepower required for an excellent lower power, docker host. However, there are currently issues undergoing work which prevent docker from running on the only Rasbian image currently available for the Pi 4 – ‘Rasbian Buster‘. Details of these issues can been found here on the GitHub thread – https://github.com/docker/for-linux/issues/709 Current Working Solution Fear not, for there is a simple way to fool your docker installation and successfully getting it to run on the Pi 4. ...

July 10, 2019 · 1 min · Tom

Changing the default python version in Debian

In a previous post, I explained how to upgrade from Python3.5 to Python3.7, however is is still the case in most fresh Debian installs that the default python version is 2.7. This post is going to show you the simple steps you need to take when changing the default python version in Debian. This guide is based on a Debian 9 installation, but work for multiple releases. Check you default version First we need to check our current default version of python. This is the version of python that you Debian OS will try to execute python scripts with unless otherwise specified. ...

June 17, 2019 · 2 min · Tom

Using a DHT11 sensor with a raspberry pi

This post is going to share how to use DHT11 sensors with a the raspberry pi , using the GPIO pins. Furthermore the particular sensor that I am going to be discussing requires zero soldering and is purely plug and play. The Sensor: The sensor that we will be using is the DHT11 – the exact variant is the 3 pin version. You can find the exact version that I used here ...

February 24, 2019 · 1 min · Tom

Double NAT port forwarding with a Fortigate

If you are unfortunate enough to have to deal with double NAT on your gateway then you might know the troubles surrounding portforwarding or VIPs. Here is a quick how to guide for setting up a port forward on a Forgate where double NAT is inplace. Case Study – Plex port forward Plex is a great tool for managing your personal media collection and it gets even better when you enable a port forward to let you access this collection from anywhere in the world. Whilst Plex ahve made a number of changes to allow you to reach your contect via a relay server, the best way to access your content from outside your LAN is by using a port forward. ...

February 23, 2019 · 1 min · Tom

Debian 9 - Running a python script at boot

There are a number of ways that you can run a python or bash script at system start but I am about to show you possibly the easiest way, using crontab. First you need to make that your script is executable and can run unattended. Then you need to login as the user your wish to execute the script as and edit the crontab file: crontab -e If this is your first time editing the crontab file, you might be asked which editor you wish to use – I chose nano. Once in the crontab file add a new line at the bottom of the file; it should look something like this ...

February 21, 2019 · 1 min · Tom

Debian 9 - How to upgrade python 3.5 to python 3.7

I recently spent 30 minutes figuring out how to upgrade to python 3.7 and subsequently pip version on a fresh install of Debian 9. I ran into a number of issues doing this so I though that I would put this quick post together to make this a little bit less complicated for anyone else trying to this. This post relates specifically to python version 3.7.3. Although the generic commands should also apply to earlier versions, but your milage may vary. ...

February 19, 2019 · 2 min · Tom

Creating a local DNS server with Pi Hole

This is a local DNS server for local DNS requests. This post is going to explain the why and how I created a local DNS server in my home network environment. I used the PiHole project to make a network wide advert blocking a reality. https://pi-hole.net/ I have previously created a DNS server using Bind, running on CentOS 7. Thankfully digital ocean came to my rescue with some of the config in this home lab project, so be sure to check out their guide if you are looking for slightly higher level DNS setup: https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-private-network-dns-server-on-centos-7 ...

February 16, 2019 · 2 min · Tom