Extend a (not LVM) partition to use full space of the SDcard

We will use the fdisk utility to delete the too small partition and then recreate a bigger one, making full use of the SDcard space. After what we will resize the file system. All the details are explained here, and below is the set of commands (Credits to mdrjr):