A ziploc bag in the freezer (squeezed to get as much air out as possible) will last pretty well. A couple of months, no trouble at all. Longer than that and you'll loose some bittering potential, but this is a gradual process. After six months they'll still be usable, just not as bitter as they originally were.
There are a number of good ways to use up small quantities of random leftover hop varieties:
- The obvious one, if you later brew another recipe that calls for the same variety.
- Slip in small amounts of some leftover variety to add complexity. For instance if I'm brewing an IPA that calls for 4 oz of Cascades, but I also have 1/2 oz Saaz in the freezer, I might just throw those in as well for luck (works best with hoppy beers where an extra half oz of something different won't throw off the overall balance too much).
- If you're brewing a recipe that only uses bittering hops, the variety doesn't make too much difference, so you can use pretty much anything you have left over. For instance I just brewed an oatmeal stout that called for 30 IBU of bittering hops, but no aroma or flavor additions. I had an ounce of Goldings left over from a Saison, and 3/4 ounce of Sterling from a much earlier amber, so in they went. I probably wouldn't have picked Sterling for a stout, but hey, that's what I had so that's what I used (beware of making random substitutions for flavor or aroma additions, though, as that can really change the character of your brew).
btw. if you're dealing with hops more than a few months old, Beer Smith has data for different hop varieties about how much alpha they lose over time, and a handy tool for calculating the results. For instance my Sterling hops started at 7% AA, but lose around 15% in six months, so the calculator shows that after 4 months in my freezer in a bag, they will be somewhere around 6.7% AA. Other varieties degrade much more quickly, so if you're using a lot of leftovers, it's worth looking up the aging rate for your particular variety.