You shall set up judges and enforcement officers for yourself in all your gates . . . (Devarim 16:18)
From the seemingly redundant inclusion of the words “for yourself” in this verse, the Shela understands that the Torah is telling us that the Jewish People not only had to set up physical protection around their cities, but that each individual must place personal safeguards upon himself.
Namely, “judges” refers to the decision that one makes, and the “enforcement officers” are the means of enforcing these decisions. Furthermore, the “gates” which need protecting refer to parts of the body that are constantly facing external challenges.
Essentially, the Shela is telling us something very simple to understand but very difficult to put into practice: the importance of using one’s brain to make decisions and then to ensure that these decisions are enforced by strong willpower, and not overcome by one’s base desires. Indeed, explains the Kuzari, it is this strength of character alone that defines someone as being “devout” — someone even greater than a tzaddik!
Someone known to have incredible self-control in the minutia of every movement was Rav Elyashiv. In fact, the chief psychologist of the Israel Air Force once saw Rav Elyashiv at a wedding without knowing who he was, and could not take his eyes off him. When questioned why he was staring at the ‘stranger’ who had just walked into the room, he responded, “I have never seen anyone display such self-control in my entire life!” The moment when Rav Elyashiv’s life changed, explained the Rav himself on several occasions, was when he was a young man and the world-class Chazzan Yossele Rosenblatt was performing in Yerushalayim. Excited to hear the famous cantor, Rav Elyashiv made his way to the concert. But along the way, Rav Elyashiv had a thought: is my going to the concert going to further my relationship with Hashem more than sitting with a Gemara for the next few hours? As difficult as the decision was, Rav Elyashiv knew the answer. He turned around and headed back to the Beis HaMedrash. Years later, Rav Elyashiv would credit his great success in self-control and Torah to that decision.
Self-control in every action may be far beyond us, but if we at least evaluate whether our decisions are coming from our brain or our instincts, and then try to apply self-control when necessary, then we will be one step closer to achieving a level even greater than a tzaddik.
 Rashi, who introduces the simplest interpretation of the Torah translates “gates” as “cities”. The Shela is understanding from the unusual choice of word, that the Torah is hinting to something deeper. Specifically, the “gates” refer to the body’s orifices and thus require further protection. See the Shela Hakadosh (Parashas Shoftim, 32) for a list of each “gate” (orifice) and the correlating protection required.
 Specifically, a “chassid.” Sefer Kuzari, essay 3:2-5.
 Mesillas Yesharim, ch. 13.