Just received detailed instructions for caring for a pink seahorse stuffed animal. Including what to do if she gets hungry or starts whining.

Waiting for Apple Watch

I know it only seems like everyone I know got an Apple Watch today, but my Twitter feed is full of photos of white boxes.

My watch order confirmation shows a 12:06am US/Pacific timestamp, but my order hasn’t even moved into “preparing for shipment” status yet. I saw one note on Twitter that indicated the cutoff for this first batch was likely 12:03am. I couldn’t even get the Apple Store app to load until around that time. I wonder how many orders were placed in those first few minutes.

Or perhaps the delay in delivery has to do with shortages for specific models. I ordered the Steel + Milanese Loop band, where most of the deliveries I’ve seen so far are for the Sport model. My order still shows a 4/24-5/8 delivery window, so I guess I’ll be seeing it sometime in the next two weeks.

Setting the wp_remote_get() User Agent

I was recently trying to make some API requests from within WordPress using `wp_remote_get()`, but the site I was asking for data from was rejecting requests from the default WordPress User Agent. I tried to set the user agent to something different, but it still wasn’t working:

$response = wp_remote_get($url, array(
  'timeout' => 20,
  'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0'
));

Thankfully, Otto spotted my problem. The `user-agent` key needs to be lowercase so that it is picked up properly by the WordPress core code. This works:

$response = wp_remote_get($url, array(
  'timeout' => 20,
  'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0'
));

And there you have it. It’s always nice to have an extra set of eyes on some code.

Share Icon on Google Homepage

share-icon-google

It was very cool to see the Share Icon on Google’s homepage today. Thanks to Mark for making sure I saw it. This post is part of the project: Share Icon. View the project timeline for more context on this post.

I just happily paid for another 2 years of FastMail1 service for my personal email. I’ve been using them since 2004 and can’t recommend them highly enough.


  1. This is a referral link. 

When using a framework, any framework:

source code > documentation.

Always read/reference the source.

Local *.dev and *.app via Dnsmasq on Mac OS X

I am in the process of setting up a development environment on a new machine and one of the things I decided to do is route all .dev domains to my local (built-in) Apache web server while I route all .app domains to my Laravel Homestead Vagrant environment.

To never have to monkey with your hosts file, Apache can be configured to serve any .dev domain that matches an existing folder name from a base directory. The Homestead.yaml file handles domain-to-directory mapping explicitly for the Laravel Vagrant environment.

This ended up being really easy – the things I needed to know were:

  1. what to put into the dnsmasq config
  2. how to stop and start dnsmasq

All of the “install Dnsmasq mac” tutorials out there seem to work fine. Assuming, you’ve already installed Homebrew, it’s as simple as:

brew install dnsmasq

From there, you’ll follow the recommended step from the installer output to create your config file:

cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf

Now open that file in your favorite editor and replace its contents with:

# General sites (Apache)
address=/.dev/127.0.0.1

# Laravel Homestead (Vagrant)
address=/.app/192.168.10.10

Lastly, stop and start Dnsmasq to apply the changes in the config:

sudo launchctl stop homebrew.mxcl.dnsmasq
sudo launchctl start homebrew.mxcl.dnsmasq

That’s it! Or at least that’s all it took for me. I hope your experience is as easy as mine was.

Now to set up Apache to handle anything with a .dev suffix from a matching directory from my Sites dir. Add this to your vhost configuration:

<Directory "/Users/example/Sites/">
  AllowOverride All
  Options Indexes MultiViews FollowSymLinks
  Require all granted
</Directory>

<VirtualHost *:80>
  ServerName local.dev
  ServerAlias *.dev
  UseCanonicalName off
  VirtualDocumentRoot /Users/example/Sites/%-2.0.dev/
</VirtualHost>

Restart Apache with errors returned to find errors in your config:

sudo apachectl -e info -k restart

If you get a 403 error when loading your site in a browser, make sure that every dir in the chain to the web root has the “execute” permission. Add it via:

chmod +x dirname

That should do it.

Improvements/corrections to the above solution are welcome. Enjoy!

Star Wars VII, Trailer 2

The new Star Wars trailer is fantastic. Take a minute to look at the scene by scene breakdown at The Verge. And today the Battlefront game trailer was released. I’m not a gamer, but this looks pretty impressive.

OS X Reviewed →

Thanks to John for writing the canonical OS X reviews for so long. It sometimes took me weeks to finish them but I always learned things that helped me get more out of my tools. I look forward to hearing his thoughts on the next OS version on ATP.

An Interview with The Dan Plan →

An interesting Q&A session with the fellow who is testing the Malcolm Gladwell 10,000 hours posit by learning how to golf. I was interested to see he’s a 3 handicap now, about halfway through his journey.

Twitter and What Might Have Been →

Indeed, I would argue that what makes Twitter the company valuable is not Twitter the app or 140 characters or @names or anything else having to do with the product: rather, it’s the interest graph that is nearly priceless.

This is a really interesting way to look at Twitter as a business: based on who I follow, searches I do, etc., they know what topics I’m interested in and am willing to spend time on. I agree that this type of “interest” data should be incredibly valuable as it’s own product.