til

Originally, we decided to independently map Availability Zones to codes in each AWS account. This ensures that resources are distributed across the Availability Zones for these Regions, even if most customers chose the first Availability Zone in the Region. For example, the us-east-1a for your AWS account might not be the same physical location as the us-east-1a for another AWS account. As AWS learned more about customer usage patterns, and as AWS evolved, we determined that it was not necessary to continue to independently map Availability Zones to codes. All Regions introduced after November 2012 use a uniform mapping of Availability Zones to codes.

I was still under the impression that AZ IDs were mapped differently per AWS Account but this hasn't been the case for AZs in regions introduced after November 2012. The documentation also provides a sample command to run to find your specific account mapping for in-use AZs, I taked on the --region parameter at the end to specify a different region than your default.

aws ec2 describe-availability-zones --query "AvailabilityZones[].{Name:ZoneName,ID:ZoneId}" --output table --region eu-west-1

While on the topic, this page in the documentation lists out every AZ ID in each region with some more other example describe-availability-zone commands. This is also where I encountered the definition of a "constrained AZ":

As Availability Zones grow over time, our ability to expand them can become constrained. If this happens, we might restrict you from creating zonal resources in a constrained Availability Zone, unless you already have resources in that Availability Zone. Eventually, we might also remove the constrained Availability Zone from the list of Availability Zones for new accounts. Therefore, your account might have a different number of available Availability Zones in a Region than another account does.

Read from link

Edge cases make for interesting TILs. Here's one on attempting to create an S3 bucket that already exists in your account.

The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all AWS Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs).

Discovered via @whitequark on Mastodon.

Read from link

Google has created a way to simply list search results, simply by including the &udm=14 in the URL. I've long since switched away from Google, but it's nice to see.

It’s essentially Google, minus the crap. No parsing of the information in the results. No surfacing metadata like address or link info. No knowledge panels, but also, no ads. [...] It’s worth understanding the tradeoffs, though. My headline aside, a simplified view does not replace the declining quality of Google’s results

From Tedium via Stefan Judis' weekly newsletter.

Remember, what big brother gives, big brother can take away.

Read from link

TIL comments on StackOverflow, and the rest of the network of sites, are ephemeral and serve to solely improve the current question or answer.

Comments are a common feature on the Internet. Most, if not all, people understand the point of comments and how to use them… Except on the Stack Exchange network, where comments are meant to be ephemeral and primarily for the purpose of improving Q&A. This is different from how the rest of the Internet uses comments.

Discovered via a Stack Exchange Meta question.

Read from link

Alex shares how to create static maps using Python and in doing so calculate a position on the unit square from coordinates. There's helpful Python code and a link to the OSM wiki describing the maths behind it. This was something I'd struggled to do when trying to add new points to the tiny-world-map. I was able to adjust the base map and add my own cities and plan to use this to add railway stations to the media map.

Read from link

Stefan writes about how a <section> is essentially a <div> if an aria-label is not used. The <section> element would have been more prominent if browsers had implemented document outline functionality, which, according to Stefan never happened. So today, you can use <section>s to signal where a section begins and ends, an example given in the writing was a summary paragraph.

In my site and blog, I use <sections> a number of times, and TIL they're not much more than <div>s. I'll have to revisit my HTML templates and CSS and make changes.

Read from link

The author of TheCoffeeMachine gives a detailed walkthrough of how to add maps to a hugo site using uMap, which allows you to create maps based on OpenStreetMap (OSM) layers, and a shortcode that allows you to embed them. This is a belated TIL as I've already used this a few times, most recently for my post on the Tri-Country Train.

A rough overview of the steps involves signing up for and using uMap. This will allow you to create a map, set markers, and make the adjustments you need on top of existing OSM layer. From here using hanzei's hugo-component-osm theme you can embed the map into the hugo site using a shortcode. This includes passing in any parameters that uMap supports like coordinates to center the map and the zoom level.

I recommend reading the linked post for detailed steps. I needed to take this further and include a class within the iframe that's rendered on the page to able to style it with CSS. Unable to find a way to do this I forked and made my own addition. The pull request was created to the original repository if hanzei would like to include the changes. Here's a sample of what it looks like:

{< openstreetmap mapName="usa-train-lines-using-stadler-multiple-units_1100675" coordX="40.0731" coordY="-74.8924" scale="10" class="alignright" >}}

Read from link

Atom differs from RSS in a few key ways and for the better. Chris Wellons' blog post outlines a few of these differences theyve encountered while working on Elfeed for emacs. One thatve I run into before and find really odd is the use of <channel> when only one channel is permitted in an RSS feed.

Having a channel tag suggests a single feed can have a number of different channels. Nope! Only one channel is allowed, meaning the channel tag serves absolutely no purpose.

Atom is a much cleaner specification, with much clearer intent, and without all the mistakes and ambiguities.

Read from link