-- How to task villager so that it repairs buildings
Use 'Task Object'. If the building is damaged, the villager will repair it, if its not, the villager will just walk up to it. If you want him to repair the building every time it happens to get damaged, loop the trigger. If you are not talking about a specific building, but just tasking a villager to be a repairer in general, that would be a question for AI scripters.
-- How to make infinite forage
Loop a 'Create Object' trigger to create a forage bush. Every time it gets consumed, another will appear. However, you cannot use triggers to task villagers to bushes that don't exist yet. Again, that would have to be handled with AI.
-- Changed starting view
See Al_Kharn the Great's answer.
-- How to garrison units into a tower
You can place units into a tower in the editor, but computer players will always ungarrison them immediately (except for kings).
-- How to make it so that you don't share allies view
See other answers.
-- How to keep trade carts from moving
See HockySam18's answer, as that it the most common; however, Lildbehr's answer is good too if it suits your needs.
-- I want to use an invisible farm to farm hay. How can I get that to work?
This is a more advanced trick. I have gotten it to work on occasion, although nobody here seems willing to answer questions I've had about it :P Are the secrets of invisible farms lost to the past?
This is what I've used with sporadic success:
Invisibility Cloak
You need aokts. Place a farm, and task a villager to farm it. Then place a ram, and save the game. Open it in TS, garrison the farm into the ram, and then the ram into itself. Save. You should then have an invisible farm, then you can change the terrain, and add some hay stacks or whatever you want.
It doesn't always work for me (sometimes the farm terrain reappears). If anyone knows why, please tell me in my thread: Invisible Farm not Invisible