Winter Solstice 2016

Winter Solstice 2016

This is the first time I've been late with a solstice or equinox post. On the 21st of December at 10:44 UTC it was the start of Winter for the Northern hemisphere, Summer down south. Rendered in Catfood Earth (back dated to the right date and time... Windows, Android).

(Previously, Previously, Previously)

Train of Lights

By . Updated on

Train of Lights

Photo of the Train of Lights on the Niles Canyon Railway.

Tam Pan

By . Updated on

Tam Pan

Time-lapse panning over the San Francisco bay area from the Gardner Lookout at the east peak of Mount Tamalpais.

Book reviews for December 2016

By . Updated on
The End is Now by John Joseph Adams

The End is Now by John Joseph Adams

4/5

Review coming with book 3...

 

The End is Nigh by John Joseph Adams

The End is Nigh by John Joseph Adams

4/5

Review coming with book 3...

 

Night School (Jack Reacher, #21) by Lee Child

Night School (Jack Reacher, #21) by Lee Child

4/5

I much prefer flashback Reacher to modern day midwest town trauma Reacher. This is one of the best.

 

Rio Vista Bridge

By . Updated on

Rio Vista Bridge

Photo of The Helen Madere Memorial Rio Vista Bridge spanning The Sacramento River.

Pitcher Plant

By . Updated on

Pitcher Plant

A picture of a pitcher at the Conservatory of Flowers, Golden Gate Park, San Francisco.

Unidentified Butterfly

By . Updated on

Zebra Longwing Butterfly

Could be anything... (seen at the Conservatory of Flowers in San Francisco's Golden Gate Park, do please leave a comment if you know what it is.)

ASCII Sunset

By . Updated on

ASCII Sunset

A sunset timelapse rendered as ASCII art. Music from JukeDeck.

Expert

Expert

I haven't checked Klout for a long time - while I was away they've decided I'm a expert in Indian politics. Explains a lot...

Enable GZIP compression for Amazon S3 hosted website in CloudFront

By . Updated on

Enable GZIP compression for Amazon S3 hosted website in CloudFront

By default compression doesn't work in CloudFront for a website backed by an Amaxon S3 bucket.

The first step is pretty obvious - switch on compression in CloudFront:

Compress Objects Automatically option in Amazon CloudFront

To get to this setting open you distribution, go to the Behaviors tab and edit your behavior(s). Scroll down to the bottom and toggle Compress Objects Automatically to On. Save and drum your fingers while the distribution updates.

The less obvious piece is that CloudFront will only compress files between 1,000 and 10,000,000 bytes (as of writing this post) and it detects the filesize from the Content-Length header. What the documentation doesn't mention is that S3 does not send the Content-Length header by default and so no compression is applied.

Go to S3 and open the properties for your bucket (not for individual files). Expand Permissions and then click Edit CORS Configuration. You need to add Content-Length as an allowed header like this: