Some gradient estimates for the heat equation on domains and for an equation by Perelman