bring tm30, passport, a passport photo, get the passport photocopied at the shop on the same floor, get 3 forms at the counter. bring a pen along. go early in the morning to avoid getting stuck there the whole day.
if you go cambodia and back on the same day, the cam immigration might deny your exit as they might require you to stay 1 day. tourist visa can only be from thai embassy in other country, not in thai. you might be able to get 30 days extension at your local immigration with passport, a passport photo, tm30.