Yes, here it is.
Put the camera on a sturdy tripod
Set aperture to around f/16
Set the shutter speed to around 20 seconds
Focus manually
Turn off the light (must be total darkness of course)
Paint the subject with a small torch or similar light, keeping it moving all the time
That's it.