My collision code is in Rust, actually. Pretty funny.
Capsule-plane collisions are pretty simple, simple enough that I can outline here. The first thing you want to do is find the sphere on the capsule to perform the test on, call this time t_X. Create a line from the segment (starts at t_0, ends at t_1) bounding the capsule and determine its intersection point with the plane. If there is no intersection, just set t_x to mean(t_0, t_1), or halfway on the capsule's segment. If there is an intersection, and the time is between t_0 and t_1, set t_x to that time. Otherwise clamp it between t_0 and t_1.
Now you have a sphere and a position (the time t_x on the capsule segment), and you can perform a moving sphere - plane collision.
This algorithm works because the premise - the point on a capsule closest to a plane will always get closer to the plane, unless the capsule is moving away - is sound, as far as I can tell.
For real time collision detection it is sufficient to rotate an object after you have applied linear motion and collision. If you want the rotation to be more accurate you have to divide the timestep.
Moving capsule triangle collision is much more complicated but certainly doable. I would have to describe that algorithm in a blog post or by email (if you want to know more, feel free to shoot me an email). The basic premise that allows for simple capsule plane collisions, that the closest point on a capsule will always get closer, breaks down when the plane is bounded.
Christer Ericson and Gino van den Bergen both have solid and pretty accessible books on collision detection. Christer's Real Time Collision Detection, in particular, is really digestible in bits and pieces as needed for various applications (and he provides code for each example which rocks).
Real Time Collision Detection is great, but leaves almost all capsule collisions to intuition. That was fine for me, but probably pretty unsuitable for people who aren't very good at geometric visualization.
Capsule-plane collisions are pretty simple, simple enough that I can outline here. The first thing you want to do is find the sphere on the capsule to perform the test on, call this time t_X. Create a line from the segment (starts at t_0, ends at t_1) bounding the capsule and determine its intersection point with the plane. If there is no intersection, just set t_x to mean(t_0, t_1), or halfway on the capsule's segment. If there is an intersection, and the time is between t_0 and t_1, set t_x to that time. Otherwise clamp it between t_0 and t_1. Now you have a sphere and a position (the time t_x on the capsule segment), and you can perform a moving sphere - plane collision. This algorithm works because the premise - the point on a capsule closest to a plane will always get closer to the plane, unless the capsule is moving away - is sound, as far as I can tell.