Also check out Rove.io (formerly called Hospice.io)
Basically, I code in OS X (sublime text), but the environment the code is run in is essentially Ubuntu (or whatever nonsensical CentOS slow ass thing that I may have to deploy for)
Ah I see, very cool. You mentioned something about Gtk and Cairo — do you ever interact with the VM graphically, or do you only use it as (what amounts to, I suppose) a networked Linux sandbox running inside OS X.
Also, how do you push code to the instance to run/deploy the code?
Vagrant mounts a filesystem at /vagrant on the guest vm with the contents of the folder where your Vagrantfile is. Typically this means you include a Vagrantfile in the root dir of your project, and then your entire project folder is available on the guest box.
I strongly suggest investigating the NFS mount option for this feature if you're using Virtualbox, as the performance difference is substantial over Virtualbox shared folders (which is the default for the /vagrant mount).
I've not tried running anything graphically. My previous machines for the past 7 or so years have been linux. I have my own bootstrap scripts for Python and R and some of the libs require RGtk2 and stuff, which couldn't really work on OS X without a lot of fiddling (but installing them on Ubuntu machines were a breeze).
So when my bootstrap scripts failed, I ran them on a Vagrant based instance instead. Problem solved.
Both. Vagrant creates a virtualbox vm and does the appropriate networking bits to let you ssh into it easily. Even does portforwarding so you can easily reach webservers on the vm on an easy to remember port # from the host (ie localhost:8080 is vm1, localhost:8081 is vm2, etc)