I recently purchased a Raspberry Pi 2. I needed to put the OS on the SD card I had gotten. I don’t want to forget how I did this, so I’m writing it down.
openssl sha1 /path/to/file.zip
FAT32
diskutil list
sudo diskutil unmount /dev/disk2s1
(Repeat as needed for all partitions).img
file.sudo dd bs=1m if=/path/of/img/file.img of=/dev/desk2
(Whatever disk it is. There is no progress bar so depending on your hardware this can take some time. Be patient.)