The trick I play when there isn't deuterated solvent in my sample is to fill an NMR tube with deuterated solvent of the same kind so that the height is 'exactly' the same as the actual sample, gradient shim, replace it with the actual sample, and then measure. Works pretty good.