Virtualbox Bug related to SendFile

I have been doing more web development with Vagrant and VirtualBox. It’s a nice way to keep my dev environment nearly the same as my production environments. Recently I was doing some front-end coding and was running into the most bizarre errors with my JavaScript.

[highlight]It pays to read the documentation. Had I read it more thoroughly, I would have known about this before debugging it and wasting time. Oops![/highlight]

Turns out there is bug with VirtualBox’s shared folder support and sendfile. This bug was preventing the VM from serving new versions of any file in the shared directory. Obviously this is not good for web development.

The solution is easy enough. You just have to disable sendfile in your web server.

In apache:

In nginx:

Update:

The Vagrant documentation does include some information it: https://docs.vagrantup.com/v2/synced-folders/virtualbox.html

Shift – 06_2014

DJ set from “Shift” at Tonic on June 7th, 2014.

Tracklist:

  • Give It To Me (Original Mix) Dirty Channels
  • Diggin’ On You (Solomun Remix) Elekfantz
  • Forget (Original Mix) Patrick Topping
  • Manitox (Original Mix) German Brigante
  • Nightwalker (Original Mix) Raxon
  • Truesoul (Original Mix) Mendo, Danny Serrano
  • She Loves Me (PBR Streetgang Remix) Lula Circus
  • Ice (Original Mix) Sandeman
  • Emperor feat. Kali (Maceo Plex Last Disco Remix) Kali, Ali Love
  • Silhouette Of A Ghost (Original Mix) Ida Engberg
  • Crossfade (Maceo Plex Mix) GusGus Crossfade

Use Ubuntu 12.04 as an Airplay source

I DJ from my laptop, and all of the music I purchase is there. I have my (kickass) M-Audio speakers hooked up to my desktop, however, and sometimes I want to listen to new music while coding without moving around USB cables.

XBMC supports Airplay out of the box, but I don’t really want to run an entire media server just for one feature. Plus, I need the service to run in the background so I can do _work_.

I found a great tool called ShairPort that accomplishes what I need. It is easy enough to get started. On your Ubuntu machine you should install the following dependencies:

Now install shairport. You will need git installed if you do not already have it for some reason.

At this point you should be able to run the app.

To see a list of available parameters, run ./shairport -h.

You should see it show up on your Mac now. Go to System Preferences > Sound > Output. I named mine “roy-ubuntu ShAIRport”

airplay with shairport

I recommend moving the shairport directory someplace, like /opt.

Create a symlink to the app:

That’s it! So far it’s working out pretty well. The defaults for shairport have been fine for me.