My Octopress Blog

A blogging framework for hackers.

Color Picking on OSX Lion

Doing the rapid prototyping that I do, I’ve often relied on Apple’s Digital Color Meter to grab HEX color codes. However, upon upgrading to OSX Lion I found the hex values to no longer be available.

My quest to figure out a replacement lead me to discover a few things.

First, you can create custom color pickers and add them to the standard OSX color tool that is used by most native apps (Preview, Pages, etc). I didn’t know this, but it’s quite cool.

Jesper over at has created Hex Color Picker, an extension that you can drop in to add Hex functionality. It’s quick and effective, as long as you have access to the OSX color tool.

That’s where this tip about replacing the digital color meter comes in handy. It shows you how to write a quick applescript to launch the color picker at any point in time. I named the application DCM so that I could just open spotlight and get to it quickly.

And then, the kicker.

While reading through the comments on that previous tip, I came across one from Aaron Stroud:

DigitalColor Meter still supports hex values, they've just hidden it.
View > Display Values > as Hexadecimal.
Shift + ⌘C copies the hex value.

Turns out it’s been there all along. After making that change to the Digital Color Meter, I can now grab hex values quickly again. Huzzah!

Tips Around Vancouver, Canada

I love Vancouver, and frequently have people ask me for recommendations. Instead of writing this all down every time, here they are for reference:

Vera’s Burgers. The burgers are just straight up delicious. My favorite location is on Davie St at the beginning of the gay district. I personally love the pilgrim (turkey burger) but pretty much anything you try is great. You pick all of your own toppings, and they have plenty to choose from. Price: $8 - 10 per person

Cactus Club Cafe. I love this Canadian restaurant chain. It was started in Vancouver years ago and it’s now one of the most profitable restaurant chains in Canada. Good food at a reasonable price with great service in a trendy venue. It’s my favorite one size fits all place to go. If you go, try a Bellini and some west coast pockets.

Hapa Izakaya or Guu. Both restaurants deliver great japanese fusion. Hapa Izakaya is a little more on the classy / expensive side while Guu is on the “What did I just eat? It was Delicious!!” loud asian side. Hapa Izakaya is a safe bet for some great fusion if you’re timid about what you eat. Personally, I prefer Guu because I love the energy and I find the crazy food to be amazing. That being said, I’ve taken people there who were less adventurous and didn’t quite enjoy it like I do. It’s hard to suggest menu items at either place because they change often and are usually seasonal but if you go to Guu and they have Octopus Balls (Balls of Octopus meat), I highly recommend you try them. It’s just like being in Japan. :)

SUSHI! You will find good sushi practically everywhere. Rumor has it that sushi chefs from Japan come over to Vancouver in order to practice because we all eat Sushi rolls far more frequently. I believe it. I have had more fantastic Sushi in Vancouver than any city I’ve ever been to.. including Tokyo. Now, that being said, there is a wide range of quality. Some of my personal favorites are Kadoya on Davie Street (near Vera’s) and Tanpopo on Denman St. I go to Kadoya when I’m looking for fun, creative rolls with plenty of yummy. Tanpopo, however, has a great all you can eat weekend lunch for only $13.50. For the last 5 years, we have had a standing Sunday brunch at Tanpopo with anyone who happens to be in town. It’s tradition. :)

Japadog. Continuing the Japan craze, Japadog makes hot dogs with a japanese twist. My wife and I went there once and while I thought they were pretty good, she wasn’t a fan. I admit, fishy tasting hot dogs is probably not for everyone… but this place has garnered a lot of celebrity endorsements and has been featured on a couple of food tv shows. Not bad for a hot dog stand on the side of the street. You may want to check it out just to say you tried it.

Poutine. Ok, so.. if you haven’t heard of Poutine, bear with me. You take some perfectly golden french fries, cover them in fresh cheese curds and then pour on hot, delicious gravy. Anyone who doesn’t think fat, fat and fries would taste good needs their head checked. La Belle Patate on Davie and Bute is the place to go. It’s a Belgian fry house that serves nothing but french fries. Great late night food. I highly recommend you check it out… it’s about the only “canadian” food I can think of.

Carderos. Now we’re on the fancy side of town. Carderos is an upscale restaurant in Coal Harbour, right on the water. Great food and you’ll be looking out over the water at boats and trees. What more could you ask for? Try the seafood.

Elbow Room Cafe. This is hands down my favorite breakfast place in Vancouver. Run by two old gay men, the restaurant specializes in good food and verbal abuse. It’s kind of hard to explain in words, but if you find yourself looking for a good breakfast I recommend you experience it for yourself.


Wow.. ok, that’s enough about food. I just sort of brain dumped. You should be able to google any of those restaurants for more information, and they’re all well known enough that a concierge or stranger could help you find them. Also, I’ve been away for a while so I may not be giving you the latest and greatest.

As for things to do, I mostly just recommend places to go. Robson St is the shopping district. Granville St is the main clubbing area. Yaletown is the more upscale restaurants and nightclubs. The Stanley Park seawall is pretty awesome. Check out the Denman and Davie area. I also recommend heading over to Kitsilano Beach and 4th ave. Vancouver has plenty of diversity, from beaches to museums. Take it all in.

Plenty of people seem to like the Capilano Suspension Bridge. The suspension bridge hangs over the Capilano river and can be exciting if you’re a little nervous about heights and they have a nice nature walk with some details of the area. Honestly, it’s all a little too safe for my liking. I prefer to visit the Lynn Valley one. The bridge is far more unstable and the trip is cheaper.

If you’re looking for great views, you can either catch the gondola up Grouse Mountain ($40 each) or drive up to the lookout on the way to Cypress Mountain (Free + Gas). If you’re a hiker and want to really get a workout, the Grouse Grind is a fun challenge. It take about an 90 minutes if you’re in good shape. ( If you want nice views but don’t feel like leaving the city, check out one of the rotating restaurants. Personally, I’ve never eaten at them, instead preferring to just eat somewhere delicious nearby and grabbing an afternoon or evening drink there while enjoying the views.

Delete All Tasks in a Wunderlist

I’ve been experimenting with a CulturedCode Things -> Wunderlist import tool, and it’s resulted in a few mix ups that left hundreds of items not where I wanted them. Instead of being filed in their own list, they are sitting in the inbox. Because it’s the inbox, I can’t just delete the list. To delete them all, I would have to click on each one and confirm the prompt. Kind of a pain in the butt.

Now, Wunderlist doesn’t have an API, but what they do have is a web based version of the tool. So, I figured that I could inspect their code and then write some JavaScript to do the deletion for me. Turns out I was right.

Here is the code I came up with. In order to use it, I’ve turned it into a bookmarklet. Just drag the following link up to your Bookmarks bar in the browser. When you open up a list in Wunderlist and click on the bookmarklet, it will confirm that you want to proceed before removing all of the items.

Delete All Wunderlist Items in a List

If you’re curious about the actual code, you can check it out in this gist: Delete all wunderlist items in a list.

If you have any questions, just let me know. :)

Translating HTML in a Chrome Extension

I have been working on updating my Live CSS Editor chrome extension to add some new features, and in the process, I figured I would set it up so that it could be translated into other languages.

Chrome has a pretty nice translation setup, which you can learn more about on their internationalization docs. It works great for any javascript, css or manifest files, but I wanted to translate the text in the HTML options page.

It turned out to be pretty easy.

First, I used an HTML data attribute to specify what the messagename would be for each area. If the element wasn’t already wrapped in an HTML tag that was specific enough, I just wrapped it in a span.

For example:

<h1>Live CSS Editor Options</h1>


<h1 data-message="optionsHeaderTitle">Live CSS Editor Options</h1>

This lets me specify what key each section would use from the messages hash. Once that’s setup, a few lines of Javascript does the replacement for me as soon as the page is loaded:

var objects = document.getElementsByTagName('*'), i;
  for(i = 0; i < objects.length; i++) {
    if (objects[i].dataset && objects[i].dataset.message) {
      objects[i].innerHTML = chrome.i18n.getMessage(objects[i].dataset.message);

This code loops through each element on the page, and if the element has a data-message attribute, it swaps the content of the element with the translation from the messages hash.

Of course, for each messagename you’ve added to the page, you need to setup an equivalent entry in the messages.json file. For more information on this, checkout out the internationalization docs.

This is a fairly simple solution, and dosen’t cover every internationalization situation. However, for taking care of something like an options page, it works just right.

Hiking Harder Kulm in Switzerland

Today we decided to hike up this mountain to a place called Harder Kulm. The hike is supposed to take about 2 hours and 30 minutes.

Off to Paris

Waiting at SFO for our slightly delayed flight to Paris. :-)

On Being an American

As someone who has a number of rather generic email addresses, I always end up on the strangest mailing lists. Sometimes, I even end up on personal email lists with the people mistaking me for one of their parents or close friends. Usually, I would reply to these and let them know they have the wrong address, but every now and then the content is just far too interesting for me to forgo.

In the latest occurrence, I seem to have ended up on a particularly private list that continually sends me some of the most un-informed and “patriotic” emails I have ever seen. Apparently, the person thinks they are emailing their dad. I have been debating how to respond to this for a while, but I thought I would post some thoughts on the whole liberals vs republicans situation while I mull it over.

A common rally cry that I have seen: “If you’re offended why don’t you get your liberal butt out, and take all the fruits and nuts with ya.

I believe that the divide between the “liberals” and the “republicans” is mostly a farce to keep us worked up and distracted from the real issues. Regardless of what label is assigned to different groups by the media or by our “opponents,” we are all Americans and extensibly, Humans.

I think any American, regardless of political or religious affiliation, would stop to help their fellow man; Whether it be picking them up when they’ve fallen down or giving them a meal when they are going hungry.

At the end of the day, we are all in this together. We are humans, and we all want the best for our friends and family. The misunderstandings are mostly over-emphasized by the media and a lack of understanding.

In every country I have been, I have met people with good morals and people with bad morals. I assure you that the good far outweigh the bad. However, we have all been conditioned to be afraid of change and afraid of the unknown. We have become complacent instead of inquisitive. This, at the end of the day, is at the root of our issues as a culture.

Studies in happiness have shown that we, as humans, are most happy when we can do two things:

  1. Trust our neighbors.
  2. Give.

Every religion on earth, at their core, focuses on those two things. It is through understanding and respect that we gain trust and it is through compassion that we can learn to give. Regardless of what we say every morning, those two behaviors should be at the root of who we are, and try to be, every day.

How can we trust each other if no one is willing to be inquisitive? How do you value someone’s opinion if they don’t understand the topic they are commenting on? How can we be compassionate if we are not willing to understand the plight of our fellow man?

It is far too easy to join hands with people of the same opinion and start a rally cry. Instead, I implore everyone to take the time to research the things they don’t understand and form their own opinion. 

As a country built by immigrants over hundreds of years and hard fought battles, it seems we have lost scope of what mattered in the first place.

We, as Americans, are all in this together, regardless of differences. Not for comfort, but for prosperity. I believe it is important to keep that in mind as we venture into this new world that embraces a global economy and a connected people.

Fresh Powder at Squaw

8 inches of fresh powder at squaw and we’re first on the mountain. Epic! (Taken with Instagram at Squaw Valley Ski Resort)