You can hack your brain to form good habits — like going to the gym and eating healthily — simply by repeating actions until they stick.