To be honest the quoted thread is useless as the OP never said if he was on a visa or extension.
However, for the OP of this thread, your simple process should be;
Get a letter of termination from your employer, this can be post-dated
Take the letter to Labour and cancel your work permit, (it will be cancelled for the post-dated date).
Take confirmation from Labour to immigration and they will cancel your extension, (again on the post-dated date).
Leave on or before 31 Jan and you are good to go.
🙂