I have 2 algorythms for you: first: corners
R' F R' B2 R F' R' B2 R2
Run this algorythm with the two "right" corners facing away from you (twice the same color) If there are no "good" corners run it once, turn the U layer clockwise and run it again
and edges:
L2 U F' B L2 B' F U L2
run this with the 3 edges you want to cycle pointing to the left (you might have to do this twice, and if no edge is positioned right you have to run the alg, turn the U layer once and do it again