We can control the blue LED with the trigger mode in sysfs. The red LED is hard-wired to the power input rail and cannot be changed.

Turn off

su -
echo none > /sys/class/leds/blue\:heartbeat/trigger

Turn on

su -
echo deafult-on > /sys/class/leds/blue\:heartbeat/trigger

Heartbeat (original state)

su -
echo heartbeat > /sys/class/leds/blue\:heartbeat/trigger

There are many other trigger modes. But some of them may not work.

cat /sys/class/leds/blue\:heartbeat/trigger 

If you want to turn the LED off automatically in boot process,
add echo none > /sys/class/leds/blue\:heartbeat/trigger in /etc/rc.local file