Cut the tops off the pineapples and discard. With a large knife, cut the rind off the pineapples leaving as little pineapple attached as possible. Put the rinds in a pot large enough to hold them comfortably and pour in enough water to cover. Bring to a boil over low to medium heat and cook until the pineapple peel is very tender, about 30 minutes. Add water, if necessary, to keep the rinds submerged.
Meanwhile, put the onions, oregano, peppercorns, garlic, habanero or other chile pepper, vinegar, and salt in a large jar with a tight-fitting lid.
Strain the pineapple liquid into the jar. If there is not enough liquid to cover the ingredients, add more water to the pineapple and boil for 20 minutes. Taste and add a little more salt and/or a little vinegar, if you think it needs it. You can use it as soon as it cools, but it will get better as it sits.