Heat olive oil in a medium nonstick skillet. Add the onion and green onions and cook them gently until they are soft and lightly browned. Remove them from the pan and set them aside.In a bowl, whisk the eggs and then add the ricotta. Whisk again until well incorporated with the eggs. Season the mixture generously with salt and pepper and add the fresh herbs and the reserved cooked onions.Set the same pan over medium heat and add the butter. Once the butter melts, pour the egg mixture into the pan. When the mixture starts to set, with the help of a spatula, ease it away from the sides of the pan. Let the frittata cook gently until it is almost set. At this point it should be still a little wet on top.Turn off the heat. Place a large plate on top of the pan. Invert the frittata upside down onto the plate and slide it back into the pan. The heat of the pan will only need 30 seconds or so to finish cooking the top of the frittata.Slide the frittata onto a serving plate. Let it sit for 5 minutes to cool down slightly, cut into wedges or smaller slices and serve.