ITHCWY Newsletter for April 2020

Red-Tailed Hawk

By Robert Ellison. Updated on Friday, May 22, 2020.

Red-tailed hawk in Stern Grove

Red-tailed hawk in Stern Grove, San Francisco.

Updated 2020-05-22 08:32:

Red-Tailed Hawk at Fort Funston, San Francisco

At Fort Funstion.

Add your comment...

Related Posts

(Recent Photos)

(Published to the Fediverse as: Red-Tailed Hawk #photo #hawk #fortfunston #sterngrove A red-tailed hawk spotted in Stern Grove, San Francisco, California. )

ITHCWY Redesign

By Robert Ellison. Updated on Sunday, November 6, 2022.

I've just launched a redesign of I Thought He Came With You. The main thrust is to make the site more usable on desktops. Which seems nuts, but the data doesn't lie. The site has low mobile traffic and for a while I thought this was some kind of technical issue. I optimized the design heavily for mobile and spent a lot of time on speed and some AMP. I guess it's the content. Google loves it when I write documentation for them and doesn't think I have anything useful to say on politics. They're probably right. So I've gone back to having an old school sidebar and I've taken the performance hit of using Bootstrap to get some better looking forms and navigation without spending a lot of time on it. I hope you enjoy it, and if you find anything broken please email or leave a comment.

Add your comment...

Related Posts

(All Etc Posts)

4K One Year Global Cloud Timelapse

By Robert Ellison. Updated on Saturday, February 19, 2022.

Hurricane Dorian in Catfood Earth

Six 4K images a day at 24 frames per second (so each second is four days) from April 18, 2019 to April 17, 2020:

I made a version of this video a couple of years ago using xplanet clouds. That was lower resolution and only had one frame per day so it's pretty quick. This version uses the new 4K cloud image I developed for Catfood Earth just over a year ago. I've been patiently saving the image six times a day (well, patiently waiting as a script does this for me). It's pretty amazing to see storms developing and careening around the planet. The still frame at the top of the post shows Dorian hitting Florida back in September.

Add your comment...

Related Posts

(All Code Posts)

(Published to the Fediverse as: 4K One Year Global Cloud Timelapse #code #software #video #timelapse #animation #clouds #earth Animation of a year of global cloud cover from April 18, 2019 to April 17, 2020. You can see storms developing and careening around the planet. Rendered from six daily 4K images. )

Starlink Train

By Robert Ellison. Updated on Saturday, May 8, 2021.

Starlink Train

Caught the end of a SpaceX Starlink Train last night - image above is three stacked six second exposures.

Update: check out this timelapse of three Starlink trains in a row.

Add your comment...

Related Posts

(Recent Photos)

(Published to the Fediverse as: Starlink Train #photo #starlink #stars Photo of a Starlink Train, three stacked six second exposures of Starlink satellites passing over San Francisco, California. )

Coronavirus Hikes: March 2020

Coronavirus Hikes: March 2020

Coronavirus Hikes: March 2020

Not getting far from home any time soon so all hikes for now will be local. I found a great web app, Routeshuffle, that will generate a random hike from the starting location of your choice. It's a great way of seeing streets you'd never venture down normally. The map is generated with some software I wrote to combine multiple KML files for easy rendering in Google Earth (oh, and Google Earth, I guess that does the heavy lifting). I'll post these every month while we're locked down. March is 15.6 miles total.

Hike starts at: 37.800778, -122.455943. View in Google Earth.

Add your comment...

Related Posts

(Hike Map)

(Published to the Fediverse as: Coronavirus Hikes: March 2020 #hike #coronavirus #sanfrancisco #map Pandemic lockdown hikes around San Francisco from March 2020 )

Social Undistancing

By Robert Ellison. Updated on Friday, April 17, 2020.

Social Undistancing

We have to be six feet apart in space but so far there are no rules on time.

Add your comment...

Related Posts

(Recent Photos)

(Published to the Fediverse as: Social Undistancing #photo #coronavirus Composite photograph of many people and cars walking past my house during the Coronavirus lockdown. )

Using the Azure Monitor REST API from Google Apps Script

By Robert Ellison. Updated on Saturday, February 12, 2022.

Average Server Response Time in Azure Metrics

This post describes how to get metrics (in this case average response time) from an Azure App Service into a Google Sheet. I’m doing this so I can go from the sheet to a Data Studio dashboard. I already have a report in Data Studio that pulls from Ads, Analytics and other sources. I’d rather spend hours adding Azure there than be forced to have one more tab open. You might have different reasons. Read on. 

  1. Create a Google Sheet and give it a memorable name. Rename the first sheet to AvgResponseTime and put ‘Date’ in A1 and ‘Average Response Time’ in B1.
  2. Create a script (Script editor from the Tools menu) and give that a good name as well.
  3. In the script editor pick Libraries from the Resources menu. Enter 1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF which is the Google OAuth library, pick the latest version and click Save.
  4. Select Project properties from the File menu and make a note of the Script ID.
  5. Log into your Azure Console and then go to https://resources.azure.com/. You are looking for a metricdefinitions node for the resource that you want to monitor. In my case it’s subscriptions / MyName Subscription / resourceGroups / providers / Microsoft.Web / sites / MySite / metricdefintions. Browse through this list to find the id of the metric you’re interested in. For me it’s AverageResponseTime. Finding this was the hardest part. Microsoft’s documentation for resourceUri is literally ‘The identifier of the resource.’ Why even bother Microsoft? Make a note of the id and remove the ‘metricDefinitions/AverageResponseTime’ from the end, because of course the ID isn’t quite right for some reason. Mine looks something like this: /subscriptions/mylongid/resourceGroups/mysomethingResourceGroup/providers/Microsoft.Web/sites/mysiteid
  6. Go back to the Azure Console and open Azure Active Directory. Select App registrations under Manage and create a New registration. Time to come up with another name. You probably want ‘Accounts in this organizational directory only’. The redirect URL is https://script.google.com/macros/d/SCRIPTID/usercallback - replace SCRIPTID with the Script ID you made a note of in step 4.
  7. Click the View API permissions button, then Add a permission and then pick Azure Service Management. I’m using Delegated permissions and the user_impersonation permission. Then click Grant admin consent for Default Directory.
  8. Go to Certificates & secrets (under manage) and create a new client secret. Make a careful note of it.
  9. Go to Authentication (under Manage), check Access tokens under Implicit grant and then click Save at the top of the page.
  10. Go to Overview and make a note of your Application (client) ID and Directory (tennant) ID.
  11. You are getting close! Go to the script editor (from step 2) and paste in the code at the bottom of this post. There are four variables to enter at the top of the script. ClientID and TennantID are from step 10. ClientSecret is from step 8. ResourceID is from step 5. Save the script.
  12. Reload the spreadsheet (back from step 1). You should get an Azure Monitor menu item. Choose Authorize from this menu. Google will ask you to authorize the script, do this for the Google account you’re using. Choose Authorize again, this time a sidebar will appear with a link. Follow the link and authorize against Azure (if you’re logged in this might just go directly to success). If you get authorization errors in the future run this step again. If that does help use Reset Settings and then try again.
  13. You should be ready to get data. Choose Fetch Data from the Azure Monitor menu. If this doesn’t work check through steps 1-12 carefully again!
  14. Last step - automate. Go back to the script editor. Choose Current project’s triggers from the Edit menu. Add a trigger (the small blue button hidden at the bottom right of the screen - not everything needs a floating action button Google!) to run fetchData daily at some reasonable time.
You should now have a daily record of average response time flowing to a Google sheet. This can easily be extended to support other metrics, and other time periods (you could get data by minute and run the script hourly for instance. See the metrics documentation for more ideas. I got this working for an App Service but it should be roughly the same flow for anything that supports metrics, you’ll just need to work on finding the right resourceUri / ID.

Add your comment...

More Google Apps Script Projects

(All Code Posts)

(Published to the Fediverse as: Using the Azure Monitor REST API from Google Apps Script #code #azure #appsscript #gas #google #microsoft How to call the Azure Monitor REST API via OAuth from Google Apps Script. Worked example shows how to log average response time for an Azure App Service. )

Book reviews for March 2020

The Unconsoled by Kazuo Ishiguro

The Unconsoled by Kazuo Ishiguro

5/5

Mostly read this in a deserted nightclub on the roof of a hotel in India with a warm but dirty breeze and some trippy chilled out music. It's the only way to read this strange book. Anywhere else I might not have enjoyed it quite a much after the first few chapters, but in the setting it was transcendental.

 

Add your comment...

Related Posts

(All Reviews)

ITHCWY Newsletter for March 2020

Actual, age weighted and age and life expectancy weighted results of the 2016 Presidential Election

More Bangalore: Timelapse featuring Tipu Sultan's Summer Palace, Lalbagh Botanical Garden, KR flower market, Bangalore Palace and Cubbon Park.

Coastal: an abstract timelapse of the California coast.

Jesse Wegman has written a book, Let the People Pick the President: The Case for Abolishing the Electoral College (review) and a NYT op-ed on switching to a more rational way of electing the President. If you support this idea I have a page on the topic with four concrete things you can do to help.

Hike to Kirby Cove Beach (Marin Headlands near San Francisco).

Tool to backup locked files on Windows 10 - great for XCOPY backups or just grabbing a locked file.

Previously:

Add your comment...

Related Posts

(All Etc Posts)