wireless network

iPhone/iOS: How to quit using cellular data when using WiFi

I live in Colorado, where cellular reception can be very hit or miss because of the mountains and rolling hills. As just one example there are only two spots in my apartment where I can make a phone call. So when I’m at home trying to view a website using Safari on my iPhone and the page is loading really slow, I find it really annoying that my iPhone is trying to use my cellular data rather than my home wireless network (WiFi).

How to restart Mac OS X networking from the command line

I've been having a problem with my MacBook Air (running Mac OS X Lion) and my wireless router, so today I decided to write a script to restart the OS X wireless networking service from the command line. In short, I use this OS X command to turn off the Mac networking service:

sudo ifconfig en0 down

and I use this command to turn the Mac wireless network service back on:

sudo ifconfig en0 up

(I found these commands on the website I linked to.)