Home | Random | Downloads | About | Hikes | WebCam | Search | Sitemap | Email | Feed

San Bruno Mountain 360 4K

San Bruno Mountain 360 4K

360 degree 4K timelapse of San Bruno Mountain in San Mateo County, California.

(Previously, Previously)

Share:

Great Blue Heron at Crissy Field

Great Blue Heron at Crissy Field

Share:

Automate Google PageSpeed Insights with Apps Script

Upload

Here's a quick script to automatically monitor your Google PageSpeed Insights desktop and mobile scores for a web page:

var pageSpeedApiKey = '...';
var pageSpeedMonitorUrl = '...';

function monitor() {
  var desktop = callPageSpeed('desktop');
  var mobile = callPageSpeed('mobile');
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = spreadsheet.getSheetByName('results');
  sheet.appendRow([
                   Utilities.formatDate(new Date(), 'GMT', 'yyyy-MM-dd'),
                   desktop.score,
                   mobile.score
                  ]);
    
    // more available, i.e. desktop.pageStats.numberResources
}

function callPageSpeed(strategy) {
  var pageSpeedUrl = 'https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=' + pageSpeedMonitorUrl + '&key=' + pageSpeedApiKey + '&strategy=' + strategy;
  var response = UrlFetchApp.fetch(pageSpeedUrl);
  var json = response.getContentText();
  return JSON.parse(json);
}

You need a spreadsheet with a tab called results and an API key for PageSpeed Insights (activate the API in the console and create an API key for it, the browser based / JavaScript option). Paste the code above into the script editor for the spreadsheet and add your API key and URL to monitor. Then just choose triggers from the Resources menu and schedule the monitor function to run once per day.

Note that this currently just logs the overall score. There are a bunch of other values returned (like number and types of resources on the page) that you could choose to monitor as well. It would also be easy to extend this to monitor more URLs, or to send you an email if the score drops below a threshold.

Share:

Prior Artist

Alexander Reben is automatically generating all possible prior art. Which will probably take a while.

Instead, why not stop examining patents altogether?

(via Boing Boing)

Share:

Golden Gate Park from Grand View Park

Golden Gate Park from Grand View Park

Share:

New Scientist on Immigration

New Scientist on Immigration

The April 6 issue of New Scientist has a special focus on immigration. All worth a read, but here's an assessment of the horrible cost:

"A meta-analysis of several independent mathematical models suggests it would increase world GDP by between 50 and 150 per cent. “There appear to be trillion-dollar bills on the sidewalk” if we lift restrictions on emigration, says Michael Clemens at the Center for Global Development, a think tank in Washington DC, who did the research."

And the uncontrollable hordes:

"Niger is next to Nigeria, Nigeria is six times richer and there are no border controls, but Niger is not depopulated. Sweden is six times richer than Romania, the EU permits free movement, but Romania is not depopulated."

Time for open immigration?

Share:

The real reason Americans don't have passports

The real reason Americans don't have passports

Less than half of Americans have passports compared to around 75% in the UK. Brits often use this statistic to mock Americans for being uncurious provincial stay-at-homes.

I've always felt this was unfair though. As an American you might have visited all 50 states, all of the National Parks and maybe thrown in Canada, Mexico and Puerto Rico without having ever bothered with a fully fledged passport.

A Brit on the other hand might have spent a few days eating fish and chips at a British pub in Benidorm and is suddenly a sophisticated world traveler. I don't think so. There is simply more to see and experience in the US without needing to cross a border.

After I moved to America I realized that maybe there was another reason. Americans for some reason don't bother taking vacations. You get massively less vacation time over here and even then a huge number of people don't even manage to take off their paltry few days. There is no effective way to have a holiday overseas if you never take a holiday.

Now I realize that neither of these factors is as important as the United States Postal Service if you have a kid.

In the UK to get a passport you mail in an application and get back a passport. It's pretty easy. Even for children.

In the US you need to go to a Passport Acceptance Facility and that probably means a post office. There is a handy website that lists the 10 closest facilities together with their phone numbers so you can call to make an appointment. These phone numbers are not answered. It's less like a basic government service and more like trying to bag a ticket to Glastonbury.

I gave up and delegated to Fancy Hands (a personal assistant service). They have spent two days on the phone trying and failing to get an appointment.

I was going to do my best to vote my principles this year but at this point any presidential candidate who would force USPS to put in a web scheduling system might just get my vote.

Updated 2016-04-18 23:23:

After I posted this a friend pointed me at the United States Digital Service (via this Ted Video) and basically said why bitch and moan when you could help fix it. Which I don't have a great answer to. Except this.

Share:

Clouds Over The Farallones

Share:

Book reviews for March 2016

The Girl on the Train by Paula Hawkins

The Girl on the Train by Paula Hawkins

2/5

I found it hard to care for anyone in this book. Pedestrian mystery.

 

Half Way Home by Hugh Howey

Half Way Home by Hugh Howey

3/5

Getting into diminishing returns here. Good, but not Silo/Sand good.

 

Beacon 23: The Complete Novel (Beacon 23 #1-5) by Hugh Howey

Beacon 23: The Complete Novel (Beacon 23 #1-5) by Hugh Howey

3/5

 

Share:

West Portal Mosaic Timelapse

West Portal Mosaic Timelapse

A mosaic timelapse looking over the Pacific from West Portal, San Francisco (a simultaneous timelapse of 225 days from mid 2015 to early 2016).

This is the second in a series of videos made from frames I captured from a Nest cam using  Google Apps Script. Music from JukeDeck.

(Previously)

Share:

Next Page

I Thought He Came With You

Robert Ellison's Blog

7,250,101,804 people still need to read this blog.

Google Inbox Account Switching

Google Inbox Account Switching

Monthly Email Update