This is the direct link
This is not my project, so I cannot give details.
I do not know if the speed plays an important role here. I added it to my code. (I interface LSM303)Wire.setClock(400000); // 400KHz
On the first glance the code looks good.
I would try out one of the Arduino libraries like this https://github.com/adafruit/Adafruit_MPU6050. Just the given example to check if the hardware connections are good before writing own code.