1 St. Tr. (N. S.) 484.
Trial of Hunt and others (King v. Hunt) (1820)
“I know no method to secure the repeal of bad or obnoxious laws so effective as their stringent execution.”
1860s, First Inaugural Address (1869)
Context: Laws are to govern all alike — those opposed as well as those who favor them. I know no method to secure the repeal of bad or obnoxious laws so effective as their stringent execution.
Help us to complete the source, original and additional information
Ulysses S. Grant 177
18th President of the United States 1822–1885Related quotes

“The best way to get a bad law repealed is to enforce it.”
Attributed in A Dictionary of Thoughts (1908) by Tryon Edwards; this is earlier attributed to Theodore Roosevelt in Life of William McKinley (1901) by Samuel Fallows, and could be derived from the remarks of Ulysses S. Grant in his First Inaugural Address (4 March 1869): "I know no method to secure the repeal of bad or obnoxious laws so effective as their stringent execution".
Misattributed

Article 9
"Declaration of Rights" http://knarf.english.upenn.edu/PShelley/declarat.html (1812)

Speech to a banquet of the Merchant Taylors' Company, London (10 May 1886), quoted in The Times (11 May 1886), p. 12
1880s

§ 13
1780s, Memorial and Remonstrance Against Religious Assessments (1785)
Context: Attempts to enforce by legal sanctions, acts obnoxious to so great a proportion of Citizens, tend to enervate the laws in general, and to slacken the bands of Society. If it be difficult to execute any law which is not generally deemed necessary or salutary, what must be the case, where it is deemed invalid and dangerous? And what may be the effect of so striking an example of impotency in the Government, on its general authority?

“There are no good laws but such as repeal other laws.”
Statement (1835), as quoted in Andrew Johnson, Plebeian and Patriot (1928) by Robert Watson Winston.
Quote

1830s, The Lyceum Address (1838)
Context: When I so pressingly urge a strict observance of all the laws, let me not be understood as saying there are no bad laws, or that grievances may not arise for the redress of which no legal provisions have been made. I mean to say no such thing. But I do mean to say that although bad laws, if they exist, should be repealed as soon as possible, still, while they continue in force, for the sake of example they should be religiously observed. So also in unprovided cases. If such arise, let proper legal provisions be made for them with the least possible delay, but till then let them, if not too intolerable, be borne with.

“The method of guessing the equation seems to be a pretty effective way of guessing new laws”
The Character of Physical Law (1965)
Context: …Dirac discovered the correct laws for relativity quantum mechanics simply by guessing the equation. The method of guessing the equation seems to be a pretty effective way of guessing new laws. This shows again that mathematics is a deep way of expressing nature, and any attempt to express nature in philosophical principles, or in seat-of-the-pants mechanical feelings, is not an efficient way.