Always put coffee grounds in the compost, and also amend the soil around certain plants with it. I use it to kill mosquito larvae in the cups of my bromeliads as well. Just a pinch or two every couple of weeks keeps the water juiced up so those little wigglers just exhaust themselves.
Also I have a big Staghorn fern up in one of my oak trees and one of the local sages said to toss a handful of spent coffee grounds up there for it once in a while. I did it one time and 'disturbed' a squirrel who was napping on the fuzzy center of the fern.
(I have a constant battle with squirrels around here).