NSW parliament is expected to pass new hate speech and gun laws in the wake of the terrorist attack at Bondi Beach.