(Numbers 34:1–2:) "And the LORD spoke [unto Moses, saying]: Command the children of Israel, etc., when you come into the land of Canaan." This teaches that the Holy One, blessed be He, showed Moses all that had been and all that was destined to be. He showed him Samson standing forth from Dan, and Barak from Naphtali; and likewise every generation and its expounders, every generation and its sustainers, every generation and its sages, every generation and its wicked, every generation and its righteous.
Moses Shown Samson and Barak and Every Generation's Leaders
Midrash Tanchuma Buber, Masei 3:1
וידבר ה' [אל משה לאמר] צו את בני ישראל וגו', כי אתם באים אל הארץ כנען (במדבר לד א ב). מלמד שהראה הקב"ה למשה כל מה שהיה, ומה שעתיד להיות, הראה לו שמשון עומד מדן, וברק מנפתלי, וכן כל דור ודורשיו, דור ופרנסיו, דור וחכמיו, דור ורשעיו, דור וצדיקיו.