Place cucumber or sweet peppers in a medium heat-proof bowl; set aside. Combine vinegar, sugar, and spices in a medium saucepan. Bring to a full boil. Pour through a strainer over cucumber or peppers in bowl; discard spices. Let vegetables cool in vinegar mixture for 30 minutes. Cover and chill for 2 to 24 hours before serving.