In most countries untried it is illegal... But if you crack open the power supply and remove the "Y" capacitor (usually the only bright blue component in there), these shocks won't happen anymore.
The downside is your MacBook might start giving out radio frequency interference...