It is very nice to be/being with you.
It was nice to see/seeing you.
It is dangerous to ride/riding with a drunken driver.
He was drunk. It was dangerous to ride/riding with him.
May I ask what's the difference using "to do"/"doing" in the above examples? Thank you!!