Open a new window with:
Width:2pixels Height:2pixels
Resolution: 72 pixels/inch
Mode: RGB color Contents:Transparent

Zoom in the window, so that it is big enough for you to see. Next, select the half of the image. [you can do it by setting Rectangular Marquee Tool (M) to Fixed Size, Width:2px Height:1px]. And fill it with grey, ALT+Backspace. Finally Deselect - Ctrl+D.
Now Select all the image - Ctrl+A, and go to Edit > Define Pattern Once you click you will see your pattern you have just created. Name it and press OK. We have finished the first part.
Open any image you like. We are going to apply the effect on it.
Select the Paint Bucket Tool (G).