Do Compost:Fruit scraps
Vegetable scraps
Coffee grounds
Eggshells
Grass and plant clippings
Dry leaves
Finely chopped wood and bark chips
Shredded newspaper
Straw
Sawdust from untreated wood
Do not Compost:Anything containing meat, oil, fat, or grease
Diseased plant materials
Sawdust or chips from pressure-treated wood
Dog or cat feces
Weeds that go to seed
Dairy products
To make your own hot-compost heap, wait until you have enough materials to make a pile at least 3 feet deep. You are going to want to combine your wet, green items with your dry, brown items. Start building your organic compost pile, alternating brown and green items. If your compost pile looks too wet and smells, add more brown items. If you see it looks extremely brown and dry, add green items and water to make it slightly moist.
Sprinkle water over the pile regularly so it has the consistency of a damp sponge. Don't add too much water, otherwise your pile will become waterlogged and drown.
Stir it up once a week.
On your other question,
You can put your compost pile in the sun or in the shade, but putting it in the sun will speed up the composting process. Sun helps increase the temperature, so the bacteria and fungi work faster. This also means that your pile will dry out faster, especially in warm southern climates. So for me a 50/50 mix of Sun and Shade.
Hope this helps.