Generally speaking, the two week notice thing is a courtesy. I don’t know where you live, so you have to check your local laws. In the United States, unless you’re under a contract of some sort, then you have no obligation to give a two week notice. You can just quit.
If you don't oblige the requirements of your contract, whether in the USA or Europe, your employer has a legal right to sue you for consequent damages of your immediate resignation.
Not likely to get sued realistically, though. The real penalty is that the employer could give you a poor reference, which absolutely will lose you jobs.
Generally speaking, the two week notice thing is a courtesy.
In Amerika at least; and in this day and age? Out of the like dozen people I've worked for, only one of those jobs deserved the courtesy of even three days notice. Fuck the bosses; they won't give you two weeks notice when they lay you off.