זֵכֶר עָשָׂה לְנִפְלְאוֹתָיו חַנּוּן וְרַחוּם ה'
He made a memorial for His wonders; G-d is gracious and compassionate.
What memorial did G-d make for His wonders? According to the Rashi, this refers to the Jewish calendar. Shabbos causes us to recall Creation, and the various holidays cause us to recall the miracles that G-d performed for us at various times. He did all of these things for us because He is gracious and compassionate. (This verse is one of the Zichronos recited on Rosh Hashana.)