Cyrus Stoller home about consulting

Setting up my new laptop

I’m often asked what I do to setup a new computer. Since I just got a new Mac, I figured this was a good opportunity to share my process.

I realize that tools have been created to solve this problem. These make sense if you frequently provision new laptops. But since I only do one every couple years, I thought that was overkill. If you’re interested you may want to check out projects like: Boxen by Github based on Puppet or Sprout OS X Apps by Pivotal Labs (originally called Pivotal Workstation) based on Chef.

Here are the steps that I took. For users who would prefer to use a Caskfile to automate the installation process of native applications, I’ll be discussing that option at the end.


The basics

Change the default hostname - go to System Preferences / Sharing

Usually this is set to something like “Cyrus Stoller’s MacBook” during the inital setup process. Since I have had multiple MacBooks at this point, I have started naming my computers after worlds from Star Trek. My current computer is named “vulcan”.

iTerm2 - http://www.iterm2.com/

iTerm2 has lots of little features that make it easier to work with than the default Terminal.app included by Apple. My personal favorites are split panes and search that highlights all matches (and even supports regular expressions).

Generate a new SSH key pair

Github has a good set of instructions on how to do this. Once you have done this you’ll need to copy your public key to any servers that you would like to connect to without a password.

Add your new laptop public SSH key ~/.ssh/id_rsa.pub to the ~/.ssh/authorized_keys file on servers that you would like to connect to without being prompted for a password. If you’re not hosting any of your own servers, then you don’t need to worry about this.

Next, I add my new laptop public SSH key to:

It’s easiest to copy your SSH key to your clipboard by using:

$ pbcopy < ~/.ssh/id_rsa.pub

Another hot tip is that you can find any SSH keys that a user has added to Github by going to his/her profile and appending .keys. For me it’s: https://github.com/cyrusstoller.keys.

Quicksilver - http://qsapp.com/download.php

Spotlight has come a long way in limiting the need for my fingers to leave the keyboard to launch applications and open files. But, I can still load applications faster using Quicksilver. In particular I like that I can assign my own abbreviations for applications. For example, if I do CMD + space followed by e I open TextEdit.app. I also like that I can place a large text banner over my entire screen. I do this to share a URL before a presentation or to make it easy to see a phone number from across a room.

Once installed I go to the Quicksilver preferences to make sure that it starts after login and that make it so that the Quicksilver icon does not appear in the dock. I know others prefer tools like Alfred, but Quicksilver meets my needs and I know how to configure it to optimize my workflow.


Web browsing

Google Chrome - http://www.google.com/chrome/index.html

I switch the default search engine to DuckDuckGo by going to chrome://settings/ (the setting you want is near the bottom). This makes it so that if you type a non-URL into the omnibar it will default to searching DuckDuckGo instead of Google.

Mozilla Firefox - http://www.mozilla.org/en-US/firefox/new/

Like with Chrome, I switch the default search engine to DuckDuckGo. To do that I install the following addons: omnibar, duckduckgo, and I also add a plugin which displays the flag of the country where the website originates from in the omnibar.

Tor - https://www.torproject.org/

I try to periodically use the Tor browser, so that it won’t be out of the ordinary for traffic from my area to go through the Tor network when I actually do need privacy. For details on why you should care about Tor, you should read this article written by the EFF.

Adobe Flash - http://get.adobe.com/flashplayer/

While I generally dislike that Flash kills my battery, many websites that I frequent rely on it, making it a necessary download (e.g. Hulu and Pandora).


Dropbox - https://www.dropbox.com/downloading

Memory Clean - https://itunes.apple.com/us/app/id451444120?mt=12

After I quit RAM intensive applications, I like to get memory released as soon as possible.

Display Menu - https://itunes.apple.com/us/app/id549083868?mt=12

Apple discontinued its menu-bar option for selecting display resolutions, but luckily there’s a replacement. This is handy if you frequently connect to external displays like projectors or TVs.

Battery Health - https://itunes.apple.com/us/app/id490192174?mt=12

f.lux - https://justgetflux.com/

Research shows that kinds of light you are exposed to can impact sleep patterns. If there’s a chance this will help mitigate my chances of getting a sleep disorder, I’ll take it. My eyes are pretty sensitive, and I have found f.lux has made working on a computer easier at night. You may also want to read this article about how technology can impact your sleep quality.


Other native applications

Skype - http://www.skype.com/en/download-skype/skype-for-computer/

Some friends use Skype, others use Google Hangouts, and others use FaceTime. It’s good to have options available, since sometimes I run into connection difficulties.

VLC - http://www.videolan.org/vlc/

VLC is a great media player that can play media files that make Quicktime complain.

Adium - https://www.adium.im/

I use Adium for instant messaging on gChat, IRC, MSN, and Yahoo Messenger.

Sublime - http://www.sublimetext.com

When I’m not using Vim or Emacs, I usually use Sublime. I know it’s weird that I use both vim and emacs, but I have an odd preference for using different text editors for different types of tasks. I like how Sublime makes it simple to customize snippets, install packages, and color schemes. I make extensive use of the Go to anything and the command palette. In general it’s been easier for me to configure Sublime than it is to get my vimrc just right. For a long time, I used TextMate as my primary editor, but last year I made the switch to Sublime. The reasons for that will have to wait for another post. I’ll talk about how I configure Sublime in the next section.

Transmission - https://www.transmissionbt.com/download/

Really handy for downloading torrents. I downloaded the MacTex package (~2.5Gb) via torrent. It’s nice not having to start a large download over after 2Gb have been downloaded.

Mailplane - http://mailplaneapp.com/

If you find your self switching between more than a couple gmail accounts, Mailplane is key. It’s $25 and definitely worth the money. (Note how few paid applications I’m featuring.)


Installing tools for web and mobile development

Xcode - https://itunes.apple.com/us/app/id497799835

homebrew - http://brew.sh/ - to get started I installed: git, wget, tree, tig, clisp, postgresql, redis, node, imagemagick, and heroku-toolbelt.

rbenv - installed quickly with https://github.com/fesplugas/rbenv-installer/

I set my global ruby version to 2.0.0p481, and also install versions 1.9.3 and 2.1.2.

$ rbenv install 2.0.0-p481
$ rbenv install 1.9.3-p547
$ rbenv install 2.1.2
$ rbenv global 2.0.0-p481

For more detailed instructions on how to get a Rails development environment setup you may want to checkout these two tutorials.

Configuring Sublime

First, add the binary to your $PATH to launch sublime from the command line using subl.

$ ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl
/usr/local/bin/subl

Next, open Sublime to install package control. Type “CTRL-`” to bring up the console to paste in the code from the package control site. Once that’s done, type “CMD-SHIFT-P” and type “install” and you should see “Package Control: install package” autocomplete.

Here are the packages that I installed: puppet, rspec, SCSS, nginx, optionally emmet, handlebars, better coffeescript, latex snippets, ERB Snippets, All Autocomplete, GitGutter, and SublimeLinter.


Automated installation using a Caskfile

Doing all of this takes a lot of time. Going to websites to download native applications is a pain. Fortunately, there is a way to install these applications from the command line.

homebrew cask - https://formulae.brew.sh/cask/

Edit 9/21/2019: This was formerly found at: caskroom.io

I learned about this from https://github.com/mathiasbynens/dotfiles. In the Caskfile you can define all of the applications that you want to install. The only thing I don’t like about this approach is that applications won’t be install in the system-wide /Applications directory. Instead they are symlinked into your local ~/Applications directory for you to use.

For example, I like having manual control of fan speeds in my laptop.

$ brew cask install smcFanControl

Then you have smcFanControl in ~/Applications.


Miscellaneous tools for data analysis

Julia - http://julialang.org/

R - http://www.r-project.org/


Miscellaneous accessories

Thule Laptop Case - $49.95

Conclusion

Thanks for reading this far. This is how I got my laptop up and running. I’m in the process of cleaning up my dotfiles so I can share those as well. Hopefully this is helpful.

Category Tutorial