For those of you who have a tendency to leave your door/gate open for whatever reason, you can get a time-delayed door alarm such as this wireless one from GE.
Of course, you can always build yourself one with a bit of soldering and parts from your local Radio Shack. You can follow the directions here on how to make your own time-delayed