How to Flash SD cards on Mac

This guide shows you how to flash SD cards to mount files, specifically .img files for Raspberry Pi, Android TV Shield, and any other device. Make sure your SD card is empty. If not, you can use Mac’s disk utility application to erase the contents of your SD card.

1. Plug in your SD card and verify that your SD card is attached by typing in:

diskutil list

Keep track of which path is your SD card because if you enter the wrong path, you can do irreparable damage to your computer.

In my case, “/dev/disk2” is the path to my SD card.


2. Now type the following command to unmount the SD card:

diskutil unmountdisk


3. Navigate to the directory of the file you want to flash and type in:

sudo dd if= of= bs=8m

note: bs is the block size of bytes to write or read. You can put (almost) any number here. I just did 8.

Also, your terminal will look like it’s not doing anything. This is normal, and you may have to wait a while before you get any output on your screen.

How to transfer files from Mac to Android

On Mac, Android does not automatically allow you to transfer files. Unfortunately, you’ll need an extra program to transfer files from your Mac to Android devices. One of the programs that allows you to do this is called Android File Transfer.

1) Download Android File Transfer.

Screen Shot 2015-07-28 at 11.08.46 PM

Hit the green Download Now button.


2) Open the downloaded androidfiletransfer.dmg

Screen Shot 2015-07-28 at 11.09.49 PMDrag and drop Android File Transfer into the Applications folder.


3) Open Android File Transfer.

Screen Shot 2015-07-28 at 11.10.23 PM

At this point, Android File Transfer should be inside the Applications folder. Simply double click the application.


4) Connect your Android device to your computer.

Screen Shot 2015-07-28 at 11.12.52 PM

Your Android device should be automatically detected. You can drag and drop files from your Mac to your Android device OR from your Android device to Mac. Simply highlight or hold CTRL and click on the files that you want to transfer. Drag and drop between devices.

How to take Screenshots on Mac

There always comes a time where you just have to take a screenshot on your computer especially on a Mac. Luckily, Macs even have an integrated shortcut for screenshots! It’s stupid easy and especially useful because of the multiple options.

By default, your screenshots will be saved to your Desktop with the date as its name.


The Full Screenshot

Command (⌘)-Shift-3

The command takes a full picture of your desktop.

Screen Shot 2015-07-10 at 2.43.26 AM
Example full screen shot


Partial Screenshot (Drag method)

Command (⌘)-Shift-4

Move the cursor to where you want to start taking the screenshot, click, hold, drag, and let go at the ending area where you want to stop the screenshot.

Screen Shot 2015-07-10 at 2.43.34 AM
Example partial screenshot


Window Screenshot

Command (⌘)-Shift-4

Then, press:


Click on a window with the camera icon that appears, and you will take a screenshot of that window.

Screen Shot 2015-07-10 at 2.43.46 AM
Example window screenshot

Those are the main three ways I use screenshots on Mac. It’s super easy and with perfect shortcuts.

How to Install Cassandra 2.1.6 on Mac OS

Cassandra is a useful NoSQL database management system with praise for its high availability. Let’s demonstrate how to install Cassandra 2.1 on Mac OS X.

Step 1) Install the Oracle Java Development Kit (JDK)

On Macs, you can easily download the corresponding dmg file and install.

After installing, check that you have installed the JDK.

Step 2) Install Cassandra

Make a directory for your Cassandra package and change directory into it.

Download the latest Cassandra tar file into the directory you just made.

At the time of writing, 2.1.6 is the most stable release.

Extract the file.

Set a symbolic link from the newly extracted folder to a conveniently named cassandra folder in your packages directory.

Step 3) Cassandra directory configurations

We’ll use some convenient Cassandra configurations to store logs, data, and cached files.

We will edit the ~/opt/cassandra/conf/cassandra.yaml file to accommodate the folders that we just created. Configure the following settings. Erase the # on each.

4) Add Cassandra to PATH

Open the bash profile.

Add Cassandra to PATH, so you can call cassandra from anywhere.

Load the bash profile.

5) Run Cassandra

Start Cassandra. Cassandra should run with a long log record.

CTRL-C to close Cassandra, but let’s not do that right now. Instead, open a new terminal. You can log into the Cassandra shell in the new terminal as long as Cassandra is running.

You can run commands within the Cassandra shell, which looks like:

Cassandra is successfully installed and usable!