Text this: Scattering equations formalism for QCD and supersymmetric Yang-Mills theories