Place ham in the freezer until almost frozen, 3 to 4 hours. Cut it into julienne strips. Set aside.
Fill a large pot with water; bring to a boil. Add beans; cook until bright green, 2 to 3 minutes. Drain, rinse with cold water, and set aside.
Place butter and oil in a large skillet over medium heat. When butter is melted, add onions and garlic; saute until onions are translucent, about 5 minutes. Add green beans, and turn heat to high; saute tossing, until beans are heated through, about 2 minutes.
Add ham, vinegar, sugar, salt, and pepper; saute until ham renders fat, about 3 minutes. Serve hot.