Use "nasty habit" in a sentence

1. Life has a nasty habit of repeating itself.

2. Ray has a nasty habit of raiding the icebox late at night.