Make sure jar(s) and lid(s) are thoroughly clean using warm soapy water then rinse well.
To make the brine: Combine 2 cups of warm water, then add 2 cups cold water (or 3 to 1 hot to cold, or 4 cups water) and shake vigorously with lid on.
Prepare the spices (except the salt). Mildly crush the spices in mortar & pestle, and add to a medium saucepan with a few cups water and the salt. Bring to a low boil, stirring until all the salt is dissolved. Let cool to room temperature. (If time is needed, until brine returns to room temperature (this is very important). You can even chill this flavored brine in the fridge.
Lightly wash the cucumbers and any other produce.
Pack the cucumbers as tightly as possible (without bruising them). This is to avoid them rising to the surface. (A fermentation weight is strongly recommended. If weight is used, slightly less brine will go into the jar.)
Add the garlic, bay leaf, and dill to the jar(s). Push down dill to keep from floating.
If desired, add a pinch or two of red pepper flakes (or sliced jalapeño).
Pour spice-filled brine into the jar(s) until filled to about 1" from the top. Add more weight and make sure that everything is submerged. If no weight is used, make sure the brine covers the vegetables by at least ¾" from the top. (If you don't use all the brine, you can strain out any remaining dill spices and add them to the jar.)
Apply a fermentation lid / airlock or alternatively, you may simply use the lid which comes with the jar(s), but this needs to be "burped" (lid briefly released) gently every day for the duration of the ferment.