Disable updating of WordPress plugin or theme

There could be multiple reasons for disabling updates of plugin or a theme. For example, in time constraint, you have reached for desperate measures and edited the source of a third party plugin or theme. Now, that is the practice that is bad on so many levels, but sometimes you just have to deliver in time, no matter what.