What is the flag outside the gurdwara?

This is the nishaan sahib. It is a triangular flag, either yellow/orange or blue. It serves as a beacon and announces the presence of a gurdwara from afar and also is a sign of spiritual and temporal freedom and sovereignty. The symbol on the nishaan sahib is the khanda and is considered the emblem of the Sikh faith.