I really don't think of this as a technique, but rather as a part of natural life. Here is what you can do. Before entering the faculty IRL there is a benefit in making your eyes strong beforehand.
1. Take a piece of paper. Make a dark spot in the middle of the paper and pin it up on the wall in the same height of your eyes. Now stand 2-3 ft. away and fix your eyes on the spot. Remember not to use any force, but let your eyes almost rest on the spot. It is allowed to blink. When you can do this easily and with your eyes relaxed it is safe to move to the next part.
2. Rest your eyes on the spot from the same distance, but now without blinking. When you blink take a short rest and return to practice. Keep doing this exercise, until you can rest your eyes and hold them still without blinking for five minutes.
3. Lower the paper to fit your eyelevel, when you are sitting.
4. Pin the paper to a wall, go about 50 ft. away. Now fix the spot with your eyes and approach the spot. Stop, when you are 1 ft. away.
When you can do this, it is time to make it into a permanent habit. In the beginning you will forget to keep your eyes still on an object, but suddenly remember it again. That is fine. In time the habit will get fixed.