Special equipment: four 8-ounce jam jars, cleaned and dried
For the yellow cake: Preheat the oven to 350 degrees F. Beat the butter and sugar until light and fluffy in a medium bowl. Add the eggs one at a time, beating in between additions. Add the vanilla and beat until well mixed.
Whisk the flour, baking powder and salt in a small bowl. Add half the flour mixture to the butter mixture and mix until incorporated. Mix in the half-and-half. Mix in the remaining half of the flour mixture.
Spray the jars with vegetable nonstick spray. Fill each jar about halfway full with batter. Place the jars on a baking sheet and bake until the cake springs back from a gentle touch, about 25 minutes.
Meanwhile, for the chocolate ganache: Boil the half-and-half in a saucepan. Add the chocolate. Let the ganache sit for 5 minutes, and then whisk until smooth.
Once the cakes are cooked, remove from the oven and cool, 1 to 2 minutes. Spoon the chocolate ganache on top. Top jars with vacuum-seal lids. The heat of the cakes will create the seal as the cakes cool.