Natively Installed Ubuntu On iMac - Switch Back Or To Windows
If you wish to go back to Mac OS permanently, you might be able to restore from the OS X recovery partition if that is still present; hold Command-R while starting up to try and enter Recovery mode. See the short instructions from Apple, or this MacWorld article for a longer description. Please note that some of these options may delete your Ubuntu installation and any files in that OS.

If you departed from your linked tutorial and completely wiped the hard disk to install Ubuntu, the Internet Recovery mode--also described in both links above--may still work. (In fact, the Mac might have been showing you that WiFi connections screen because it's attempting to get to the internet for that purpose.) 

If you want to preserve your dual-boot setup, try repairing the EFI bootloader by reinstalling rEFInd from inside Ubuntu. The process should be very similar to the instructions in your tutorial for installing rEFInd within OS X, as rEFInd's install script is stated to run within either.