Roughly translated is that will teach you / tough luck
Also see 'That'll Harden Ye' and 'That'll tighten ye'