Create a OS X 10.10 Yosemite Public Beta 1 USB installer

Want an easy, command line one-liner to install your handy-dandy new OS X Yosemite Public Beta that you just redeemed from the App Store?

sudo /Applications/Install\ OS\ X\ Yosemite\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite\ Beta.app --nointeraction

Replace Untitled with the name of your USB partition and all is well :)

Setting up my dev environment on OS X 10.10 Yosemite DP 1

I won't be the first to admit I'm an early adopter. I love the bleeding edge, but sometimes it makes you bleed. Alot.

I recently did a full re-install of OS X on my Mid-2012 MacBook Air and instead of 10.9, I decided It would be great to test out and install the recently announced (recent as in, like, a week ago) OS X 10.10 Yosemite. I set out on a mission to get the latest version of OS X and XCode from unnamed sources and succeeded, created a USB install drive with one of my many disposable USB flash drives, and nuked my current partition (backing everything up first, of course).

Once I was finished the install process, I was greeted with the glorious and beautiful new flat UI of OS X Yosemite which is very iOS7-inspired. Instantly I knew I wasn't going back to 10.9, but when I started to install my dev tools and everything I need to work, my enthusiasm for bleeding-edge became a dull ache in the back of my eyes.

Needless to say, here is a comprehensive list of issues I ran into, and how I fixed them:

First, XCode needs to be installed

The version of XCode in the Appstore only works with OS X 10.9 or lower, so you have to get the XCode 6 Beta from the Apple Developer site. Again, I retrieved it from unnamed sources, but the endgame is exactly the same. For me in OS X 10.9, I only needed to install the XCode CLT, however this is not the case in OS X 10.10. Install XCode 6 Beta, then install the XCode 6 Command Line Tools otherwise you’ll run into issues installing Homebrew in the next step.

Installing Homebrew

Homebrew is amazing and I love it to death. It sure beats compiling all of my software from source. From my knowledge of installing Homebrew on everyother version of OS X I’ve used, I installed it via

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
brew update

Initially I had not installed XCode.app, only the Command Line Tools, so when I tried to install anything else this is where I ran into issues and had to reinstall Homebrew.

rm -rf /usr/local/Cellar /usr/local/.git
brew cleanup
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
brew prune
brew update

When I ran brew doctor, I had one less warning than the initial install which isn’t optimal but I needed to continue and solve the rest of the issues.

Now that I had reinstall Homebrew, it was complaining that it's bin and sbin folders were not accessible in the path and to ammend my path with /usr/local/bin and /usr/local/sbin. I modified the global /etc/paths file from

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

to:

/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin

just like I would in Mavericks, but this did not work. After some Googling, I found a solution on Github. It seems the issue is with iTerm2, my terminal replacement of choice.

  1. Go to Profiles > Open Profiles...
  2. Select your profile, Default if you only have one, then click the Edit Profiles... button
  3. Change the Command radio button from Login shell to Command and paste in /bin/bash -c /bin/zsh.
    See screenshot: https://cloud.githubusercontent.com/assets/660139/3190490/3a52b170-eccf-11e3-8329-3ef6ec3f5f0f.png

Source: https://github.com/Homebrew/homebrew/issues/29843#issuecomment-45242894

Installing Node with Homebrew

I mentioned another issue above in the first section that if you install the CLT first before XCode.app, you’ll run into issues. The issue in question is that Homebrew cannot compile Node in the next step without setting the proper XCode.app path first otherwise it does not compile Node.

Running

sudo xcode-select -switch /Applications/Xcode6-Beta.app

will solve this issue and allow you to continue.

Installing MongoDB with Homebrew

After the fiasco with installing Node, I was almost ready to just give up but I decided to stick with it and figure out how to solve my issues. The next step was to get MongoDB installed which I’ve never had issues with, until now. When MongoDB was downloaded and started installing, it looked like it might just work on the first try but then I got this weird error saying

SCons Error: option --osx-version-min: invalid choice: '10.10' (choose from '10.6', '10.7', '10.8', '10.9’)

This indicated to me that the version of MongoDB in the Homebrew list hadn’t been updated for 10.10 yet, but after some Googling I found this fix

It seems, the version of OS X is read from /System/Library/CoreServices/SystemVersion.plist, so if you sudo-edit the file and change:

<key>ProductVersion</key>
<string>10.10</string

...to:

<key>ProductVersion</key>
<string>10.9</string

And then do brew install mongo, it'll install.

REMEMBER to change back ProductVersion to 10.10 straight away, otherwise most of the Apple-provided apps will cease to function (Including Terminal.app).

Source

Fix Google Chrome from crashing in OS X 10.10 Yosemite

Edit: This doesn't seem to be an issue anymore in the Public Beta. Let me know if you still have Chrome crashing all the time!


Google Chrome Canary is usually pretty good in any OS, almost good enough for a daily driver except for the odd crash now and then, but in OS X 10.10 it is not stable at all. Every second or even every tab I open crashes after a period of time, or just straight up will not load. I googled around and found that the solution is partially caused by having to show scrollbars on using the trackpad on MacBooks. You can fix this by running these two commands:

defaults write com.google.Chrome AppleShowScrollBars Always
defaults write com.google.Chrome.canary AppleShowScrollBars Always

How to get the latest tag on your Git branch

I frequently look at the latest tag when working on Postach.io in Git and because we have so many it takes me a few seconds to look through the list to find the latest one. This little snippet can do that for me in one command!

git describe --abbrev=0 --tags

An even better way to have this work is to add it to my aliases in terminal and call one command instead of remembering this chain of arguments:

alias glt="git describe --abbrev=0 --tags"

Now in your terminal you can call:

glt

Install Pillow with pip on OS X Mavericks 10.9.1

I recently ran into an issue on Mavericks where installing the python package Pillow would not install correctly and error out on my, referencing a clang error that I was in no mood to debug.

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

I Googled a solution for about 20 minutes until I found this: before running pip install, run this

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

Update: I've noticed as of version 5.1.0.0.1.1396320587 of XCode Command Line Tools, the above temp-fix doesn't seem to work is you're using sudo to install a package. To use sudo, make sure you append the -E flag

sudo -E pip install PACKAGE

Sources:

xkcd

null

This is awesome, and I think I should try it. There's a buck (deer) that used to hangout in my neighbour's yard last summer, I wonder if he'd participate?

CSS animation-fill-mode

One overlooked animation property, however, is the animation-fill-mode property. This CSS property sets the state of the end animation when the animation is not running. Here's a quick example:

@keyframes fadeIn {
  0%   { opacity: 0 }
  100% { opacity: 1 }
}

.fadeIn {
  animation-name: fadeIn;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

In the case of my fadeIn animation, I want the element to stay at an opacity of 1 when the animation is complete. If I don't set the value to forwards, the element would go back to an opacity of 0 after the animation runs.

Syntax specific settings in Sublime Text

Open up the file in Sublime Text with the filetype you want to setup the syntax-specific settings for.

Edit syntax specific settings with menu Preferences -> Settings - More -> Syntax Specific - User

{
  "tab_size": 4
}

You can do the same with any other file type as well :)

Three Turkey Jokes

In light of the American thanksgiving, I found 3 turkey jokes I found hilarious :)

null

Source: Buttersafe

Evernote Accelerator Week One and Two

Preamble

The very first Evernote Accelerator is a 4 week no-equity program that resembles a seed accelerator. This accelerator was created for Evernote to showcase the winning Devcup 2013 finalist teams who set out to bring products from virtually nothing to producing an MVP, and to provide API, engineering, and design help. Some teams even pivoted their direction to iterate on the original product they won the Devcup with.


We spent 2 days before the start of the accelerator associating ourselves with our surroundings. The Oracle buildings are literally next door to our hotel and the giant body of water on their campus is fascinating with a huge fountain that turns on during the weekdays.

null

Accelerator Week 1 and 2

We were greeted on the first day in the office with this AMAZING mural created by Carlos, the graphic designer at Evernote. This is on the wall facing our desks and makes me so happy to see it .

null

My wicked setup for the Accelerator courtesy of Evernote - 27" Apple Cinema Display, wireless keyboard and trackpad.

null

We got these wicked Accelerator swag bags that came inside of a printed Evernote canvas bag containing an Evernote Accelerator sweatshirt, an Evernote t-shirt, and a few stickers.

null

Oren Michels @ Mashery

On the wednesday night of the first week we had Oren Michels from Mashery come speak to us about how they started and where their company is at now. Mashery is a service that creates APIs for companies with no experience or knowledge to create their own. The talk was not terribly exciting, but it was interesting nonetheless.

The first weekend

Not knowing what to do, we headed out on an adventure in our rented mini-van. I finally got to visit the Tesla Motors dealership and sit inside of a Model S. As soon as I can afford it, I'm ordering one; this is now my life goal.

null

Gavin (driver seat) and I inside of the Model S. The dashboard and the centre console are mind blowingly huge. The car can remember seat positions of certain drivers and you can save profiles at the tap of a button.

null

...and then of course we got to visit the McLaren dealership. The McLaren MP4-12C is even more beautiful in real life than it is in any video game or on any episode of Top Gear.

null

There is a giant spider on the roof because it was near halloween when we visited. Piss-poor location to put it if you ask me...

null

Guy Kawasaki at Evernote

Tuesday morning, we had world-famous Guy Kawasaki come and speak to us about the top 10 mistakes he has personally seen entrepreneurs make. It was an amazing opportunity to meet the man that helped revitalize Apple by aiding in the marketing of the 1984 Macintosh.

My favourite saying/takeaway from his entire talk was his analogy and comparison of venture capital money to that of the drug crack.

"Don't take crack unless you need to"

  • Guy Kawasaki

Jason Calacanis at Evernote

Arguably the father of the original web blog, Jason Calacanis came to Evernote wednesday evening of week two to film TWiST(This Week in Startups) and was interviewed by Rafe Needleman.


Walking in the Footsteps of Giants

Friday was one of the biggest days in the Evernote Accelerator: it was our pitch at Sequoia Capital

null

I'll start off by saying thank you Jun for some of your amazing photos! Follow him on Twitter, he's a wicked photographer, and an interface designer for Biscuit

When I signed up to be a developer for a company who pitched me a gig in their sweatpants, I had absolutely no idea what I was getting into. I was working for a real estate company building websites at the time and felt comfortable with my job. Little did I know the road I would inevitably choose in life would take me this far and more.

On November 1st, Gavin and I pitched the app Postach.io that is cofounded by himself and Shawn Adrian to Sequoia Capital at 3000 Sand Hill Road.

For those that don't know (I didn't before this trip), Sequoia Capital has had their hands in many of the largest tech companies around the world. To list a few: Apple, Google, YouTube, PayPal, Instagram, Cisco Systems, Oracle, Electronic Arts, Yahoo!, NVIDIA, Atari, Airbnb, Kayak, Meebo, Admob, Zappos, and LinkedIn.

null

Sitting in that boardroom freaked me out a little bit, but fortunately I didn't have to deliver the pitch

null

On the far left is Roleof Botha , a partner at Sequoia and sits on the board of many notable tech companies including Jawbone, Eventbrite, Instagram, Weebly, and most notably, Evernote and Tumblr. He listened to our pitch and provided some excellent feedback and even followed up with an email later in the day. How crazy is that?!

So far, my expectations have been blown out of the water completely in this Accelerator.

Blowing off steam

To unwind after our crazy second week, we took to the track at K1-speed Electric Go-Karts near SFO airport. Holy shit... if you've never driven a go-kart before, this is the place you want to go in San Francisco! They have an official ranking system used to track and clock your lap times and if you go in a large enough group, you can buy a 3-race package which includes 12 practice laps, 14 time-trial qualifying laps, and a final 16 lap F1-style race!