How to easily apply a patch to a drupal module or file

A quick way to apply a patch to a drupal file or module is as follows:

cd locations/of/module/
#or
cd locations/of/file/
wget https://www.drupal.org/files/issues/some.patch
cat some.patch | patch -p1

That's it.

Tags: Drupal modules patch