Thursday, June 28, 2012

Tomato, the Macintosh, and the Asus RT-N16

If like me you read Jeff's post, bought an Asus RT-N16 intending to run Tomato, realized that the way Jeff upgraded his firmware was by using the Windows-only manufacturer-supplied utility, and you only have a Mac handy—then this post is for you. Below are instructions for upgrading the router's firmware from the terminal, assembled from a few existing articles, and personally validated by me.

Pre-requisites: some comfort at the command line, some familiarity with firmware upgrades.

First of all:

  1. Download the appropriate Tomato USB firmware. You'll need a "Kernel 2.6 for MIPSR2 Routers" version; I used Ext build 54, and I've read that the VPN build works too. Either way you're going to end up with a file like tomato-K26USB-1.28.9054MIPSR2-beta-Ext.trx.
  2. From the menu bar icon, turn off the Wi-Fi on your Mac. We'll not be using that interface.
  3. Connect your Mac via ethernet cable to LAN Port 1 on the router.
  4. Turn the router on.

Now, to perform the upgrade, open Terminal.app or your preferred terminal.

1. Turn off your Mac's ethernet interface:

Isaacs-MacBook-Air:~ isaac$ sudo ipconfig set en0 NONE
Password:
Isaacs-MacBook-Air:~ isaac$

2. Reset the router's NVRAM: hold down the WPS button on the back of the router for 30 seconds. Still holding the button, unplug the router and wait for 30 more seconds. With the button still held down, plug in the router and wait 30 more seconds. Now release the button.

3. Now put the router in recovery mode: unplug it, and then plug back in again while holding the "Recovery" button.

4. Bring your Mac's ethernet interface up with a manually-configured address

Isaacs-MacBook-Air:~ isaac$ sudo ipconfig set en0 MANUAL 192.168.1.2
Isaacs-MacBook-Air:~ isaac$

5. Confirm that you can ping the router at 192.168.1.1:

Isaacs-MacBook-Air:~ isaac$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.053 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.217 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.080 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.093 ms
^C
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.053/0.111/0.217/0.063 ms
Isaacs-MacBook-Air:~ isaac$

6. Upload the new firmware using tftp, and wait 90 seconds:

Isaacs-MacBook-Air:~ isaac$ tftp 192.168.1.1
> binary
> put tomato-K26USB-1.28.9054MIPSR2-beta-Ext.trx
6284824 bytes, 2.8 seconds
> q
Isaacs-MacBook-Air:~ isaac$ sleep 90
Isaacs-MacBook-Air:~ isaac$
(update 8/31/2014: some folks have reported their routers to take much longer than 90 seconds to install the newly uploaded firmware. If in doubt, or having problems, you may want to wait up to an hour or two)

7. Unplug the router, and plug it back in again with the WPS button held down. Hold for 30 seconds as the router boots up.

8. Swtich your Mac's ethernet to DHCP:

Isaacs-MacBook-Air:~ isaac$ sudo ipconfig set en0 DHCP
Password:
Isaacs-MacBook-Air:~ isaac$

9. Open the configuration page at http://192.198.1.1/ (username admin, password admin) and change the admin password.

10. Enjoy Tomato!

Wednesday, June 27, 2012

One thing I find rewarding

I've been realizing this recently:

It's honestly a privilege.

My first job after my post-grad was in 1996, writing software for use by pharmaceutical companies doing animal testing. I joined an investment bank in London a year later—one of the few people, I suspect, actually to move to higher moral ground in joining the financial sector. Since then I've worked at a tiny London startup, an enormous US telco, a small specialized software product company, Google, and now Twitter.

At every single place along the way I've met great people. There are folks I'm still in touch with, and happily so, from all of these places. I love learning things and I've learned a ton. I enjoy challenges and I've faced them everywhere I've worked, without exception.

Out of the set, though, only Twitter is all about a product I really love and it makes the hugest difference. It's a lot to compete with.

Friday, June 15, 2012

New Arrival

Unlike last time, this one was really pretty sudden.

Wendy had been having contractions for most of the evening but it didn't seem like anything was imminent. I even tweeted:

That was at 10.04pm.

At 11.15pm when we were going to bed, Wendy said she thought that she might actually be going into labor. I called ahead to the hospital, we asked our friend Matt to come over to watch Lux for the night, and we drove to the delivery ward. From this photo it looks like we were settled into our room about 40 minutes later:

um, hi

Pretty much straight away the hospital staff confirmed that they were going to do a c-section and get our baby out. They paged the relevant people and started preparing, and by about 2am we were going into the operating room:

current status

Boy, don't things go quickly from there! At about half past two we met our new family member:

Baby!
and here she is, ten hours old:
@thesprouut
Hand

Lux met her the very next day. She was, and is, transfixed:

@thebeean meets @thesprouut
as well as so very gentle:
@thebeean meets @thesprouut

Wendy and the baby both made amazing recoveries and were discharged from hospital two days ahead of schedule. Born 2.33am PDT on 12 June 2012, weighing 7½lbs, we're thrilled to welcome Cecilia Hepworth to the world and to our home.

See a few more photos here.

Tuesday, June 05, 2012

An RFC 1912 mea culpa

This blog's been powered by Blogger for over a decade. That takes it back to a short while even before Blogger was acquired by Google (Blogger founder @ev would later found Twitter, where I work). Back in 2002 I was using FTP to host it myself, and had this splash page:

isaachepworth.com, 2002

In 2003 I upgraded to a zeitgeisty orange

isaachepworth.com, 2003
but continuing the square photos motif.

This design stuck until Spring 2006, when I applied for a job at Google. At that point I switched to a more conservative look (yeah, whatever), ultimately settling on the current theme "Minima" (by coincidence created by Doug Bowman, currently Design Director at Twitter).

isaach.com, 2012

Not until 2010, though, did I switch off FTP publishing to my own host—and move to a fully Google-hosted setup with my custom isaach.com domain. That's when the trouble started.

Thing is, I took a few liberties with DNS. To use a custom domain with Blogger you need to CNAME your custom domain to ghs.google.com (which in turn CNAMEs to ghs.l.google.com). It makes a lot of sense that it would work this way, of course it does, but the snag is that DNS doesn't support a CNAME record in the root of a domain (RFC 1912, §2.4, "A CNAME record is not allowed to coexist with any other data", and of course you need your SOA and NS records in the root).

The net is that you can't run a Blogger-hosted blog in the root of a domain, eg. at isaach.com. It's really that simple.

What you can do, though, is ignore this fact and use a DNS provider which allows you to violate the RFC. Hello, zoneedit!

However, be warned. If you go this route then here's what will happen:

  • in the beginning everything will work just fine;
  • over time you'll hear about some people having intermittent troubles reaching your site;
  • you'll blame things on user or configuration error;
  • you'll build pagerank and inbound links to permalinks in your root domain;
  • gradually you'll hear more and more that people can't reach your blog;
  • eventually you'll investigate and identify the issue;
  • you'll spend a weekend futzing with nameservers;
  • you'll curse yourself while configuring permanent redirects from rootdomain.com/x/y/z to blog.rootdomain.com/x/y/z; and
  • you'll write a blog post cautioning others.

My advice, then, writing now at blog.isaach.com: don't mess with the RFCs, even if it seems like you can get away with it.

Friday, June 01, 2012

Beta SF Neighborhoods

Often I've found myself somewhere familiar in San Francisco, thinking "is this technically Mission or Noe or Castro?" — or somewhere completely unfamiliar, thinking "I wonder what neighborhood this is".

So I made this thing. It's an iPhone app which tells you where in San Francisco you are. This is me, at home:

Home

It doesn't show you a map, or tell you the history of the neighborhood, or link to Wikipedia, or provide droll stereotypes or give you vital stats like population or elevation or weather. It just tells you what neighborhood you're currently in—and how far you are from the closest adjacent neighborhood. That's it.

I say "iPhone app" and I mean that in the same sense that Steve Jobs did in 2007 when he announced that the iPhone would support third-party apps. It's a web page.

Add it as a bookmark to the home screen, though, and it's pretty app-like. It works like this

It's barely even a beta; more of a steel thread. But hey, have at it: visit isaa.ch/sf on your iPhone, and add a bookmark to your home screen.

Some limitations, even within the admittedly narrow feature scope:

  • you pretty much have to be in San Francisco for it to be of any use;
  • if you're not in San Francisco then not only will it be no use but the distance calculation (which depends on a pretty rough and ready approximation from spherical to planar geometry) will become less accurate the further you are away; and
  • error cases aren't handled terribly gracefully.

That said, I use it myself all the time and find it useful. Next steps are probably factoring the code into something sane and putting it on Github. Don't hold your breath.

Monday, May 14, 2012

#newtwitterhq

The New Twitter HQ has been in the news recently, and we'll be moving in soon.

I've been lucky enough to get a few sneak peeks in the last few months. Thanks to the supportive facilities, executive and comms teams I've been able to visit regularly and share pictures of the build-out from January, February, March and May. Somehow it didn't quite happen in April.

My most recent visit had a new aspect, though: I was able to take some shots of the exterior from the roof of a nearby tower. From thirty floors up, I took this

#newtwitterhq
and this
#newtwitterhq
and this
#newtwitterhq roof

I snapped a few more from the top of that tower, though, and those—as well as an update on the Neighborhoods App, are to come.

Monday, April 30, 2012

San Francisco Neighborhoods

I've lived in this city for nine seven years now. It's the best place I've ever lived. About the same population as Frankfurt, same land area as Cambridge, pretty much as sunny as Denver, similar cultural diversity to that of London, and by now it feels more like home than my original hometown Sheffield.

I find the neighborhoods endlessly fascinating, too. The neat-o posters:

the microclimates and sub-microclimates, now with an associated iPhone app:
The app provides a detailed listing of the temperature, cloud cover, wind speed and chance of precipitation for 17 different San Francisco microclimates. Developer Michelle Sintov came up with the idea during her daily bike commute from the Richmond to SoMa. "I'd hit Divisadero Street and suddenly see the sun," she told [us] with a laugh.

- New iPhone App Shows Weather Forecasts For Every Neighborhood In San Francisco, Huffington Post
the passionate upstart neighborhood-wannabes and the enormous diversity of opinions on what the neighborhoods are, from the sublime to the unreadable.

The boundaries between neighborhoods are interesting in particular. Where exactly does 18th Street, going East to West, transition from Dogpatch to Potrero to Mission to Mission Dolores to Castro to Upper Market? What precise shapes to these perfectly tessellating areas take?

Obviously the notion of neighborhood borders as zero-width lines is a fiction. Nonetheless it's a fiction with significant appeal to someone with a mathematical background and an Aspergic heritage. I've often found myself somewhere familiar in San Francisco, thinking "is this technically Mission or Noe or Castro?" — or somewhere completely unfamiliar, thinking "I wonder what neighborhood this is".

So I made this thing. It's an iPhone app which tells you where in San Francisco you are. This is me, at home:

Home

It doesn't show you a map, or tell you the history of the neighborhood, or link to Wikipedia, or give you vital stats like population or elevation or weather. It just tells you what neighborhood you're currently in—and how far you are from the closest adjacent neighborhood. That's it.

Next time: how it works and how I made it. And if, in the meantime, you live in San Francisco and you're interested in trying it out for me, let me know.

the best idea I had to reject from an early tester was listing imports and exports of the neighborhood, eg. "Mission District. Imports: cheap beer; Exports: hipsters"

Tuesday, March 20, 2012

Multiple Chromes

Same disclaimer as last time: I worked at Google for years. I left voluntarily, and still consider myself extremely fortunate to have worked there. I'm very lucky to count many current Googlers amongst my friends, etc etc.

Update (March 20th): some are saying that the latest Chrome includes a working multi-account feature. In actual fact, as far as I can tell, this bug with 2-factor has never been addressed. Still, some claim to have this working.

A little while ago I ranted about trying to use multiple Google accounts with Google services in a single Google browser. Google claims that this stuff is supported but it's plainly not. The fact that they make this lie is probably the second most frustrating thing about the whole situation; the most frustrating thing being that it doesn't work in the first place.

With a calm reasonableness which was itself infuriating, Matt suggested just using two browsers (Chrome and Safari, Chrome and Rockmelt, Safari and Firefox, whatever). Obviously this is crazy, but wait:

Before you dismiss the 2 browser approach out-of-hand, consider its merits:
  1. Clear, consistent behavior - check
  2. Open a new tab, navigate to your fave Google application, be automagically signed in using the account you expect - check
  3. Spatial organization of work and play - a Good Thing
I'm not sure the behavior you expect from 'proper' multi sign-in to be, but I don't think you could expect number 2 to be supported. Drawback is, you might need to copy the odd YouTube URL from your work email to your personal Space.
Once I'd overcome what Matt called my "righteous indignation" I decided to give it a go. Rather than actually different browsers, though, I figured I'd use side-by-side "work" and "personal" Chrome instances—using different profiles.

And, cutting to the chase, I confess that it's indeed a solution effective enough that the problem is no longer near the top of my list of computing annoyances. That's a score, I guess, and here's how I did it.

First of all I found DeWitt's "Chrome Profiles on OS X" guide (the core idea), and ark's "Multiple Google Chrome Profiles on OS X" (a different approach). I took a look at both and eventually ended up with this script:

I made this into an executable on my path called make-a-chrome. You can use it like this:

Screen Shot 2012 03 20 at 7 35 25 PM
Look at that! Two independent Google Chrome apps in ~/Applications.
Screen Shot 2012 03 20 at 7 40 31 PM

The icons are just the default "no icon" icon but you can fix that by assigning whatever icons you like. More annoying than that is the fact that both have the same icon in the Application Switcher:

2012 03 20 07 49 10 pm
and the best I've got on that front is that hey, you get used to it. Send fixes if you know of them.

But hey, you've got two side-by-side independent Chrome instances. Each has its own history, bookmarks, cache, cookies, tabs, autofills, saved passwords, themes, extensions… it works great. One pro tip I can offer is to install different themes for each instance so you can tell them apart at a glance. I used some kind of brushed metal thing for work:

Screen Shot 2012 03 20 at 20 06 20 PM
and a pencil drawing thing for personal:
Screen Shot 2012 03 20 at 20 06 23 PM

The only other thing to realize is that the first-launched instance grabs the OS-level http(s):// protocol handler. For what it's worth, I launch my personal instance first so that clicks from Twitter.app (my main source of clicks into Chrome) launch a new tab in Chrome (personal)

I know, I know. Google should just fix this issue—or at the very least confess to it. The default situation is infuriating indeed. And while my indignation remains, my daily browser pain has pretty much disappeared. In practice the above solves the problem pretty well. Best of all, it's highly predictable. That alone is worth a lot.

Thanks Matt.

Saturday, February 18, 2012

Twitter Hacks

My new business cards arrived the other day:

new business cards have arrived
It reminded me to share some interesting bits and bobs related to work. The below isn't my full-time job by any means, but it's fun that I have on the way.

The hobby project I invested most time on in the last year was the Twitter mention constellations. I learned a huge amount on the way; I realized how much goes into taking a hack which works on one's own machine to one which works for others; and I'm excited that a 4-foot-square mounted version of my work is on the wall at Twitter HQ.

More recently this was one of mine:

Breaking news in Twitter
Sad times, no doubt, but it's nonetheless fascinating to see the data behind such phenomena. I was very impressed by SocialFlow's detailed work on the topic too.

More whimsically, I also shared this one recently

Length Distribution of Popular Tweets
in case you were wondering how long you should make your tweets for maximum engagement.

I also did

MTV versus Earthquake
which (see detail on Flickr) shows the spread on Twitter of an on-air hashtag versus news of a seismic event.

One of my favorites is still this:

Rick Perry's Oops
for which the context can be found on YouTube.

Saturday, February 04, 2012

January 2012 in England

We'd not been to the UK since November 2010 when Lux was just 3½ months old. That trip was pretty straightforward kid-wise: she slept for most of the flight over, and was sketchy enough sleep wise that timezones were somewhat academic.

This time things were different. At 18 months, as you might expect, Lux significantly more fidgety and needy in transit—and the jet lag thing was just crazy. Every day we were there, Lux was wide awake from 1am to 6am; Wendy, me and a grandparent would take shifts staying awake with her. Everyone in the house was pretty much just grazing on sleep for a week.

Fantastic time, though.

Great to see my dad again after the longest I've ever gone without seeing him:

Dave
and in turn the longest he's been without hanging out with his granddaughter:
Dave and Lux

A chance to reunite with my sister's fantastic kids: #1

Tate
and #2
Gil
and of course my sister and brother-in-law themselves:
Zoe and Brian

I saw my brother Jak (a bit):

Jak
Lux got to know her cousins a little:
Lux and Tate
and I strolled around the English countryside with my mom and Wendy and Lux:
Sue and Isaac
Lux and Isaac

All in all, a wonderful time with my very favorite people.

Sue and Wendy
Wendy and Lux
Wendy and Lux

Friday, January 13, 2012

New Year Link Clearance

I had occasion on my flight to Austin today to partially catch up on my Instapaper queue. Here are a few of the pieces I read and liked:

Also, I didn't make it all the way through this one but I gave it a shot: Joint Calls from The Central Committee and the Central Military Commission of the Workers' Party of Korea on the centenary of the birth of President Kim Il Sung. Another eye-opener.

Thursday, January 05, 2012

Electoral reform, compendium

I had some time off work over the New Year, and wrote a few things: