One answer to this is #UlyssesPacts: making binding commitments to do right before you are tempted. Throw away all your Oreos when you go on a diet and you can't be tempted to eat a whole sleeve of them at 2AM. License your software under the #GPL and your investors can't force you to make it proprietary. Set up a #WarrantCanary and the feds can't force you to keep their spying secret: