Tonight is the holiday of Shavuos. "Shavuos" also means "Vows". Perhaps this is an indication that through "Vows", one can uphold the Torah that we receive on Shavuos.
We read in this week's Parsha "ish ki yafli lindor neder La'hashem" - "a person who separates himself to make a neder to Hashem (to be a Nazir)"... The Holy Chassidic Sefer the Beis Ahron of Karlin writes that "yafli" is an expression of "separating one's self" and that this applies as well to separating one's self from physical desires in any form.
Although making Shavuos and Nedarim are a very stringent matter and are not advisable in general, when it comes to protecting oneself from the Yetzer Hara and making fences to keep away from aveira, we see in the Pesukim and in Chaza"l that this is a commendable trait. As the Pasuk in Tehillim says "nishbati va'akayemah lishmor mishaptei tzidkecha" - "I have sworn and will fulfill, to guard your righteous laws". And another Pasuk says "nishba lehura velo yamir... osei eleh lo yimot le'olam" - "He who swears to stay away from bad and does not break his word... he shall never falter".
The Yetzer Hara knows how to trick us into sinning. He starts with getting us to do something small, to give in just a little bit, and as one starts to fall into the trap, he often can't stop himself from falling further. That's why vows can be so helpful. A person can learn the ways that the Yetzer Hara tricks him, and he can make vows to not let himself be led into dangerous situations where it may very well be too late.
There are many different types of vows a person can use. Each person needs to know his own strengths and limitations. Let no one make a vow unless he is sure he can fulfill it. One can vow, for example, to take a twenty minute walk before he gives in to his Yetzer Hara. This may well discourage him from continuing to fall. Or one can vow not to use the computer when alone in the house. Or he can vow go to the Mikva each time he falls... These types of vows are pretty much safe, because one can know in advance if he is capable of fulfilling them. Using vows in this way is a proven and powerful strategy to ultimately breaking free of the Yetzer Hara's tight grip.
See tips #4, #5 and #6 here for more on the idea of vows and for various approaches.
May we all merit to uphold the wonderful Torah of life that we will receive again on this Shavuos as we swore to uphold it in the desert many years ago with the vow "Nasseh Ve'nishma".