1 pound green beans, stem ends trimmed
2 teaspoons extra-virgin olive oil
2 tablespoons chopped peeled hazelnuts or walnuts
1/4 teaspoon salt, or to taste
Freshly ground pepper to taste
Cook beans in a large pot of boiling salted water until just tender, 5 to 7 minutes. Drain.
Heat oil in a large nonstick skillet over low heat.
Add nuts and cook, stirring, until golden, about 1 minute.
Return the reserved beans to the pot and toss to coat.
Season with salt and pepper.