Dock a ship to a station or align it to "Standard Grid" by pressing 'c'.
(Slight deviations from Standard Grid result in the unwanted behavior. I recommend using docking.)
Build a Rail facing any direction and any weapon with a hooked up Push effect 100% pointing at the point, where the Rail Docker will be, coming from any direction.
Use the 'Create Docking' Tool and build a core so that the push effect is applied at the center of gravity of this ship.
Use a Button which is connected to the Rail and to a Delay Block. The Delay Block is connected to the Weapon Computer.
Rules for Core orientation of the pushed Ship:
1. Top and bottom of core always need to be equal or reversed to the top and bottom of the "Standard Grid".
2. a) Push from top or bottom: core can face to the front/back and to the sides.
b) Push from sides or front/back: core needs to face to the front or to the back.
If 1. and 2. a),b) are present, the push will be applied correctly.
Else it will be applied together with a rotational component.
All bad directions have a specific rotational component.
I uploaded my testing ship as reference
{F6498}