Turn off wifi on your macbook from the Mac OSX terminal command line:
networksetup -setairportpower en0 off
Turn on wifi on your macbook from the Mac OSX terminal command line:
networksetup -setairportpower en0 on
List available wifi networks from the Mac OSX terminal command line: