In an electric mixer, cream the butter and the sugar at medium speed until very light, 3 to 5 minutes. Add the vanilla and almond extracts, then the eggs, one at a time. Lower the mixer speed and add the flour, mixing just until well blended, no longer. Chill until the dough is firm—overnight, or at least 2 hours.