Here's how I cut a pingpong ball to use as a field diffuser for the pop-up flash on my Panasonic Lumix FZ 1000. The ball just slips onto the pop-up flash.
Note that this is intended as an emergency diffuser I can carry in a belt pack, not as a studio flash system or a substitute for a "real" dual flash or ring flash.
Also note that the ball has cracked a bit in my pack. When I build another one, I may put a bit of epoxy around the cut edge for reinforcement.
Here is a web page of nice flash macro shots in which the photographer shows several DIY flash setups:
Most of these are far too bulky for the kind of field photography I like to do, but may be useful in other situations.