I realize you can buy special jigs like the above products but this tip has worked for me for the last 40 plus years.
First off you can use anything you can get your hands on trust me on this. any item that is straight and long will work, including broom handles, 2 X 4's, 4 x 4's., 1 x 2 's, long angle iron, steel pipes, metal rulers, wood rulers, T-squares, levels, long dowl rods, square rods, round rods, or anything else you can get your hands on.
Now comes the tip part you will need two very good clamps, not heavy clamps but two strong clamps. lay down the item that you picked and clamp one side down good and tight (be sure to measure first. walk over to the other side and measure then move the item in question and tighten down with the second clamp; do not forget to measure again.
Then cut all day long and you will have straight lines each time. Just make sure you clamp things down good and tight. trust me I have used everything under the sun and I never had a bad cut.
Hope this helps you out.