How does the government attempt to encourage positive externalities

How does the government attempt to encourage positive externalities and limit negative externalities? Give two examples of each.