That's what I'll be doing in two weeks.. I started my working career as a teacher, but didn't like it that much as I was teaching smaller kids learning MS Word, Excel and similar tools. Eventually I worked as researcher, finished a PhD and start working as web developer.
But doing crud apps all day got boring pretty fast, and I think my current expertise on web and mobile development will be great for my classes as I'll be teaching older students (MAster's degree). Since I have some freedom on the way I get to teach those students, I'm really looking forward to be really practical (teach them over the command line, etc.), instead of being highly theoretical.