Stop Apple Photos from auto launching in OS X with one command

Petapixel:

If you’re a Mac user and are annoyed that OS X automatically launches Apple Photos every time you connect a device or insert a memory card, there’s good news for you: you can disable the program from launching for all devices with a single command.

I find this change by Apple really annoying in particular because, every time you format your memory card (which I do often), OS X/Photos (an app I’m never going to use but can’t delete – thanks Apple!), forgets and treats it like a new device. So being able to kill this activity using a Terminal command is a Godsend.