Kevin Osborn implemented in a sketch the protocol normally used by IDE to program Arduino via its bootloader.
The first project using it (BootDrive) allows you, with an Arduino connected to an SD card, to read from it a new compiled file (program.hex) and to program it on a second Arduino; everything without the need of a computer:
Surely a very handy tool to program your Arduino on-the-fly!