1. Use the Alfred Productivity App to Drive Spotify

    If you haven’t taken a look at Alfred yet, I highly suggest you do (this ESPECIALLY applies to you Quicksilver users).  On the surface, Alfred can simply help you find things faster, much like Spotlight on steroids.  However, there is SO much more to Alfred than that.  One feature that I was recently introduced to and particularly love is Workflows.  Using Workflows, you can automate things that were once redundant.  The result is a less interruption of what you’re currently working on and thus (hopefully) more productivity.  

    Think about this scenario: you’re right in the middle of some code block, listening to Spotify and the one song that you absolutely cannot stand comes on.  Normally, you’d have to stop what you’re doing, switch to Spotify, change that dreadful song to something else (in some cases ANYTHING else), and then, if you’re lucky enough to not be distracted by Spotify, switch back to what you’re doing and continue coding.  I say “lucky enough” because part of the draw of Spotify is music discovery.  They want you to be distracted and to peruse their catalog.  Don’t get me wrong; this isn’t a bad thing..unless you’re trying to be productive with something that doesn’t include Spotify.  Let’s see how using Workflows can remove that distraction and get you back to coding quicker then you can say, “Call Me Maybe" (yes, I went there).


    Unfortunately, not all of the items needed for this tutorial are free.  However, I highly endorse Alfred and paying for the powerpack is so very worth it.  To get started, you’ll need the following:

    Given that the purpose of this tutorial does not include coding in or installing modules in Python, I’m going to skip those subjects.  However, I have provided some contextual links in case you do not currently know how to do these things and would like to learn.


    Open the Alfred Preferences by either clicking on the sprocket in the search popup or clicking on the menu icon in the top right area of your screen and choosing “Preferences…”.  Click on the Workflows icon in the menu bar.  You should see something like the following:


    At the bottom of the left column, you’ll see a plus icon.  Click the plus icon to open a contextual workflow menu.  As you can see, there are many options to choose from but we’ll be starting with Blank Workflow, so choose that option.  A dialog box will appear which will give you some options for configuring you’re new workflow:


    You can configure all of these at a later time if you wish.  The only one that is required is Workflow Name so type “Spotify” here and click Create.  You will now see your empty workflow listed in the left column.  In the screen capture below, it’s also labeled in the upper left corner of the main area as well since it’s the only work flow and thus is active by default:



    Now it’s time to add some muscle to this beast!  click the plus icon in the upper right corner to add some functionality.  You will notice that clicking this icon shows another context menu, this time showing you the different components available.  Since we want Alfred to listen for a specific keyword, let’s choose Inputs > Keyword from the context menu:


    You’ll notice that a new dialog box has appeared, this time giving you configuration options for the new input component we are adding.  As with the last dialog box, most of this you can configure at a later date. The only value that you must supply is the keyword.  I chose “sp” for mine but you can use anything so long as it doesn’t conflict with another workflow.  Also, make sure that “with spaces” is checked and that the dropdown menu has “Arguments Required” selected.  As we continue you will see why this is important.  When you’re done, click Save.  The Workflow display has updated to show your input component you just added:



    We now have a work flow that is going to listen for a specific keyword.  Unfortunately, it doesn’t know what to do when it hears it so the next step is to add an action component.  Click the plus icon in the upper right corner once more, but this time, choose Actions > Run Script from the context menu:


    Another dialog box appears, this time giving you the options needed to configure the action component.  This component requires a bit more configuring than the last one given what we need it to do.  The first thing you’ll want to do is choose the appropriate language interpreter.  For this tutorial, we’ll be using python, so in the language dropdown menu, choose the python interpreter option (NOTE: you may have your languages configured slightly differently so for that reason, I’m purposely not including a screen capture or a specific label).  For the script that we are going to be using, url escaping should be handled by the script, so you can go ahead and uncheck all of the checkboxes.  Finally, add the script in the textarea.  For the purposes of this tutorial, the script I am using can be found in the Github repo.  When you are done, click the Save button.  Your workflow should now include two components and look something like this:



    There’s one final thing we have to do before we can see this in action; we need to connect the two components.  Hover your mouse cursor over the input component.  See that little nub jutting out from the side of the input component? Click and drag it towards the action component.  As you do, another nub will appear to make the connection.  Once the two components are connect as illustrated below, you should be good to go:


    STEP 5: IT’S… ALIVE!!

    So now it’s time to see if all this work was worth it. First, make sure that Spotify is launched because the script currently does not handle activating the app.  Call up Alfred and type “sp artist pennywise” and press return (NOTE: that the icon shown is generic and there is no name shown for the workflow.  These are configurations we skipped over but you can go back and customize these ‘til your heart’s content):


    If everything was done correctly, you should hear the sonic euphoria of Pennywise.  If this isn’t your cup of tea, then you can try out some of the other commands that are available in the default version of this script which are explained in the README in the git repo.


    If you’re familiar with my blog, then you know I like to take a moment at the end of every post to give thanks to those who helped me or inspired me.  I’d like to thank Tobias Wennergren for not only showing me how freakin’ awesome Alfred is, but inspiring me to come up with something that has improved my productivity.  I hope this post will inspire you to create something just as awesome!  Enjoy!


  2. Use the Alfred Productivity App to Drive Spotify

    Hey gang, I just wanted to give you a head’s up that I’ll be writing a proper tutorial for this but in the meantime, here’s the link the git repo so you can just start digging in yourselves:


    If you have any immediate questions, please ping me and look forward to seeing the tutorial.


  3. Follow Up: Running Your Go Web Server at Boot

    Here’s a quick follow up to yesterday’s blog.  If you want to run your new-fangled Go web server at boot, then follow these instructions here:


    Here’s is the sample linit.d that I created for myself (notice that for start up I’m explicitly calling the Go server application versus just “server”):

    #! /bin/sh
    # /etc/init.d/goServer
    # Provides:          goServer
    # Required-Start:    $remote_fs $syslog
    # Required-Stop:     $remote_fs $syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Start a Go web server at boot
    # Description:       A simple script which will start / stop a Go web server a boot / shutdown.
    # If you want a command to always run, put it here
    # Carry out specific functions when asked to by the system
    case "$1" in
        echo "Starting go server"
        # run application you want to start
        /home/pi/go/bin/server &
        echo "Stopping go server"
        # kill application you want to stop
        killall server
        echo "Usage: /etc/init.d/goServer {start|stop}"
        exit 1
    exit 0

  4. How To Set Up a Simple Go Web Server on a Raspberry Pi

    If you have a Raspberry Pi, one of the first projects you may find yourself doing is setting it up as a web server.  While there are a number of options available for web servers such as Apache, NodeJS and NginX, I thought I’d take a different route today and try it with Go.  If you aren’t familiar with Go, you can go (I promise that’s the last bad pun) to the web site and check it out.  The documentation and tutorials are very thorough which is a huge help for us new Go programmers.  In short, Go is an open source programming language created by Google in 2007 which has quickly becoming a preferred language among technologists due to its ease of use and clean syntax.  As you’ll see, this will be fairly well illustrated here.


    The Go web site offers fairly comprehensive instructions for Linux on the installation process.  However, as you can see, there is no tarball for an ARM processor.  To get around this without having to compile on your own, you can visit Dave Cheney’s web site for a list of unofficial tarballs.  The only thing you’ll need at this point is the url of the tarball that Dave provides.  Please make sure to read his instructions carefully because he has a number of versions available and only one is intended for the Raspberry Pi.


    $ cd /usr/local
    $ sudo wget http://dave.cheney.net/paste/go.1.3.linux-arm~multiarch-armv6-1.tar.gz
    $ tar -C /usr/local -xzf go.1.3.linux-arm~multiarch-armv6-1.tar.gz


    Open your .profile file and add the following three lines to the bottom.  Please note that if you’ve added a .bash_profile file or a .bash_login this file will not be read:

    export PATH=$PATH:/usr/local/go/bin
    export GOPATH=$HOME/go
    export PATH=$PATH:$GOPATH/bin    

    Note that above we set the path of the Go programming language as well as the path to our workspace. You can install Go into a directory other then /usr/local/ if you wish.  Those instructions are included on the Go web site for Linux installs.  Once you’re done, you’ll need to either reboot your Raspberry Pi or simply just source the file (sourcing the file is much quicker):

    $ source ~/.profile

    Once this is done, check to make sure Go was actually installed properly by typing ‘go’ at the command line.  You should see something like this:

    $ go
    Go is a tool for managing Go source code.
    	go command [arguments]
    The commands are:
        build       compile packages and dependencies
        clean       remove object files
        env         print Go environment information
        fix         run go tool fix on packages
        fmt         run gofmt on package sources
        get         download and install packages and dependencies
        install     compile and install packages and dependencies
        list        list packages
        run         compile and run Go program
        test        test packages
        tool        run specified go tool
        version     print Go version
        vet         run go tool vet on packages
    Use "go help [command]" for more information about a command.
    Additional help topics:
        c           calling between Go and C
        filetype    file types
        gopath      GOPATH environment variable
        importpath  import path syntax
        packages    description of package lists
        testflag    description of testing flags
        testfunc    description of testing functions
    Use "go help [topic]" for more information about that topic.


    The Go web site goes into significant detail on the proper directory structure for a Go project which I highly recommend reading.  However, if you’re looking for the “Cliff Notes” version, you can find it here.  Basically, there are three directories that are generally present, only two of which are going to be used today and only one we’re going to explicitly create.  The proper structure ideally should contain a src, bin and pkg directory.  However, we are only going to explicitly create the src directory as the bin directory will be created on build.

    $ mkdir -p $GOPATH/src/github.com/[YOUR_NAME]/server
    $ sudo pico $GOPATH/src/github.com/[YOUR_NAME]/server/server.go

    As you can see above, we created the proper path and associated directories for our web server and opened Pico to edit the server.go application.  I chose Pico, but any terminal text editor will work just fine (my apologies to the Vim loyalists; my skills just aren’t up to par yet).  Now add the following to the server.go file, save it and close it:

    package main
    import "net/http"
    func main() {
      http.ListenAndServe(":1337", http.FileServer(http.Dir("/var/www/.")))

    Yep, it really IS that simple.  We import the net/http package, ask it to listen on port 1337 and return requests from the /var/www/ directory (we’re getting to that step next).


    So far so good; now we just need to create the web directory, add in a default index.html and BOOM, we’re done (almost).  Let’s go ahead and create that directory and add in the index.html:

    $ mkdir /var/www
    $ sudo chown pi www
    $ sudo pico /var/www/index.html

    A couple of notes about the lines above.  We created a directory under /var called “www”.  You can put your web files just about anywhere; this is just my personal preference.  Also note that we chowned (or “changed owner”) on the directory “www”.  this is so that the base user can make changes to the contents of that directory without having to be root.  Once you have index.html open, add in a basic HTML page (I’ve included one below to save time):

    <!DOCTYPE html>
            <title>Raspberry Pi Go Web Server</title>
            <h1>Welcome to my Go web server!!</h1>

    Ok, almost done.  One final step remains between you and Go greatness!!


    If you did everything correctly, you should be able to type the name of your application at the command line and pull it up in a browser (please note your IP address will differ from the one shown):

    $ server

    Now if you open a web browser and type in the IP address of your Raspberry Pi, followed by the port number 1337, you should see something like this:


    Congratulations!  You have officially built a Go web server on a Raspberry Pi.


    As much as I would love to claim that I thought of all of this on my own, that’s simply not the case.  As with many things that are on the web, this was a collaborated effort.  

    I’d like to take a moment to thank Dave Cheney both for having a thorough write up on the unofficial Go tarballs and for making them publicly available.  If you haven’t checked out his web site, please do stop by.  It’s got lots of tips, tricks and genius tucked away between the pages.

    I’d also like to thank Matt Ho who helped me figure out the VERY simple code for the Go web server (trust me, the version I was originally going to “go to press” with would NOT have been this easy or well written).

    As always, please feel free to send me comments, criticisms, corrections and refactors. If they make the process easier, I’ll happily add them in.


  5. Need to Standardize Your Framework Widgets? Try a Builder!

    UPDATE: Some of you have asked how this might work as a jQuery plugin so I created a set of HTML, CSS and Javascript files to illustrate this.  While they aren’t referenced here, they are available in the github repository linked below.

    If you have ever worked on a mid-sized to large-sized site that had heavy dependencies on a front-end framework like Bootstrap or Foundation, chances are likely you had multiple instances of widgets being implemented all over the codebase.  In some cases, if the development team that implemented these widgets was small, the development structure could be standardized.  However, with many teams going full stack these days, the chance for the same widget to be implemented in two different ways, sometimes with different auxiliary frameworks, by two or more different developers becomes much greater.  A solution that I would like to propose is something I call my Abstraction Builder (essentially metaprogramming).

    The main concept to my Abstraction Builder is this: abstract the HTML to a point where it’s as minimal as possible and allow a Javascript builder object to do the manual development, including implementing any auxiliary frameworks as needed, such as for specific use case event listeners.

    Consider the Bootstrap 2.3.2 carousel widget.  Just the basic HTML, without ANY content, looks something like this:

    <div id="myCarousel" class="carousel slide">
    <ol class="carousel-indicators">
    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
    <li data-target="#myCarousel" data-slide-to="1"></li>
    <li data-target="#myCarousel" data-slide-to="2"></li>
    <!-- Carousel items -->
    <div class="carousel-inner">
    <div class="active item">…</div>
    <div class="item">…</div>
    <div class="item">…</div>
    <!-- Carousel nav -->
    <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
    <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>

    It’s easy to see how this can get complicated and messy fast with anything more than a simple image carousel and thus gives a huge window of opportunity for multiple developers to implement the carousel as they see fit (sometimes even incorrectly).  However, this can all be avoided with a Javascript builder (NOTE: the necessary links to github and codepen will also be explicitly listed at the end).  

    Let’s take a look at what a developer would need to implement if they used my paradigm.  First, the Javascript:

    document.addEventListener("DOMContentLoaded", function(e) {
    	var smartCarousel = new SmartCarousel({
    		'carouselId' 	 : 'mySmartCarouselID',
    		'showIndicators' : true,
    		'showControls' 	 : true,
    		'intervalDelay'  : 1000

    I have an object which is newed up and takes as a parameter an object of configurations.  As you can see these configurations include things like whether or not to show the indicators (small dots at the top), whether or not to show the control arrow and the amount of milliseconds in the interval delay.  Next, the HTML:

    <div id="mySmartCarouselID">
    <div><img src="img/slide1.png" /></div>
    <div><img src="img/slide2.png" /></div>
    <div><img src="img/slide3.png" /></div>
    <div><img src="img/slide4.png" /></div>
    <div><img src="img/slide5.png" /></div>

    That’s it!  Everything else is being controlled by the CSS, the framework (in this case Bootsrap) and the builder.  The HTML stays, nice, clean and concise and the SmartCarousel object takes care of the rest.  One little nicety you’ll notice if you check out the github is that the builder “sniffs” the page for Hammer.js, the multi-touch gesture framework I’ve chosen to use.  If it’s present, then touch events are added, if not, those events are not added.

    Please note the syntax used in the Javascript SmartCarousel.js file.  I’ve tried to adhere to raw Javascript as much as possible so that this example is portable for anyone who wishes to use it.  Given that Bootstrap Javascript is a jQuery plugin, I was forced to use jQuery in a few places.  However, the example is not about using Bootstrap or jQuery but about what you can do with this paradigm.  Additionally, while I chose to use Hammer.js, you are by no means limited to this framework.  Again, the purpose was to show what can be done, not what should be done.

    I hope you found this helpful. If you have any additional questions (given that I’m writing this with two hours sleep over the past two days), please let me know. I’ll be glad to update and answer accordingly.


    jQuery: http://www.jquery.com/

    Bootstrap: http://www.getbootstrap.com/

    Foundation: http://foundation.zurb.com/

    HammerJS: http://eightmedia.github.io/hammer.js/


    Github: https://github.com/mTorbin/frameworkWidgetBuilder

    Codepen: http://codepen.io/mtorbin/pen/ouaKp


  6. Moto X People App Contacts Not Matching Up to Phone App Contacts? Here’s a Fix That Worked For Me!

    Ever since moving to Android, I’ve had this really annoying problem.  My Gmail contacts that were listed under my People app looked great but the contacts listed under my Phone app were all screwed up.  In some cases, there were duplicate entries or there were entries of people I no longer wanted.  When I logged into my Gmail, everything appeared to be fine.

    Today I finally decided to do a bit of digging.  I figured that those extra contacts had to be listed somewhere.  As I looked at my Contacts list, I noticed something interesting at the bottom; there was an option for “Other Contacts”.  When I opened this group, lo and behold, there were all the junk contacts!

    In order to fix my problem, I did the following:

    1. Select all of the junk and duplicate contacts in Other Contacts.
    2. Click the “Add to My Contacts” button at the top of the Gmail window.
    3. Click the My Contacts link.
    4. Under the More menu, choose “Find & merge duplicates…” or merge duplicates manually.
    5. Rinse and repeat.

    Once I did this I noticed that my contacts were all nice and clean!  I’m not entirely sure how those dupes got in there, but I’m sure glad they’re gone.


  7. Add the Iconic “Konami Code” to your Web Site

    So the other day I was pondering the Konami Code.  For those of you who don’t know what that is, you can learn all about it here.  The basic idea is that there is a certain sequence of key strokes (or in the case of Konami, button presses) that when pressed in the right order, produced some type of hidden feature.  So I thought that this would be a neat little feature to add to a web site via Javascript.  Sure, this has been done many times before, but this is my take on it.

    Step 1: Download the Script

    I’ve gone ahead and put the source code up on my GitHub account, available for anyone who would like to use it.  I created a public repository appropriately called “konami”.

    Step 2: Install the Script In Your Web Page

    I won’t go into the nitty gritty here (we can save that for the README.md on Github), but I will walk you through adding this script to your web page.  Adding the KonamiCode object to your web page is very easy.  All you have to do is create an instance of the object in your DOM as such:

    var kCode = new KonamiCode({
        success: function(){window.location.href = "http://www.doctorbin.com/";}

    Notice that the object takes one object as it’s parameter.  There are three total parameters of the passed in object that you can set, but the most import is “success”.  This parameter is the function that you would like to have invoked if the proper sequence of keys strokes is pressed.

    Step 3: Read the Forthcoming README.md

    Like I said above, I’m going to put all of the nitty gritty details in the README.md file located in the Github repository.  However, if you’re fairly fluent in Javascript, you should be able to read the source code without much issue.  I’ve also included a minified version if you simply want to use the script in your web site.

    Step 4: Enjoy!!

    The script is GPL which means you can use it, modify it, change it, abuse it, whatever.  If you think of a really cool modification for it, please feel free to add it to the repository.  Have fun!


  8. How to Install the Latest Version of NodeJS, NPM and Express on the Raspberry Pi

    [Quick Update: This was re-tested with 0.11.7 and failed.  0.11.3 was then re-tested and worked.  I haven’t tried all of the versions in-between but know that there maybe some that do not work.]

    So, for full disclosure, my last post on which I wrote about how to set up the Raspberry Pi was really a precursor to this one that I wanted to write all along.  There are a ton of posts/blogs/videos/chatter about how to set up NodeJS on the Raspberry Pi, but I found that a lot of them are either outdated or unnecessarily involved.  The best one I’ve found thus far and the one that I’m using for the basis of this blog, is written by Matt Rüedlinger.  So before I continue, Matt, THANK YOU THANK YOU THANK YOU THANK YOU.  You are the inspiration for this blog post.  

    Please note that this blog post assumes that you have properly set up your Raspberry Pi with the Raspbian “wheezy” image and have SSH enabled.  If you do not, please take a moment to read my earlier blog post, Super Easy Install of Raspbian “wheezy” on the Raspberry Pi Using a Mac.  With that, let’s jump right in.


    1. Create a node directory under the /opt directory.  This is where we’re going to store our version of node:
      sudo mkdir /opt/node
    2. Go to http://nodejs.org/dist/ and find the latest distro with a linux arm version.  At the time of this writing, 11.3 was available.  The file you are looking for will be named something like node-v0.11.3-linux-arm-pi.tar.gz but it will have the words “linux” and “arm” in the name.
    3. Right-click on the .gz file and copy the full path.
    4. SSH into your Raspberry Pi
    5. Use wget to pull the path you just copied:
      sudo wget http://nodejs.org/dist/v0.11.3/node-v0.11.3-linux-arm-pi.tar.gz
    6. Use tar to unstuff the .gz file you just downloaded:
      tar xvzf node-v0.11.3-linux-arm-pi.tar.gz
    7. Copy the contents of the unstuffed directory to the /opt/node directory we created earlier:
      sudo cp -r node-v0.11.3-linux-arm-pi/* /opt/node
    8. This next part is where Matt and I deviate.  I’m a fan of making things easy.  Had we been installing NodeJS on a desktop or laptop, we would be able to use node from the command line simply by typing “node [COMMAND]”.  This was how I set that up.  We’re going to create a symbolic link to both node and npm and put those links in /usr/local/bin:
      sudo ln -s /opt/node/bin/node /usr/local/bin/node
      sudo ln -s /opt/node/bin/npm /usr/local/bin/npm
    9. Now restart the .bashrc as follows:
      source ~/.bashrc
    10. Now that .bashrc has been restarted, let’s verify that not only did our symbolic link work, but we have node and npm properly installed.  First type node -v to see the installed version of node and then type npm -v to see the installed version of npm.  You should see something like the following:
      pi@raspberrypi ~ $ node -v
      pi@raspberrypi ~ $ npm -v


    Please note that this next section is completely optional and as of the latest RPi OS, seem to not work as listed here.  Please use with caution.

    1. To install Express, simply enter the following on the command line:
      sudo npm install -g express
      You may see some warnings, that’s OK for now. If you want to dig in further, you can review them and fix them at your leisure.
    2. With Express properly installed, it’s now time to create our working directory.  However, we’re going to let Express do that for us.  The working directory that we’re going to create will be /var/www though depending upon your setup, the directory www may or may not exist yet.  For the purposes of this tutorial, we are assuming it does not yet exist.  Simply type the following into the command line:
      cd /var
      sudo express -e www
    3. There are several flags you can set and depending upon what you prefer, many combinations.  To see all of them, type express —help in the command line.  You should see something like the following:
        Usage: express [options]
          -h, --help          output usage information
          -V, --version      output the version number
          -s, --sessions     add session support
          -e, --ejs           add ejs engine support (defaults to jade)
          -J, --jshtml       add jshtml engine support (defaults to jade)
          -H, --hogan       add hogan.js engine support
          -c, --css           add stylesheet  support (less|stylus) (defaults to plain css)
          -f, --force         force on non-empty directory
    4. Once Express successfully creates the necessary directory structure, the last step before we turn the sucker on is to jump into the www directory and let npm add the finishing touches.  We do this as so (please note that I’ve chosen to add sudo to the command which deviates from what Express shows.  Without sudo permissions, npm will not be able to install all the dependencies properly:
      cd www && sudo npm install
      Again, you should see some warnings which you are welcome to go back and correct but they will not impact this process.
    5. Once npm is done, it’s finally time to flip the switch and see if we made Frankenstein or a flub:
      node app.js
      If all goes well, you should see the following message:
      Express server listening on port 3000
    6. Go out to your Raspberry Pi’s ip address at port 3000 and if you created Frankenstein, you should see something like this:image

    Congratulations!  You have successfully installed NodeJS, NPM and Express on the Raspberry Pi!  There’s only a few last steps:

    1. Walk in to a room where your parents/wife/sister/brother/uncle/nephew is seating
    2. Ball your hands into fists
    3. Raise your arms slowly above your head and shout the following victoriously:

      IT… IS…ALIVE!!!!!


    As I mentioned earlier, Matt Rüedlinger and his awesome blog are the true inspiration for my own take on the process.  Please take a moment to visit Matt’s blog, read his posts and comment.  The dude is seriously smart (and his name isn’t that bad either):

    Matt’s Blog: http://blog.rueedlinger.ch/


  9. Super Easy Install of Raspbian “wheezy” on the Raspberry Pi Using a Mac

    There’s a lot of tutorials out there on setting up the Raspberry Pi with the latest version of Raspbian “wheezy”, some more difficult than others.  I thought it might be helpful if I walked through my setup process which combines a number of tips and tricks I’ve learned from others.  If this helps you, please take a moment to visit the original authors of the tips and tricks who helped me out (their links are below).  Ok, so let’s dive right in.


    1. A Raspberry Pi: Either Rev A or Rev B will work but for this tutorial, I’m using a a Rev B
    2. An 8gb or greater Class 10 SD Card: Any brand will work but I strongly suggest you consider the Class 10 over the Class 4 for speed.  Also, while an 8gb will probably do the trick, for a few more bucks I suggest the 16gb.
    3. A Wired Keyboard/Mouse
    4. An HDMI Cable: Monoprice has these guys super cheap and frankly, they’re very useful to have around.
    5. A Micro USB Power Adapter: The Raspberry Pi most likely will not power off your laptop.
    6. An Ethernet Cable


    1. Stick the SD Card in your Mac
    2. Open  Applications > Utilities > Disk Utility
    3. Select the SD Card
    4.  Choose Erase and set the format to ExFAT.
    5. Format the SD Card


    1. Download the latest Raspian “wheezy” image here.
    2. Open Applications > Utilities > Terminal
    3. Determine which Volume is the SD Card: This is accomplished by using the df command (“Display Free space”) and using the -h argument (“Human readable”):
      df -h
      As you can see in the example below, my SD Card is listed as /dev/disk3s1:


    4. Unmount the SD Card: This is done using the diskutil command (DISK UTILity) and providing the unmount paramater as well as the full location of the SD Card.  For the above example this would be:
      diskutil unmount /dev/disk3s1
    5. Copy the IMG File to the SD Card: This is done by using the dd command (while the real meaning appears to be “Data Description,” I tend to like to use “Duplicate Data” because it’s easier for me to remember):
      sudo dd bs=1m if=/path/to/img/file of=/dev/rdisk3
      There’s a few things to note here.  First, notice that we’re invoking the use of the super user via sudo.  This is required unless you’re already logged in as root.  Secondly, we have three parameters which I’ve outlined below:
      • bs: This stands for “block size” and you’ll notice we’re setting this to “1M” or 1 megabyte.  This means we’re going to duplicate the data in 1 megabyte chunks.
      • if: This stands for “input file” and should be the path to the IMG file you downloaded.
      • of: This stands for “output file” and should be the path to your SD Card.  One very important thing to note is how the SD Card is now being referenced (“/dev/rdisk3” in the example above).  The partition number has been dropped and a lowercase “r” has been placed in front of the word “disk”.
      This last portion will take some time so I suggest you get up and stretch, watch some videos or go play Minecraft.


    1. Insert the SD Card into the Raspberry Pi
    2. Plug in the Keyboard, Mouse, Ethernet and HDMI Cables
    3. Plug in the Micro USB Power Adapter

    Yay!  You should see your Raspberry Pi come roaring to life!  While this next part can arguably be done without the keyboard, mouse and monitor, I would like to remind the reading audience I didn’t name this post “Mildly Advanced Install…”.  I like to use the keyboard, mouse and monitor because it’s quick, easy and you are going to be unplugging them in a few steps anyways so patience is key here.  The first thing you’ll see is the Raspberry Pi boot up into the configuration menu, known as raspi-config:


    I could spend entire blog posts on each of these settings but to make this nice and short, here are my suggestions:

    • Expand Filesystem: YES
    • Enable Boot to Desktop: If you want to have the option of using the Raspberry Pi as a desktop computer, then you might want this enabled.  Otherwise, leave it as is.
    • Advanced Options > Memory Split: If you’re not going to boot into the desktop, reduce this to 16.  Otherwise leave it as is.
    • Advanced Options > SSH: Enable
    • Advanced Options > Update: You can do it now or later; I suggest now.

    When you’re done making changes, choose <Finish>.  Depending upon the changes you requested, you may or may not be asked to reboot.  I suggest you manually reboot anyways:

    sudo reboot

    At this point you can safely unplug the keyboard, mouse and monitor (see, that wasn’t so bad!) since you can now SSH from your Mac.


    I want to take a moment to thank all of the folks whose ideas I used in this tutorial.  I could not have written this without their help (even if they don’t know it).  If this even remotely helped you, please take a moment to visit their sites, videos, blogs, etc. and give them the attention they deserve:

    Version3Tech “Tutorials: Raspberry PI SD card setup using a Mac”: http://www.youtube.com/watch?v=jxAcvEsPkd8

    HubCityLabs “Unlocking your new Raspberry PI’s 512MB of Memory!”:


  10. My First Week with a Republic Wireless Phone

    So I’m rounding out week one with a Republic Wireless phone.  For the most part, it’s been a very positive experience.  There are a few things I’d like to point out:

    • If you choose to go with the Motorola Defy XT (your only choice at the moment) get at least an 8gb micro sd card to replace the 4gb one the phone comes with.
    • You’ll want to install most of your apps on the micro sd card as the phone won’t be able to hold much of anything.
    • All of the apps I tested the phone with worked well including Ingress, Bejeweled, 1Password, Evernote, VEVO, Slacker Radio, Waze, Beejive, Facebook and Google+ (obviously).
    • Cellular calls worked great and without issue.  Callers reported clarity was more than acceptable.
    • My bluetooth headset attached without issue.
    • The phone jumped between Wifi and Cellular very quickly and did not take an extraordinary amount of time to reconnect as I went through tunnels on the BART.


    There are some concerns with WiFi calling.  I’m trying to debug the issue properly so I know what actions to take.  That being said, I’ve mentioned the issue in the forums and Republic Wireless is currently still BETA so they are working the kinks out.  Some of the commenters have said it completely destroys the call, while others say it’s just an annoyance.  My personal experiences have been that the caller cannot hear me at all or have reported the call quality to be “very broken”.  As per a suggestion, the router I’m using was upgraded and I’ll have to retest and repost.  FWIW, I did notice today that when I got closer to my home, the phone jumped to the WiFi network and quality did not diminish.


    Having officially tested two networks by leaving myself messages, I can say that all calls appeared to be clear.  The two calls that I made through the Airport Wireless network with Comcast as the ISP were a bit worse off but not terrible.  The next step will be to test these calls with another individual(s), preferably on each of the major networks and see what their opinion is of the call quality.