Arduino Yun already has a way of uploading sketches over network directly from IDE. It has an auto discovery mechanism allowing to detect board on local network. But if you want to upload sketches from anywhere in Internet then you need to go a bit different way. Lucadentella prepared Youn sketch uploader which allows to flash Arduino Yun from webpage which can be accessef from anywhere internet if needed.
This might be a handy feature when your devices are remotely deployed and when you need to upgrade software, all you have to do is to send new .hex through password protected web page. Project files are available on Github repository.