Neil Gaiman in NYC

Meghan gave me an awesome Christmas present: tickets to see Neil Gaiman read from his latest book, Norse Mythology at The Town Hall on February 9, 2017 in New York City.  She only purchased two tickets and it’s a Thursday night.  Too bad kids — you’re staying home!  (We arranged for our neighbor’s adult daughter Sam to stay with the girls for the night).

looking up the aisle on the trainAs the day approached I watched the weather forecasts with growing interest.  Snow was forecast for Thursday, the day of the event and the day we planned to travel to NYC.  By Tuesday the forecast was clear: snow, and possibly a blizzard.  Driving to NYC was out of the question, and flying would be problematic as well.  We have easy access to trains, though, assuming they would run in a blizzard.

The storm could not wait to arrive and it was snowing hard by the time we left the house for our local train stop.  In order to head south on Amtrak, we take commuter rail from our house to Boston’s North Station, the subway (or walk when the weather is nice, which is to say not this time) from North Station to South Station, and pick up Amtrak there.  The Amtrak train was scheduled to depart at 11:15, so we left the house by 9 am to catch everything on time.  As usual, we forgot a few minor things like toothbrushes, and had to purchase them when we got there.

pink unicorns
We watched people skating at the park for a while, until the pink unicorns came out — then it was time to leave.

Amazingly enough, train service ran perfectly despite being a real, legitimate, certified blizzard.  We had periods where we could not see the landscape at all, but the train continued to rock along at 100+ mph (verified via Waze on Meghan’s phone).  The ride from South Station to Penn Station is about 4 ½ hours.

By the time we got to NYC the snow had wound down, though it continued to snow back home for another six hours.  The streets were messy and wet, with snow piled up at every corner.  The hotel is only a few blocks from Penn Station, a few blocks from Times Square, and a few blocks from The Town Hall — NYC is great that way.

meghan at beer authority
I still wonder what she’s thinking here

We ate dinner around the corner from our hotel at the Beer Authority. The food was yummy, the beer selection is well-curated, and we had a very enjoyable time.  (I thoroughly enjoyed a Founders Porter and Meghan tried a Timmerman’s Strawberry Lambic that was surprisingly tasty.)

top of the empire state building at night
We popped out of the hotel, went around the corner, and had a (relatively) great view of the Empire State Building

We killed a little more time before the show by wandering the local neighborhood.  Times Square is always blindingly bright, but within a few blocks are much nicer views.

Finally, the main event: Neil Gaiman.  “Norse Mythology” was finished some time before the 2016 election, and every story in it is a faithful retelling of stories from the original eddas, but the story he chose to read was eerily appropriate: a book about the gods building a wall around Asgard to keep the ice giants out.   The reading was followed by a pair of previews, one for the American Gods miniseries (based on his excellent book), and one for a movie adaptation of an old story of his, How to Talk to Girls at Parties.  Finally, he came back out with Ophira Eisenberg for a Q&A session.  Mr. Gaiman is, by turns, very thoughtful and very funny.  Despite the cramped seats made for midgets with abnormally short legs we really enjoyed ourselves.

Neil Gaiman on stage
Neil Gaiman. He read a segment from his latest book, Norse Mythology, about building a wall around Asgard

The next morning we ate breakfast at the hotel and killed some more time waiting for our 11 am train.  We visited the Empire State Building’s lobby and checked out a few adjoining blocks.  Our train was delayed for nearly an hour due to “missing equipment”, but we got back to Boston by dark and back to our car by 6 pm.  (Rush hour on the subway is never fun, but all in all it wasn’t too bad.)  Glad to be home!

Loon Mountain

One of the perks that Meghan gets through her job are invites to swanky resorts.  Last week was Wentworth-by-the-Sea, this week was a client inviting her to the Loon Mountain Ski Resort for a day of snow sports.

meghan's snow-encrusted hat
The sleds kick up lots of snow, much of which winds up on the back of your head

Meghan and I don’t ski, but they have more than skiing; our activity of choice was sledding.  This isn’t any ordinary sledding, though: they seem to have repurposed an old ski lift and trail.  The sleds are snow-tubes with rails and brakes.  You take a lift up to the top, ride down for as long as 30 seconds, and head back up.  There were few other sledders so we had zero waiting.

After a group lunch with the client and their other guests, the two of us decided to sight-see.  We climbed in the car and drove up into the mountains along the Kancamagus Highway.  Despite the clouds the views were beautiful.

kancamgus pass overlook
Looking out from a scenic overlook just below the Kancamagus Pass (3k’ elevation)
looking back at Meghan
The sun was starting to peek out to the east, but west was still solidly clouded over. There had been snow earlier in the day, but only in these higher elevations.
disappearing mountain tops
The low clouds meant we couldn’t see the mountain tops, as they faded into the clouds

Wentworth-by-the-Sea 2017

Meghan’s employer invites all employees and their families to an annual three-day retreat at a fancy spa and hotel called Wentworth-by-the-Sea.  This is our second year.

Last year we mostly stayed n the hotel due to a snow storm, but this year we ventured out a bit to take in some local color.  We found a state park called Fort Constitution (also known as Fort William and Mary), which is situated inside the grounds of a Coast Guard station.

Fort Constitution
Fort Constitution, as seen from the water (or closest I could get it from the little tip of rock that extends out)

I don’t normally pay much attention to geology but the bit of rock that juts out into the water is very eye-catching.

striations in sedimentary rock
I was drawn to the striations in the rock. This is a great example of sedimentary rock with lots of iron in it.
striations in sedimentary rock
A different section, with a shoe for scale. The layer inclusion on the right (might no be the technical term) is what caught my eye

We also drove around a bit; the town is reminiscent of Mystic, CT.

NYE 2016

Date: Evening of December 31, 2016
Location: Boston, MA
Event: New Year’s Eve

baba and alpha
Baba and Alpha, watching the carousel

We rang in the New Year in traditional style: a night out in Boston.  This year we had the very good fortune to be joined by Baba (Meghan’s mother, the girls’ grandmother).

Most years we take a train into the city to avoid issues with ‘amateur night’ drivers, but not this year. Being a Saturday, the commuter rail only runs a limited schedule; there are extra trains but not until later in the evening.

We reserved parking right next to the Commons (Parking Panda to the rescue!) but planned to start the night at Quincy Market.  I dropped the rest of the family off there and ran downtown to park the car.  I made the short walk back to meet with everyone again in about fifteen minutes.

The Black RoseWe shopped a bit before getting an excellent early dinner at The Black Rose.  We’ve been there several times; despite it’s location right next to Quincy Market it doesn’t have the air of a tourist trap.  It does have excellent Guinness on tap, though!

Let me back up a few days before I present the next photo: both girls have had braces on their teeth for a long while, until this past week.  Beta will be getting a second round when she gets a little older, but for now they both have brilliant smiles.

Alpha Mom and Beta
Alpha, Mom, and Beta, dinner at the Black Rose in Boston

Dinner was followed by a little more window-shopping, a brief stop for Blink, the Greenway Carousel, and dessert in the market.

We walked from Quincy Market to Boston Common, about a mile.  We stopped for hot chocolate and hot apple cider across the street at The Thinking Cup Cafe.  Both were very good.

Finally, at 7 pm: fireworks.

fireworks
NYE 2016 Fireworks – my phone’s camera cannot do them justice, but they were right over our heads

After the fireworks, our decision to park across the street paid off.  We picked up the car and made it out of the city before the rest of the traffic.

Baba slept over our house to avoid amateur night traffic, rain – the threat of rain made good shortly after we got home – and for a promise of waffles in the morning.  Meghan and her mom stayed up to watch a show, Hinterland, but everyone was asleep well before midnight.

Apartment Dweller Woes

This memory was dredged up by https://www.aboveaverage.com/watch/above-average-presents/everyones-upstairs-neighbors/

One day I was sitting in my 2nd-floor apartment in a multi-family home. I was the meat of the apartment sandwich: a family below me, and a family above me. The house was owned by our very good friend Val Scott Barker.

One Saturday afternoon I was quietly reading at home when a tremendous crash echoed from upstairs. I, like so many apartment dwellers before me, stood under the source of the sound for a long moment and wondered just what exactly happened up there.

My wonder only increased when several minutes later the ceiling fan in the middle of the room started dripping a whitish fluid. Inspection was inconclusive because it was tinged reddish-brown. Had they killed someone with a can of white paint up there? The lamp had a steady stream for a short while, and dripped for almost an hour; I caught it in a small cup. Upon further inspection it appeared to be milk that had picked up dirt from between the floors.

Several days later the mystery was put to bed when I talked to one of the occupants. Their toddler wanted something on a high shelf in the fridge, and had pulled an entire shelf out — one that included a full gallon of milk. Most of the milk disappeared into the hardwood floor before she could clean it up.

We moved out a couple of years later, into a house of our own. Bill and Laura had created a second small adorable child, but they never topped the milk pouring out of the ceiling while I was there.

Pleiades

Living in our new home town occasionally yields surprises, some good and some not. Tonight’s surprise is definitely the former.

We’re located no more than 15 miles from Boston (as the crow flies) and we’ve come to expect a certain level of light pollution from the city and surrounding suburbs, including our own commercial strip here in town.

So color me shocked when Meghan strides in at 10 pm tonight, returning from a friend’s house, and announces that she can see the Pleiades.

We head back outside to look and, as we stand where the driveway meets the street we count six of the seven sisters. If I recall correctly that was considered good in ancient times; seeing all seven was reserved for the eagle-eyed among us. Pretty good for front-yard star gazing.

Teaching the dog about Santa

For the last month or two, Quinn and I have been going out for walks after the kids are in bed. Its quiet, the dog has a great time, and we get to talk for an hour (tonight it was iPad woes and trying to remember this story about the SR-71 and a Navy Hornet). I’ve been feeling better, and am a little smaller, so its a win all the way around!

It is now bunny season. They are everywhere, and they are not smart. They will sit very still, even after Butter sees them. They will sit very still until she’s almost convinced herself that they aren’t really there. That’s when they bolt, and Butter tries to take our arms off bolting after them. The worst part is that they never seem to run into cover, they run along it, so she can see them for the longest possible time.

Bunnies.

So, tonight there was a real winner. He sat, still as a stone, until Butter was about 6 feet away from him. Then he ran, along the road, for about 20 feet (if you’ve ever seen Butter run, you know that’s not nearly far enough) to the corner of a fence. And sat there staring at the dog, who was on high alert and at the very end of her leash. It would be worrying, but her ears flop into her eyes, so she just looks ridiculous.

Quinn says, “I wonder what she would do if I ran after the bunny, and pretended to catch it.” I can see the wheels turning in his head, even in the dark.

“Don’t you dare.”

But the bunny isn’t moving, even as we keep walking toward it (he was between us and home; I don’t torture bunnies for fun). Quinn keeps giggling to himself, thinking about chasing the bunny, and the dog’s reaction. And the bunny still isn’t moving and we’re back to a 6 foot lead.

I sighed. No way around it. “Please chase the bunny.”

So he does. He runs towards the bunny, who is completely confused, and takes a second to start running, too. Butter tried to take off with him, but I was ready for it and she didn’t get anywhere. The bunny high-tailed it towards the back of a house, and Quinn went after it, just into a shadow.

This is where the fun starts, you see. He made growly, eating noises. Butter could not believe it. Quinn caught the bunny and ate it. She spent the rest of the walk looking for her own bunny to catch and eat. (He did not really catch the bunny, but Butter was firmly convinced her dad was a mighty predator tonight.)

Quinn wants to get a toy bunny (safe for dogs) and carry it with him on our walks. He’s going to chase another bunny out of harm’s way, and bring back the toy to give to Butter. She will firmly believe that he’s sharing his kill with her. He says, “It will be like teaching her about Santa Clause!” because she will be firmly convinced that is was bunnies taste like.

I’m not sure if this is going to be hysterical, or the start of many bad times for the local bunnies.

Good thing there’s lots of them.

NiFi HTTP Service

I’m attempting to set up an HTTP server in NiFi to accept uploads and process them on-demand.  This gets tricky because I want to submit the files using an existing web application that will not be served from NiFi, which leads to trouble with XSS (Cross-Site Scripting) and setting up CORS (Cross Origin Resource Sharing [1]).

The trouble starts with just trying to PUT or POST a simple file.  The error in Firefox reads:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource (Reason: CORS header 'Access-Control-Allow-Origin' missing).

You can serve up the Javascript that actually performs the upload from NiFi and side-step XSS, but you may still run into trouble with CORS.  You’ll have trouble even if NiFi and your other web server live on the same host (using different ports, of course), as they’re considered different hosts for the purposes of XSS prevention.

handlehttpresponse screen shot
HandleHttpResponse processor config

To make this work, you’ll need to enable specific headers in the HandleHttpResponse processor.  Neither the need to set some headers, nor the headers that need to be set, are documented by NiFi at this time (so far as I can tell).

  1. Open the configuration of the HandleHttpResponse processor
  2. Add the following headers and values as properties and values, but see below for notes regarding the values
    Access-Control-Allow-Origin: *
    
    Access-Control-Allow-Methods: PUT, POST, GET, OPTIONS
    
    Access-Control-Allow-Headers: Accept, Accept-Encoding, Accept-Language, Connection, Content-Length, Content-Type, DNT, Host, Referer, User-Agent, Origin, X-Forwarded-For

You may want to review the value for Access-Control-Allow-Origin, as the wildcard may allow access to unexpected hosts.  If your server is public-facing (why would you do that with NiFi?) then you certainly don’t want a wildcard here.  The wildcard makes configuration much simpler if NiFi is strictly interior-facing, though.

The specific values to set for Access-Control-Allow-Methods depend on what you’re doing.  You’ll probably need OPTIONS for most cases.  I’m serving up static files so I need GET, and I’m receiving uploads that may or may not be chunked, so I need POST and PUT.

The actual headers needed for Access-Control-Allow-Headers is a bit variable.  A wildcard is not an acceptable value here, so you’ll have to list every header you need separately — and there are a bunch of possible headers.  See [3] for an explanation and a fairly comprehensive list of possible headers.  Our list contains a small subset that covers our basic test cases; your mileage may vary.

You may also want to set up a RouteOnAttribute processor to ignore OPTIONS requests (${http.method:equals('OPTIONS')}), otherwise you might see a bunch of zero-byte files in your flow.

References:

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

[2] http://stackoverflow.com/questions/24371734/firefox-cors-request-giving-cross-origin-request-blocked-despite-headers

[3] http://stackoverflow.com/questions/13146892/cors-access-control-allow-headers-wildcard-being-ignored