How to Backup and Restore Your Hard Disk by Creating a Disk Image


It’s been almost a year since I setup my personal server which I named Jarvis. I haven’t backed-up Jarvis at all and recently grew paranoid that something might happen to him. Jarvis represents hundreds of hours of work, and there are documents and code that are stored only in him.

I spent some time figuring out how to backup everything. The easiest solution is to initialize Git repositories for all my projects and then create bare Git repos for all of them. Then I simply tarballed them up and stored copies of them elsewhere.

But I wanted to also preserve all my server configurations and packages. I wanted a hard drive that if Jarvis’ hard disk suffered some catastrophic failure like fire, I could simply plug into another computer and have a perfect clone up and running in no time. Spending hours installing packages isn’t fun. What I needed was to take a snapshot of the disk and create a disk image. It turns out dd is the command for the job.

How to Setup Your First Scala Project in IntelliJ


I stumbled around for quite a while trying to create a basic Scala project in IntelliJ. Here are the steps so you don’t have to waste nearly as much time as I did. I’m also documenting this because I know I’m going to forget it myself.

My environment:

  • Mac OS X Mavericks 10.9
  • IntelliJ IDEA 13.0

My steps:

  • install Scala with homebrew brew install scala --with-docs
    • this installed Scala version 2.10.3 for me
  • brew install sbt (I’m using 0.13.0)
  • mkdir ~/.sbt/0.13/plugins
  • echo 'addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.2")' > ~/.sbt/0.13/plugins/build.sbt
  • install the scala plugin for IntelliJ
  • git clone
  • import project; choose “import project from external model” and select “Use auto-import”
  • make sure it compiles and runs

Introduction to Public-key Cryptography and GPG


Public-key cryptography is an encryption method that uses two keys, one public and one private, to securely communicate with others. Messages are encrypted using the recipient’s public key, but the message can only be decrypted using the corresponding private key. Think of the public key as secure mailbox with a small slit into which anyone can put letters. But only the owner of the mailbox can retrieve letters by opening it with her private key. The security of the encryption scheme is based on the fact that it’s computationally infeasible to calculate private from public keys.

Longer key lengths are better, but only up to a point. AES will have 128-bit, 192-bit, and 256-bit key lengths. This is far longer than needed for the foreseeable future. In fact, we cannot even imagine a world where 256-bit brute force searches are possible. It requires some fundamental breakthroughs in physics and our understanding of the universe…brute-force attacks against 256-bit keys will be infeasible until computers are built from something other than matter and occupy something other than space.

Learning to Skateboard and Ghetto-Couchsurf


I bought my first skateboard on a Saturday afternoon at an East Village skate shop. I’d never skateboarded before, but I suddenly wanted to be like those devil-may-care skaters landing varials while weaving in and out of midday Manhattan traffic. I figured it wasn’t too late to start. I had no idea what components to pick, so I just went with the recommendations of the guys at Reciprocal Skateboards: 8.25-inch wide deck, Independent trucks, and Bones Reds bearings.

Videos About West Coast Forests


Throughout my many hours of watching Vimeo, I’ve garnered a collection of videos about the west coast forests. It’s amazing to see 200-year-old redwoods with their tops shrouded in fog, seals swimming through the rivers, and just the rich ecosystem in general.

Notes on the Intelligent Investor by Benjamin Graham


General Guidelines

  • don’t listen to Mr. Market
  • no one’s tombstone reads “He Beat the Market”
  • Risk depends not on age but on individual circumstances
  • Keep stock:bonds ratio to ~25:75
  • Max 10% speculation in sep acct
  • If investing in gold, buy a maximum of 2% in a well-diversified mutual fund specializing in stocks of precious metals ETF charging less than 1% in annual expenses
  • Protect against inflation with REITS & TIPS for long-run
    • TIPS best for tax-deferred retirement acct
    • For retirement funds that would be held as cash 10%

My Personal Best Swim Times


I found these while cleaning through old drafts of blog posts. I’ll put them here before they become lost in the shuffle.

100 yard freestyle personal best: 54.30 sec

100 yard breaststroke personal best: 1:12.34 min

How to Setup Your Personal Website From Scratch


You want to have your own personal website, but you don’t know where to begin. All this Internet stuff just seems like a black box to you. You don’t want to bother with complicated technical stuff. You just want your website to work. Is this that much to ask?


This tutorial1 will get your own website up and running from scratch in under 1.5 hours. At the end you’ll be able to type “” into your browser to see a website you own and receive e-mail at “”. You’ll learn how the Internet works on a basic level, what domain name servers (DNS) are, and how to link your website to Google’s free apps.

  1. Read my explanation of how the Internet’s Domain Name System works

  2. Register an available URL (or multiple ones) from a domain registrar like name.com2.

  3. Create a Tumblr blog.

  4. Setup DNS records with this Tumblr guide.

  5. Setup free Google Apps to use Gmail, calendar, docs, etc with your new domain.

  1. There are many ways to setup a basic personal website. My method balances cost, ease, and control. You can also try out [][6] to create a basic landing page or [Squarespace][7] to create a more extensive site.

  2. I don’t take money for blog posts and wasn’t asked to write this by Tumblr or I recommend them because I they’re services I’ve personally used and like.