Spread the desired amount of coconut or nuts on a baking sheet and make sure they are spread evenly in one single layer. Use whole nuts or halves and chop after toasting if needed. Bake in the oven until just golden and very fragrant, 5 minutes for coconut and 8 to 10 minutes for most nuts.
Using oven mitts or pot holders, carefully remove the baking sheet from the oven and transfer to a wire rack to cool.
Use as desired or store in an airtight container, preferably in a cool location. Nuts will keep up to 2 weeks after toasting. Coconut usually gets less crispy after a day or two.
Whole nuts are best for toasting, though halves are okay, too. If the pieces are too small, this timing will be wrong and the nuts can easily burn.