Spot the Signs. Do you have a good relationship with your manager? Is he or she relatively reasonable? Do you have regular one_on_ones where you talk about your career goals and growth? If so, it's likely that your boss will accept your resignation with grace, help develop a plan of action for your last two weeks, and maybe even attend your farewell happy hour.
However, I'm happy to help out however I can in the next two weeks." If you haven't landed a new gig yet or your new start date is negotiable, know your limits. If you're willing to stay an additional three weeks, for example, don't let your manager talk you into staying three more months.