In a small saucepan, heat water, vinegar, sugar, and salt. Bring to a boil. Meanwhile, in a 16 ounce mason jar, place garlic, dill, peppercorns, and chili pepper in bottom. Stack cucumber slices in the jar. Pour boiling vinegar mix on top. Let cool completely, cover and store in fridge. Cucumbers are ready to use in about 30 minutes (once cool) but will have more flavor the longer they sit - I recommend a couple of hours.
ONION:
In a small saucepan, heat water, vinegar, sugar, and salt. Bring to a boil. Meanwhile, place the peppercorns in the bottom of an 8 oz. mason jar. Stack thinly sliced red onion in the jar. Pour boiling vinegar mix on top. Let cool completely, cover and store in fridge.