Toasting chopped almonds
The main difference to the linked question is that we are talking about chopped nuts (pecans or almonds isn't much of a difference, the same principle applies) and only a small amount.

You could fire up your oven, but chopped nuts tend to dry and burn much quicker and for a tiny amount like 1/4 cup, heating up the oven sounds like overkill. You can use the oven method described here, but need to watch like a hawk to prevent scorching them. But for a small amount, a pan is just fine.


So get a small frying pan (non-stick would be good here but not mandatory) and heat it on medium heat on the stove. Do not add oil or anything else. 
Add the copped nuts and keep stirring or flipping until they are fragrant and some start getting darker. Use your nose and eyes to determine when they are done.
As soon as your nuts have reached the desired roasting stage, remove them from the pan and pour them on a cool plate.