Don't wanna be here? Send us removal request.
Text
John Perry Barlow
John Perry Barlow died earlier this week and so many people shared their JPB stories... it was an outpouring.
He lived a beautiful life in a remarkable time. Lyricist, activist, thinker, idealist, he gave voice to a hope that the technology that powered the Internet could also deliver a new kind of society. That an active shepherding would enable all of us, collectively, to develop a platform that redefined freedom. That every human will join a full throated participation in a new and global community that can be bigger and better than any government or religion.
He and many others radiated these messages, perhaps leading to the creation of many of the sub-genres of openness, freedom and communality that anchor and disrupt the Internet as we know it. Free and Open Source Software, the sharing economy, block chain. And he did this work in the 1990s in an amazing context. The fall of the Berlin wall. Global ideologies unifying in peace. The cold and hot warriors of the 20th century laying down arms, maybe even forever.
And they resonated with me. My life choices have been a bit of a mystery to my relations. My father is an astronomer. My mother a Teacher. I have aunts who are nuns and an uncle in public health in Africa. In my family tree, there are .gov, .edu, and .org email addresses... I am nearly alone, a .com. Somehow the values that were passed down to me found expression in my own life's mission as idealistic, mission driven technology startups.
In 2018 I must acknowledge that it has turned out to be a hard road. Absent a liturgy or a constitution, we navigate this hopeful freedom without guardrails, naively. Success often results in a world that is both better and worse simultaneously, with secondary, non-obvious impacts that overtake the primary intended ones. An over-indulgence in the faith that HTML and Javascript will change the world crashed the world economy. A platform intended to bring access to mortgage debt is turned to fraud and crashes the world economy again. A new kind of globally connected publishing is overtaken by malignancy. Negative impulses ripple and harmonize over the newly designed mechanisms just as fast as idealistic ones.
John Perry Barlow wrote some music, and a manifesto, and spoke beautifully about love and loss. I still hope for the things he hoped for, and am guided by the way he lived. It is a terrible loss.
So maybe this is my JPB story.
0 notes
Text
Cologne, December 2017
I hit all my connections and get to a Starbucks across from the cathedral at Cologne. This was a regional jet to Orlando, a 747 redeye to Frankfurt, and then an ICE intercity from the Frankfurt airport to Cologne. Note: I had an assigned seat on a full train... I didn't wait at the right spot on the platform and had to commute to my seat -inside- the train for the first 10 minutes of the journey. Not my first misadventure on a European train.
I connect with a colleague, cab to the hotel, go to a meet and walk around after.
Impressions of Cologne:
Joni Mitchell in the Starbucks - why do I have to fly all the way to Germany to hear Joni in a starbucks? I'm reminded that the most popular song by German musicians is 'Wind of change' by the 80's hair metal band Scorpions. Not that Dylan wrote anything like that. Woodstock sentiments are way more popular here than in Woodstock's home country.
The Cathedral is every bit as dark and brooding as I remember. It is covered with industrial sooty blackness. Not obsidian... more like if rust were black, kinda like a cold, eyeless version of Barad-dûr to be honest. The sameness of skyscrapers pretty much makes their enormity impersonal. Not so the Dom. If it was designed to make humans feel small and temporary, the design works.
On Saturday I experience two things that later made the news. First is an enormous street demonstration by the ethnic Kurds of Germany protesting NATO member Turkey's attack on their home country. Its big, loud, and traverses the street under my hotel room window. Riot police everywhere, though no rioting that I saw. As it turns out, the protest was later broken up by these same police, thankfully without reports of violence.
My walk to the train station takes me down to the Rhine. It is very very high. The river is above the normal esplanade and is swirling down the riverside park. The anchored river tour boats and their floating docks ride above the now underwater ticketing booths. The weather is warm and lots of town-folk are out staring at the spectacle of the swirling waters in the grey December light.
I cross to the train through thousands of protesters wearing the distinctive flag of Kurdistan, and train back to Frankfurt on my way to the next stop in Lancaster UK.
En route to Lancaster I spent a night in Frankfurt at the Rocco Forte Villa Kennedy. This place is a miracle of cultural appropriation. For starters, it is a German hotel named for an American President owned by a British hotel company that itself has an Italian name.
Then the building: Villa Kennedy started life as Villa Speyer. It was designed, as was common at the time, an appropriation of Gothic and Renaissance architectures, as a statement of wealth and status for a Jewish banking family in late 19th century German Society. It was stolen by the Nazis in the 1930s and was owned by the city thereafter until it was bought & converted to hotel in 2000 by the Brits. The original Villa has been restored to its 19th century statement, with a bolt-on addition of 163 hotel rooms 'meticulously designed with original façade material that presents itself as a closed ensemble' of historyishness.
Reception is in the Villa, which I'd say is the most authentic appropriation... it actually has a bit of the feel of the Medici. You pass through it quickly into a hallway where things progress... the nod to the Villa namesake takes three forms: 1) big canvases, first of presidential Jack, then Jack and Bobby, then Jackie, and as we approach the JFK bar Marilyn Monroe and Jack, and finally over the entrance to the bar, a radically photoshopped Jack Kennedy driving a 50s James Dean Porsche Sportster wearing David Lee Roth mirrored aviators. 2) A bar menu with page after page of themed cocktails. A whole page for Jackie (glamorous!), Marilyn (sexy!) and so on. I passed on the art and the cocktails, but I lingered for the music of 3) a heroic African-American pianist (from Detroit!) singing 'On Broadway' and 'Mrs. Jones'.
So to sum up: A jewish banker borrowed from Renaissance and Gothic architects, the nazis then stole it. The Italianish Brits bought it, stretched it, and then further borrowed some sizzle from the Kennedys (with a little MM, James Dean, Van Halen, and Porsche) while throwing in some Interwar Ellington & Armstrong channeled through 70s George Benson.
Kennedy himself actually gave a speech in Frankfurt, overshadowed by 'Eich bin ein Berliner' a day later in Berlin but still quite well received and remembered. In it he dwelt on the exodus from Frankfurt to the USA in 1848, and quoted Goethe, the most famous son of the city... Authentic touches that this hotel does nothing to resonate with. People certainly have no control over how they will be known, but I wonder how Kennedy would reflect on his villa.
On Sunday I hopped from Frankfurt to Manchester. Manchester airport is like RDU with a train station, short walks, short lines, ideal transport hub. Went from plane through passport and customs to the train in 10 minutes.
I made my connection at the airport and we caught the Transpennine express from Manchester to Lancaster. It was completely full and we hadn't figured that reserved seats were extra, so we ended up standing for the 1.5 hour journey. Not my first misadventure on a European train.
I'm going to have a meeting at a company that has been producing textiles since the 1920s. They have a facility which is a noteworthy scale from the satellite view on google maps. The factory actually dates from the 19th century and has a clock tower.
My second meeting is about a 20 minute drive into the country outside a lovely village Kirkby-Lonsdale. This is a small village on the edge of the lakes district that looks to be the perfect place to stay for a walking holiday.
The next stop is Tel Aviv, and then a wintry Berlin with short days, wind, snow, bare trees, lots of candles. And then home.
0 notes
Text
Berlin September 2016
Started this trip on a Friday morning… I’d booked a new option, the Norwegian air shuttle that started 787 services from JFK to a couple transatlantic destinations. They have an economy plus class that is basically like a domestic first class - seats have plenty of pitch, and the prices are similar to a normal economy ticket. I got to RDU with a bit of time to spare. My flight to JFK delayed, so it was good that I’d booked a very long layover. I spent the day and the evening in the Terminal 8 Admirals club.
This was the day that mom was in the hospital with an uncertain diagnosis. I talked with Paul a couple times, and then with Mom. Things were looking better so I decided to carry on with my trip. I crossed to terminal 1, which was full of humanity; it was a little nutty, nearly in the same category as Santo Domingo. The lines were immense, but I discovered the economy plus had its own line, still quite long. Made it to the gate and got aboard without too much fuss. The seat was actually comfortable for sitting, but just didn’t work well for dozing. Not a comfortable night.
Arrived in Oslo midday. Small airport… about the size of the main terminal at RDU, but pleasant. Classically Scandinavian, full of wood. I paid for access to a lunch buffet and found a quiet corner and had one of those scrambled naps where one awakens disconnected from certainties of time and space.
When I’d booked tickets I’d looked for hotels and found all the usual suspects either sold out our charging triple - 300-500 euro for rooms typically under a hundred on a slow week. This has happened before, and I’ve always just worked it day by day. I decided to do that on this trip.
My connector to Berlin left at 5:30. When I woke around 330 I looked at options for Saturday and Sunday night decided to avoid the Berlin situation, so I booked a hotel in Potsdam for Saturday night to explore a bit. Potsdam is home to Sans Souci, Frederick the great’s country place built in the 1740s. Its referred to as the Prussian answer to the Louis the XIV palace at Versailles. Where the French royals used a super serious baroque style with lots of religious imagery, Frederick, who is more of a free thinker, adopted a rococo style so random that they call it Frederician Rococo. I picked a place along the lake on Zeppelinstrasse outside of downtown.
The flight arrived on time at Schoenfeld. Berlin has two supremely ugly airports - Tegel was for the West, and Schoenfeld was for East Berlin. In theory they’ll be replaced by Brandenberg Intl, which is on the scale of Heathrow, but for the time being the arrival is -very- anti-climactic. I went to the s-bahn station, and for 3 Euros got an ABC one way commuter ticket - this zone includes Potsdam even though its well outside the city. I went to the hotel, checked in, dumped my stuff, reserved a bike for the next day, and went to an Italian trattoria in the same building. I had a lasagna that was absolutely killer, and walked it off by walking the town for a couple hours.
Potsdam is a city like Denmark is a country… fingers of land surrounded by water. The main part of town is in the middle of the Octopus, and the liveliest part is near Brandenburger Tor near the front gates to Sans Souci park. It has interesting layers of history. Its home to the oldest film studio in the world, where ‘Metropolis’ was filmed in the 1920s, and Many of Marlene Dietrich’s early films as well. To this day, that era dictates the politically acceptable version of glamour that shines darkly at you from all the banner advertising in Germany. I didn’t get out to the studio… perhaps next time. The town itself is clean and cheerful in the same way that Berlin is grimy and relaxed.
My room turned out to be on the corner of the hotel with windows on two walls looking out on the water. As was true throughout this trip, the weather was cool and delightful. I woke late, booked a room right next to Brandenburger Tor for that night, got on my bike, and headed out along the lake; there was a trail that followed the shore invitingly. About three miles up I came to an athletic park that turns out to have been the principal training ground for olympic athletes during the heyday of the GDR olympic movement. It was classic cold-war communist architecture, where it was easy for me to imagine the anabolic steroid-ridden athletes looking like the Stasi villains of 70s Bond films. A little further up the lake there was a placard describing the history of the park. Apparently it was built on the green lakeside fields where giant rigid dirigible Zeppelins came and went before WWII.
My ride swung around and ran all through Park Sans Souci, which is just as grand as advertised. I didn’t buy tickets and tour the buildings… I mostly wanted to get a flavor for the park and the grounds, which is where Frederick put most of his efforts. I returned my bike with many thanks and changed to the hotel in town. I left my stuff and found a Viennese wine cafe, and had bread and a selection of French cheeses for dinner. Good, but a -lot- of dairy to process.
Next morning was Monday, so I grabbed a train and headed into the office at Thiemannstrasse. For hotels, it turned out that there was an enormous conference that used up all Berlin’s convention space and hotels Tuesday through Friday. I lucked into the Odeberger hotel on the first night, and ate really well at a little thai joint across the street. This is a hotel in Prenzlauerberg that was a grand Victorioan Schwimmhalle built in 1898. Berliners are serious about their indoor swimming. After the wall came down, the pool was boarded over and the space hosted squatters and punk rock shows. Its being restored into a tony hotel, but is still under construction. Weird, super-thick walls. Strange, interesting authentic steampunk.
Tuesday night the city was completely booked; I walked into the Days Inn at Hermannplatz… they had one room left and I talked them down 50 Euros. That place was passable. Key trick: they usually give you two comforters - sleep under one and on top of the other. I managed to book the Leonardo Royal hotel near Alexanderplatz for two nights in a row - the only time I was able to stay in the same place for two nights running the the entire trip. During the week I used a combination of the hotel tonight app, kayak.com, hotels.com, and priceline to do all the booking. On Thursday I biked into Prenzlauerburg and ate a perfectly tasty quiche at Anna Blume’s cafe on one of my favorite street corners in Berlin. There is a dress shop right across the street that Allie found and has been cultivating. The work with their own fabric designs and sew all their stuff in the shop. It’s called Bonnie and Buttermilk, and the shop window is lovely.
After the week wrapped up, I was too tired to start a long journey, so I decided to spend an evening exploring Frederichschain, a rising center just across the Spree from Neukolln in old East Berlin. I booked at ‘hotel Almodovar’ - yes, devoted to the Spanish auteur, and biked over. The hotel is near a city block that is a park and anchors both the Friday night restaurant/cafe scene and the Saturday morning market. I partook of both. I’d say this part of Berlin is a bit more packed in than Prenzlauerberg… a bit younger, a bit less expensive, nice but still a bit rough. Saturday morning market was lovely. Most interesting: a stand that was an open charcoal grill selling nothing but mackerel - the whole fish grilled in a cage.
Energy level restored, I decided to travel to Oldenburg on Saturday. Oldenburg is the birthplace of my Muhlmeister antecedents, who crossed to America in 1900 when my grandfather was 2 years old.
I left my bike locked up at an S-bahn station, kind of hoping for the best…. it all worked out but I was kinda nervous. The Berlin Deutsche Bahn station is the largest train station in Europe. Inside, it looks like one big 3 dimensional maze of things at odd angles to each other. It took me a bit to figure out how to buy a ticket, eventually I did - 92 Euros, 3.5 hours. Along the section going to Hannover I sat opposite a woman who had settled in Berlin after emigrating from Israel. Her family were early kibbutzim, before the nation of Israel was formed after WWII. They own the largest shipping line in and out of Israel, and she is the first of all her family to not pursue this career. She is in the jewelry business. We talked about the oddities of German, American, and Israeli politics, the phenomena of Israeli ‘memory books’ that are all over the world and written in by Jewish trekkers that are traveling after their military service, a rite of passage for Israeli youth. She is married to a German, and we talked about how words like ‘perfect’ and ‘correct’ are so important in German, much less so in Hebrew.
The station in Oldenburg was celebrating its 100th birthday, so they had lots of pictures of the original ‘romantic’ station built in 1867, and the one started in 1911 and completed during WWI in 1916. I found a bike rental place right by the station, and for 3 euros, rented a bike for the rest of the day. Connectivity had definitely been iffy, so I looked for a spot I could get wired up and find a hotel. I ended up at ‘der schwann’, a pub right on the canal that used to go through the town. I had a pint, booked a hotel, and lingered looking at the boats, bikes, and walkers. Altogether lovely. I biked over and dumped my stuff at my hotel and took off through town.
Oldenburg had a city wall and a moat, and while they’ve filled in pieces to make a ring road, its still quite easy to imagine. There were really nice houses right outside the old town, and a lovely park. And a cat having a bath on the hood of a car looking like it owned the place. I only had the bike for a few hours… the rental place closed at 8 pm and was not open on Sunday, so I made the most of it. After circling the downtown and the parks, I headed out of town along a canal… lots of sheep, bugs, cows, and wide open flatness. I got the bike back just before 8 and walked into the old town.
I imagined that I crossed paths with at least a dozen people who bore a sharp resemblance to my grandfather at different points in his life. There was a kid on a bike that was much too big, a dapper young gent, a middle-aged guy, And all of them skinny with that particular nose, forehead, and hair line.
Oldenburg is delightful. It was almost untouched by the wars of the 20th century, so much of the housing stock and old city survive. The old city has been converted entirely into a thriving pedestrian shopping district. They do not even allow bicycles. I had dinner there - its only old in it's bones. McDonald's and Burger King have arrived here too… Nonetheless the narrow streets and the old buildings still carried a great deal of charm even though they housed Irish pubs, fast fashion shops, and the occasional German brasserie. Fewer people speak English here than in Berlin... I have to haul out my bumpy German, and I require a great deal of help from Google translate… but it works.
I’m on the DB train section from Bremen to Hannover on my way back and the weather still holds sparkling clean. This part of Germany is flat as a pancake, full of agriculture, and enormous 747 size windmills everywhere. Oddly, lots of fields of corn… very American.
0 notes
Text
Walking the Thames October 12-16, 2017
I’d booked timing on an EU trip for a visit to a business partner that had to cancel, so I ended up with a couple extra days in the London area. My trip started with a dayflight to LHR, where I rented a VW Golf from Avis. That part worked great. Fun to be driving a manual shift right hand drive again... like smelling a scent familiar from decades ago.
Stayed at a hotel in Reading. This was a mistake. From then out, I visited the hotels and then booked. The Beech Hotel was okay - 120 pounds for a tiny single room, no breakfast, and not near anything at all. Walked around Reading downtown... perhaps I was in a grumpy mood, but the town held few charms.
Crowthorne and Broadmoor
Next day, headed out and visited Crowthorne, and dropped by the old house @ 25 Sandhurst rd that I'd last seen moving out after two years occupancy in 1995, walked past the old church, had a very tasty lunch (mushroom pie and a pint) at the Prince at the other end of the high street, which is nicer than I remember. Walked up to Broadmoor (the Victorian era prison for madmen, including Dr. Moriarty in Conan-Doyle’s fictional Britain). The sun was out and radiant. I walked down the hill into 'chaucer woods' which is where the pond with the park and the swans and the geese were that Anne and the children spent so much time at. This was all trippy and indescribably recidi-dejavuistic. I struggled as a young American in Britain in the early 1990s here. As a young consultant. As a young father. As a young adult. Happy struggles for the most part, but a few that left me utterly defeated. I arrived there with family in tow and moved into that house when I was 27, almost 25 years ago.
Drove over to Marlow and parked at the 'Compleat Angler', walked around town, and then booked the hotel for 132 pounds via hotel tonight. This hotel is the classiest I stayed in; its right on the Thames at the Marlow bridge, with a view of the falls and the lock. That said, the room looked out on the parking lot, as half of them must. Had dinner outside looking out at the water and the church across the river. A bit cool to be outside, but a very pretty sunset.
Marlow to Maidenhead
Next morning, slow start. Had a bunch of email so left the hotel at noon and walked from Marlow to Cookham, where I had a late lunch at 'The Ferry' outside on the river. Cookham is the home of Kenneth Grahame, author of 'wind in the willows'... and it does evoke these images. I found a room for the night at the Bel & Dragon, a large pub with high end food - very popular. That was 110 pounds and included breakfast. Should have made a res. for dinner right then, because they ended up being full that night. Walked on to Bourne End, then Maidenhead, and took the train back to Marlow, picked up the car and parked it in the public parking just outside Cookham village. Ate dinner at the White Oak, about a half mile walk up the road.
Hambleden and Henley
Next day was a -very- slow start. Breakfast at the Bel & Dragon was great, and I ended up tucking in by the fire and buying lots of stuff and planning trip to PR, as well as a bunch of email. Left around 3 pm and drove to the Hamlet of Hambleden and checked on a pub, the Stag and Huntsman that is discussed as the lunch destination in this walk:
https://www.walkingclub.org.uk/walk/henley-circular-via-great-wood/ It looked like a fabulous place to walk to and eat, but their rooms were sold out for the night. I asked for a recommendation and they said the Henley Business School. This is an exec education center in 'Greenlands' a Thameside mansion, that just added 60 hotel rooms that they occasionally rent. It was 105 pounds including breakfast. I drove down and got checked in. This was fantastic, I would absolutely do this again, and perhaps make it the anchor of any subsequent walking stay. Email to check for room availability
I walked the grounds, and even though it was kind of late, decided to try to walk along the river to Henley. I did this, and then walked back on the far side and crossed at the Hambleden lock. It was dark when I got back. Worst part of the whole walk was the last bit from the lock back to the business school in the dark on a high speed narrow road with hedge on both sides... I'm sure there was a walking path but I could not find it.
Got back and had dinner in the lounge, which is in one of the mansion’s old common rooms. Food was cheap and good... The waiter managing the room was an Italian immigrant to Britain who loved his job and just radiated gratitude.
Next day was departure day, but my flight was very late in the day. I walked up into the hills behind Hambleden, got pleasantly lost, but ended up finding my way back to the trail described in the above link, and down to Henley. This was really the finest stretch of walking I did... country lanes through tunnels of trees, derelict churches in tiny depopulated 19th century towns. The weather broke, the sky turned blue with a cool breeze running.
At one point the trail opened into a broad flat tree filled field that turned out to be a bluff over the Thames valley, with beautiful views far into the distance. Tromped down the bluff into Henley, had a late lunch at a pub on the river right next to the bridge, and then walked back along the river to the business school and picked up the car for the return to LHR and onwards to the rest of planned travels.
0 notes
Text
Visit to Aguadilla
Friends,
I recently traveled back to the house I grew up in on M street in Ramey. I have followed the state of the island since Maria hit almost 8 weeks ago, and had lots of questions going down, so I thought I’d share my notes…
Travel by air: I was not able to book in or out of BQN airport… Jetblue flights that run overnight from the states were all cancelled. So I booked AA through San Juan. Prices were reasonable on AA, but Jetblue is still the best if you can get a flight. Easy to find flights down to the island… harder to find them back. SJU airport was full, but operating normally. AC was on, and I had no trouble transiting and picking up my rental car. BQN currently only has had a regular service from Spirit Airlines from FLL. In theory, service from Jetblue and United will return to BQN before the holidays, but we’ll only know for sure once its happened. One new feature of BQN - the old ready area where the bombers used to park has been taken over by the US military, and is now a small city of lights with lots of army trucks exiting and entering near the golf course. Now that the Army’s mission is complete, this may return to its normal empty state.
Connectivity: much better than expected. I have a Verizon contract and was connected to Claro the moment I powered up at SJU and it remained so all over the North side of the island. Near Ramey, the connection is actually LTE, which means its been good enough to use my phone as a hotspot for email, research, e-commerce. I believe that this is partially a result of more than 40 high efficiency solar powered cell stations that were brought to the island by Vanu inc. (Vanu Bose, the founder of Vanu and the driver of this humanitarian contribution, was the son of Amar Bose of the eponymous corporation. He passed away last week.) People on AT&T were also on Claro. I had coverage from San Juan to Mayaguez continuously on Route 2 without interruption. I wouldn’t count on this to watch netflix, but it was strong and reliable for phone, text, and email. All of Ramey had coverage. At this point there is no value in pursuing satellite, but there are various expensive Satellite systems, like this one from Garmin, that keep you in basic communication when you're off the cell grid, but they don't actually replace Internet connection. There's a great review in there that goes on for pages - its a complicated device.
Travel around the island - Driving from San Juan to Ramey was almost completely normal except for the visuals. You notice right away that all the outdoor advertising and large signage is gone, and pretty much anything involving wood, corrugated roofing, or poles for any use. Traditional construction of concrete with metal ventanas is pretty much untouched. The impact is notable in San Juan, but becomes much more dramatic from Arecibo on. A kinda weird visual - you could tell the worst sections because the buildings looked sandblasted. Many businesses along #2 were open with generators, or occasionally, a section that had power. I took the same route to Ramey as I have done, without detours. Some traffic lights are out, but none of the really important ones where big routes cross. If you have to turn left at a busted light on rt. 2, just don’t…. turn right and figure it out later.
Water… is flowing in Ramey and many places around the island, and did not drop out when I was there. There’s still a boiling order, and when you take a shower you come out smelling like you exited a heavily chlorinated pool. But regardless, having water is great. I brought two different filtration systems, one that is gravity based (Lifestraw) and one that you pump. I bought 4 coleman solar showers, which are basically 5 gallon black plastic bags with nozzles. Down the road, I’ll try to purchase some water storage, a big cisterns for flushing, and something else for long term storage of potable water, but right now this was not as urgent.
Fuel: I had no problems getting gas, there were no lines and most gas stations were open.
Groceries: The Econo is open, and even takes credit cards. As always, its a social center, so budget 3 minutes for talking for every minute of shopping. The coolers were full and prices are about as I remember them. I bought a fresh salad that was good!
Restaurants: many are open, though some with a smaller menu or shorter hours.
Open out gate 5:
Levain (daily coffee here was sent from heaven)
Debut
Cofos Pizza
Martin’s BBQ
Cinco
Country Pizza
110 thai
Palmas
Open down the Hill:
eclipse (dinner only, no breakfast or lunch)
The frituras place at the S on the way down to Jobos
Ocean Front and lots of places near Jobos
Julios and lots of the other frituras places on the beach near Isabella
Open out Gate 1:
El Meson
Sasones
Desecheo
Lots of fast food out near #2
Closed:
Umas
Ramey Bakery
Airport cafe
Marriott (they have a small thing set up just for guests)
Beaches: After seeing pics of crashboat online I was concerned that all the beaches were just as hollowed out… not so:
Crash boat: every bit as dramatic as the pics. Right side is now tiny and not terribly safe, lots of exposed rock under the surf near the jetty. It seems that a lot of the missing beach was thrown onto the space that was the parking lot… which is now 3-4 feet deep with sand. I hold out hope that this sand can be pushed back out to re-create some of the old the beach. The left side you can still park and swim; its smaller but not that different from how it was.
Malecon Aguadilla: The brand new oceanfront walk seems to have come through entirely unharmed and looks great.
Borinquen beach: Much as beautiful as it always has been. Only new feature: a military unit desalinating water in the parking lot… impressive operation.
Survival / Martinica / Bajuras / Shacks: the Sand road down the cliff is still intact, though the left turn to go to Survival is completely blocked. You can go straight across, although its still rainy season and with all the recent dumping its turned into a bit more of a cesspool of garbage and shit than I remember. It appears that despite the violence of the storm, the waves did not break through the dunes and flood the old sand excavation area - a concern I’d long held. Once across, you can walk the strand to either survival or Shacks without impediment. I saw many hoof prints as well, so it looks like people are riding this stretch. The lawns next to the Eclipse took a beating, but the restaurant was hardly touched… hopefully people will be able to breakfast and lunch their soon.
Jobos: is in mid-construction down near the beach access, so I didn’t see that much, but did not seem too undermined. None of the oceanfront places fell in, and many were open and totally full on a Friday night.
Surfers: the road down has a couple trees propped across the roadway, but not so low you can’t pass. The parking lot structure is a bit undermined, but it was before. Waves are the same.
Spot/Middles/Isabela: I was down that way at Julios in lower Isabela on Sunday and the place was as full as I can remember, complete with the parade of Jeeps and music. The beach roads are intact and the north shore seems largely as it was.
Money / ATMs, Banks, Credit Cards: this is not quite back to normal, cash is still the only currency in a lot of smaller businesses, but I didn’t have trouble getting cash out of ATMs, and used credit cards for large purchases at Home Depot and Econo.
Electricity - This is really the biggest story that remains. The grid is a string and tinkertoy tangle that will be an enormous labor to sort out. Just to restore 30 houses on our street is a project that will require clearing/cutting dozens of fallen trees to create backyard access, and then every pole, wire and transformer is down (and will have been for months), and most connections to the individual houses are impaired as well. And the whole island is like that. Right now, the focus is on the easiest and most critical places. The most recent estimate that I think is credible is 70% of meters connected by the end of February. This leaves the 30% that pay the smallest bills and are the hardest to reach, and I could see it being another year before its 95%. While I was there, none of the housing areas in Ramey had power, but there were a few areas outside Gate 1 and Gate 5 that had been restored. Lots of people run generators - our neighborhood sounds like lawn mowers going 24 hours a day. The Solar folks, particularly Maximo Solar near us, are crazy busy. He’s signed contracts for more than 1,000 off-grid systems… only about a million more to go!
Until power is restored - There is a lot that can be done to improve quality of life even if you do not have grid power. Its hard to know how much to spend because you don’t know when you might be lucky enough to get your power back on. My view - think of your spending as one part now, one part preparation for the next Irma/Maria. But with the money thing in mind, I’ll go in order from cheapest to most expensive. I brought two checked bags of 50 lbs each, so my experience was limited to what I could brink and what i could buy on the island.
— My very favorite thing is the OPolar USB fan. This 9 inch fan doesn’t replace a ceiling fan, but it runs all night, blows enough to keep me cool and keep the bugs at bay, and uses just a part of my laptop battery, and it was cheap. We still had our mosquito nets, but the mosquitoes were actually not bad in Ramey, so I did not re-hang them. This fan actually had a review from someone in PR who used it after Maria using her laptop battery. I also found these little fans that are used to cool electronics and blow 50 CFMs each and are powered by USB ports out of the batteries. I bought two sets of two... These worked and drew very little, but the Opolar was a much better solution for cooling down and sleeping.
— I bought 4 LED solar lights that you leave outside during the day and stay on all night... they have motion detectors and you can leave them in three modes: full on, night light, or motion detecting that goes from night light to full. My next favorite thing. charge up during the day, take them inside and light your evening hours no problem. Then leave them in night-light mode so you don’t stub your toe on the way to the bathroom.
— a Two burner grill and a propane cylinder. I bought these on the island for $89 and $49 at the Home Depot in Hatillo, and now I can boil water and cook stuff.
— portable fold up solar panels (36 watts) - this is perfect for charging cell phones and kindles, but not for laptop or fan. I’d skip this, and instead, the next two are useful individually, but if you’re willing to drop the dough, they are perfect together:
—185 watt-hour battery that output USB and, with separate inverters, 110 volt AC which runs laptops, charges phones, anything up to 100 watts draw, including the USB fans (see above), but also the smaller of the standard 120 volt rotating fans.
— 80 watt fold up panel to charge the battery. These connect to each other via a 5.5 outside diameter * 2.5mm inside diameter DC cable that is female on both ends, but is fairly short, so I bought 3 12 foot male to female extenders. This combo worked great, but you really do need 8 hours of sun to recharge the battery if you’ve drawn it all the way down. It weighs 4 lbs, folds to the size of a fat laptop, and if you have a reasonably sunny day, will power up the battery I listed above. While I don’t recommend it, I did leave this unit out in some pretty heavy rain several times, and it continued working.
— One of the things that I hungered for as I tried to mete out my meager trickle of electricity was the ability to know how many watts a thing used… what would burn down my battery faster, this fan or that fan? This watt meter would have been super useful, so I’ve bought three and they’ll go back down with me in December.
— A 1000 watt honda generator. This is 26 lbs and can be brought in checked luggage as long as you never open the box. It is the quietest, lightest, smallest generator on the planet, and runs longer on less fuel than anything out there. Two trade-offs: you can only power 900 watts of stuff with it, and its pricier than many bigger, noisier, heavier generators. This will let you run things like a (modern) fridge, almost any household item that doesn’t have a heating element including all your fans to keep you cool, and you can charge your batteries in the rain. Generators could not be had at any store I visited on the island, nor could you buy a jerry can, and I looked. If you bring a generator to the island, bring a jerry can or you’ll not get much use of it.
— Cool trick: turn off every single breaker in the house. Turn everything off. Cut off the female end of an extension cord, and splice on a male end. Plug one end into your generator, and the other into a wall socket. Now all the things that are on that circuit are powered by the generator. In my case, that enabled things like ceiling fans and the lights attached to them. Warning: do not back-power the grid, make sure that the circuit you plug into is -not- open. If this sounds confusing, just think of it like water. If your neighbor has well water and your city water is out, they can run a hose to your outdoor spigot and turn both ends on, and you’ve got water in your house… now you just need to make sure that your neighbors well isn’t running through your house back out into the city water system full of broken pipes or whatever.
— Refrigeration -- Our house fridge ran brilliantly on the Honda genset… it cooled right down, and stayed pretty cool when the generator wasn’t running. Alternatively, there are some really fantastic new compressors in a 40 quart fridge/freezer (about 1.33 cubic ft) that draw just 30 watts (about 10% of the power of a normal fridge) and can run for a week on the charge in a 12 volt car battery. I'm not going to jump on this, but it may be the best way forward for folks that are trying to run a minimalist electrical footprint on portable solar panels.
— Cleanup & Tools -- Chainsaws could not be had at any store on the island. Dewalt has a new 'flexvolt' battery system with 60 volt tools. For example this chainsaw or this fan. If you buy 4 batteries, you can power an inverter power station that with the power stored in all 4 batteries is a little like the jobsite version of the Tesla Powerwall, which can power a house fridge or other normal things that need house current. I didn’t purchase / test this.
Laundry -- This becomes a top issue once you’re in week 4 and you have water and generators. The motors in older washers draw 1,000 to 2,000 watts, so you need a bigger generator than the one I brought. Modern energy star washers draw more like 500 watts. Dryers - Just no… I’ll put up a clothes line for the back porch.
Bigger Batteries, Inverters, bigger portable solar — We have had folks from RAM staying in the house, and they were kind enough to put another portable solar solution on the house. It was a pair of Centech 750 watt inverters, a Solar charge controller model cm-30a, two Uni-Solar PVL-136 roll-out solar panels, and a 935 CCA 12 volt lead acid truck battery that I bought at the local auto parts place. This system worked, but was not able to run stuff that drew more than 100-200 watts. I think part of this was just my ignorance of how to optimize the utilization of this rig.
Bigger Generators - Generators are everywhere, so the whole island is like Saturday morning with lawn mowers running. The inexpensive gas generators work great but they are -very- noisy. After waking up to the sound of a generator for the Xth time, quiet is important and merciful. With that in mind, the Honda 2,000 watt generators can be put in tandem, they have an ‘eco’ mode that throttles up and down as energy is drawn, they are efficient, and as quiet as its possible to make a generator that makes this much power. 4 kilowatts peak service will allow most houses to do most things, with thoughtfulness about what gets turned on. A dual rig with parallel cables, security attachments and extended run fuel system can be had for under $2,500.
Permanent Solar - This is the long term solution. I’ve gone ahead and committed to 21 240 volt panels and a Tesla powerwall, to be installed by Maximo Solar. This, combined with a moderation of electrical consumption, will permanently address electrical power. Two neighbors had rooftop solar arrays that survived the winds of the storm completely intact. Another neighbor out on the cliff was a bit more exposed, and their array tangled with a solar water heater tank, and was a total loss.
A couple concluding topics:
Law & Order: My experience was really very much like life on the island at any other time. Across more than 4 decades there’s been lots of petty larceny, and perhaps I’ve just been lucky, but I’ve experienced just one face to face larceny (in high school on the track bus) and zero violent crimes. While there are stories (as ever) and people should take proper precautions, I found the island as peaceful (and chaotic) as ever it has been. The mood and tone were warm, and I felt at every moment surrounded by commiseration and a willingness to help. I felt totally secure at gas stations, banks, supermarkets and airports.
The big work: I saw electrical crews out at all hours of day and night, in all weathers. Debris removal crews had started to come through our neighborhood. Its an extraordinary undertaking, with no drive-in assistance, but I think the agree with others that amidst the huge challenges and overwhelming scale of work, the key words are resilience, optimism, and heartwarming positive vibes.
How to help?
The first way to help is simply to think about this as you read the news, and as you advocate and you vote. The future of the island is absolutely in the hands of our federal government, everything from the amount of assistance supplied to the diaspora of Boricuas that are arriving in the 10s of thousands, to the way that PREPA will pay the billions required to rebuild 50 years of electrical power infrastructure. This stands on top of the basic questions that predate Maria: a decade of economic and population shrinkage, and a death spiral of debt burden.
There are many charities doing extraordinary work on the island. Global Disaster Immediate Recovery Team worked with the Vanu team to restore cell communications on the island. There is still a lot of work especially up in the mountains, so you can volunteer through the coordination site Volunteer Organizations Active in Disasters. If you’re on the island and unemployed, FEMA is hiring.
At a more personal level, I’ve followed through on gofundme campaigns of friends and colleagues, and tried to work the connections I know and contribute what I can to the upward spiral. I’ve diverted resources from stateside projects to cleaning and rebuilding on the island, and tried to support others as they’ve done so as well.
0 notes
Text
Fixing OAuth2 error: 'Code was invalid or expired. Session has expired at unix time..'
I implemented the fixes in the previous post, and pretty soon I started seeing errors showing up in my log:
[ERROR] sessions#new (ActionView::TemplateError) "Code was invalid or expired. Session has expired at unix time 1324126800. The current unix time is 1324463615."
I dug around a bit, and found this thread on the Mogli project:
https://github.com/mmangino/mogli/issues/95
So I knew I wasn't alone.
The error was being thrown on this line on my login view:
<% if current_facebook_user %>
And I'm guessing that this is a user with an Oauth1 cookie, and when the Mogli client stumbles on it, it throws
Mogli::Client::OAuthException
I tried, but could not reproduce the issue easily, so I modified my view as follows:
<% fb_works = true %>
<% begin %> <%= fb_connect_async_js %> <% current_facebook_user %> <% rescue Mogli::Client::OAuthException %> <% cmd = "echo 'Inside the Mogli OAuthException handler'|mail -s 'Mogli exception' [email protected]" <% logger.info 'Mailing help command: ' + cmd %> <% logger.info %x[#{cmd}] %> <% fb_works = false %> <% end %>
This rescue allowed me to be positively notified when I caught the exception, and allowed me to set a bool 'fb_works'. The instructions from Mike Mangino, author of facebooker2 in the above mentioned thread were to 'Catch them and re-auth as per the facebook docs'. What I decided after poking around was that I could simply send display 'fb_login_and_redirect', handling this case as though 'current_facebook_user' was a nil. Here's the subsequent code in the view:
<h2>Sign in</h2> <% if fb_works and current_facebook_user %> <hr /> <% begin %> <div style='float:left;margin-right:10px;'><img src="https://graph.facebook.com/<%= current_facebook_user.id.to_s %>/picture"/></div> <% current_facebook_user.fetch %> <p><%= "Welcome #{current_facebook_user.first_name}!" %> Log into Spoonflower using Facebook.</p> <p> <%= button_to 'Log in', '/facebooklogin', :method => :get %> </p> <p><%= fb_logout_link("(not you?)", request.url) %></p> <% rescue Timeout::Error %> <p> Apologies. Your Spoonflower account is connected to Facebook, but it's not responding at the moment. </p> <% rescue %> <% end %> <% else %> <p> Use your facebook login: <%= fb_login_and_redirect('/facebooklogin', :scope => 'email') %> </p> <% end %>
I put this up, and my 'Code Invalid' fatal notifications were replaced with the notification that the exceptions were being handled. The help desk stopped getting 'I can't log in' emails, so I think that managed it.
0 notes
Text
Updating Facebooker2 implementation to OAuth2
16 months later, and much has changed in the world of Facebook! However, my SSO code has worked, for the most part, continuously since last September.
Up until 7 days ago.
Facebook moved to Oauth2 and caught me asleep at the switch. A week ago all my calls to fb_login_and_redirect started failing. Opening firebug and going to console, the calls were returning:
"OAuth2 specification states that 'perms' should now be called 'scope'. Please update."
I went back to the facebooker github page and read through this very helpful thread:
https://github.com/mmangino/facebooker2/issues/71
I realized that I had missed an entire generation of updates and it was time to get to work.
My first step was to change all the fb login calls to use :scope instead of perms:
from
<%= fb_login_and_redirect('<your URL here>', :perms => 'email,user_birthday')
to
<%= fb_login_and_redirect('<your URL here>', :scope => 'email,user_birthday')
This was sufficient to launch the FB login window, but when the cookie came back from FB, it wasn't compatible with my Oauth implementation. I needed to update my gems and the plugin.
so the next step was to update the Mogli gem. I called
Sudo gem update mogli
And this failed. Apparently my rubygem is out of date. So I called
sudo gem update --system
This successfully updated my rubygem to version 1.8.12, but now when I launched script/console, I got lots of errors:
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /Users/printermac/spoonflower/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:104. NOTE: Gem::SourceIndex#search is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#search called from /Users/printermac/spoonflower/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:104. NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. Gem.source_index called from /Users/printermac/spoonflower/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:104. NOTE: Gem::SourceIndex#search is deprecated with no replacement. It will be removed on or after 2011-11-01. Gem::SourceIndex#search called from /Users/printermac/spoonflower/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:104. /Users/printermac/spoonflower/vendor/plugins/timed_fragment_cache/lib/timed_fragment_cache.rb:111:in `alias_method':NameError: undefined method `cache' for class `Object'
Yikes! So parsing these issues, I'm guessing that my version of rails, which is still at 2.3.4, needs to be upgraded to stay compatible with rubygems 1.8.12. Alternatively, perhaps I can find a slightly older version of rubygems which works smoothly with rails 2.3.4. After googling around using various bits of this error message, I tried
sudo gem update --system 1.6.2
and hit script/console with no errors. I need to come back around to upgrading Rails and the rest of my gems, but this limits the scope of this debugging project.
I call
Sudo gem update mogli
and we are up to the latest version without issues.
Now on to upgrading the plugin. You will note from my earlier posts that I installed this plugin from the facebooker2 github page. I have not really had the chance to experience updating a plugin before, and apparently this is not as easy as working with gems. First I try the obvious:
script/plugin update facebooker2
This does nothing - doing a git status reveals no changes. So I try the next obvious alternative
script/plugin update git://github.com/mmangino/facebooker2.git
Response:
"Plugin doesn't exist: git://github.com/mmangino/facebooker2.git"
So I do a bit of research and discover that the major difference between Gems and Plugins, aside from their scope (gems can be accessed by any rails app, a plugin is installed in exactly one rails app) is the update infrastructure. Apparently when I installed this plugin I should have thought about this a little harder. There are many conversations about the best strategies for managing versions of plugins in Git, including what seems to be the most favored strategy, using submodules.
How about simply re-installing? This command:
script/plugin install git://github.com/mmangino/facebooker2.git
yields the following result:
already installed: facebooker2 (git://github.com/mmangino/facebooker2.git). pass --force to reinstall
Okay, so
script/plugin install --force git://github.com/mmangino/facebooker2.git
returned:
svn: '/Users/printermac/spoonflower/vendor/plugins' is not a working copy removing: /Users/printermac/spoonflower/vendor/plugins/facebooker2/.git Initialized empty Git repository in /Users/printermac/spoonflower/vendor/plugins/facebooker2/.git/ remote: Counting objects: 362, done. remote: Compressing objects: 100% (232/232), done. remote: Total 362 (delta 177), reused 273 (delta 109) Receiving objects: 100% (362/362), 51.68 KiB, done. Resolving deltas: 100% (177/177), done.
doing a git status returned:
# On branch master # Changed but not updated: # (use "git add/rm <file>..." to update what will be committed) # # deleted: vendor/plugins/facebooker2/README # modified: vendor/plugins/facebooker2/Rakefile # modified: vendor/plugins/facebooker2/facebooker2.gemspec # modified: vendor/plugins/facebooker2/lib/facebooker2.rb # modified: vendor/plugins/facebooker2/lib/facebooker2/rails/controller.rb # modified: vendor/plugins/facebooker2/lib/facebooker2/rails/helpers/facebook_connect.rb # modified: vendor/plugins/facebooker2/lib/facebooker2/rails/helpers/javascript.rb # modified: vendor/plugins/facebooker2/spec/facebooker2_spec.rb # modified: vendor/plugins/facebooker2/spec/helpers/facebook_connect_spec.rb # modified: vendor/plugins/facebooker2/spec/rails/controller_spec.rb # modified: vendor/plugins/facebooker2/spec/spec.opts # modified: vendor/plugins/facebooker2/spec/spec_helper.rb
So in theory, I've updated my login calls, I've updated all the dependent gems, and I've updated the facebooker2 plugin. I should be good. I launch Safari to verify that all my efforts have produced a result, and we're there.
So in summary, I'm at
rails 2.3.4
rubygem 1.6.2
mogli 0.0.36
a freshly installed version of the facebooker2 plugin
and all my calls to fb_login were changed from :perms to :scope
I git add the new files to my repo, and git commit the new changes. I go to deploy:
cap production deploy
And capistrano is borked. It returns:
/opt/local/bin/cap:19:in `load': no such file to load -- cap (LoadError)
just to check my sanity, and to make sure this is a rubygems dependency, I return to my previous version of rubygems
sudo gem update --system 1.3.7
and capistrano is returned to functioning, so that isolates the issue. I return my rubygem to 1.6.2. This took two commands, as you can't go straight from 1.3.7 to 1.6.2.
sudo gem update --system
sudo gem update --system 1.6.2
and I then upgraded my capistrano gems:
sudo gem update cap
gem list cap
capistrano (2.9.0, 2.5.9, 2.4.3) capistrano-ext (1.2.1) capistrano_rsync_with_remote_cache (2.4.0, 2.3.6, 2.2)
and my call to cap production deploy worked as it should.
End of this chapter.
0 notes
Text
Extending facebook connection beyond SSO
In previous posts, I've covered the implementation of single sign on with a facebook connection using the facebooker2 plugin.
Here, I want to think through the social use cases best applied in our setting at Spoonflower.
To research this, I referenced a couple other sites that have implemented facebook connect as examples. I wanted to find sites where the major use cases relate to publishing, sharing, and possibly selling a user's creations.
In particular:
http://www.scribd.com
http://www.jibjab.com
http://www.thehotlist.com
The jibjab CEO spoke about how his site has committed to facebook here:
http://www.insidefacebook.com/2009/11/10/connect-brings-jibjab-1-5-million-facebook-users/
there is an article here about how thehotlist is using events as a central organizing feature:
http://www.insidefacebook.com/2010/09/20/thehotlist-discover-events/
Borrowing from these discussions, I envision 4 primary areas for integration:
1. Single Sign on
2. Publishing updates from designers as they debut new designs in the marketplace.
3. Publishing Spoonflower browsing activities including favoriting, commenting, and voting back to facebook.
4. Enable use of facebook photos in Spoonflower designs.
As time goes by, there are opportunities to also integrate friends, places, and events.
0 notes
Text
SSO with facebooker2 on rails, part 3
In previous posts I tackled installing facebooker2 and connecting to a facebook account. These steps were definitely the difficult ones. Now that the plugin is installed and working, its time to move on to thinking through and developing code for all the single sign on use cases. There are three primary use cases, three secondary ones, and two tertiary ones:
The primaries:
1. I want to create an account at Spoonflower using a facebook connection. In our case, there are a few different versions of this, as new users create empty accounts or create accounts as they are completing their fist design upload or checkout.
2. I want to login to my spoonflower account using its facebook connection
3. I want to create a facebook connection in my current spoonflower account
The secondary:
1. I click to login using a facebook connection, but I have not yet created a spoonflower account.
2. I click to login using a facebook connection, but I have not yet connected by existing spoonflower account to my facebook account
3. I click to create a new spoonflower account using a facebook connection, but I have an existing spoonflower account with a matching email address.
The tertiary:
1. I create a spoonflower account with a facebook connection. Later I remove spoonflower from my approved applications. I go back to spoonflower and click to login using my facebook account.
2. I log in to spoonflower using facebook, and while using spoonflower in one tab, I remove spoonflower from my approved applications in the other.
0 notes
Text
SSO with facebooker2 on rails, part 2
I'm working on getting facebook connect to work with rails using the javascript API and the facebooker2 plugin, in 3 steps:
1) get the facebooker2 plugin to work in my environment - hello world. DONE!
2) Use facebooker2 to log in to facebook from my local app, and then retrieve email address and facebook user id.
3) Use the facebook account data to create a paired local account, enable a returning user to go straight into their new Spoonflower account on their return.
Onwards to step 2!
Having gotten facebooker2 installed and a facebook login button to show up, the next step is to press login and see what happens.
In my case, an invalid API key error. It turns out that I left the < and > in the .yml file when I copied in my API key. After removing these and restarting apache, a user name and password prompt appears in the popup. I log in.
Since I specified
<%= fb_login_and_redirect('fb', :perms => 'email') %>
the next prompt from facebook is for permissions to send me email. When I click 'Allow', I am redirected. Its worth noting that facebook prepends 'http://localhost/', the site URL edited on the facebook application tab to whatever url you specify as an argument to fb_login_and_redirect
Since my redirect went straight back to the same page, and I should now be logged in, it should activate the other clause of the if statement:
<% if current_facebook_user %> <%= "Welcome #{current_facebook_user.first_name} !" %> <%= fb_logout_link("Logout of fb", request.url) %><br />
However, the value of 'current_facebook_user' is nil, so this isn't working. I drop a few lines of code into the controller.rb 'current_facebook_user' method and after a restart, they show up properly. After digging around the code a bit, its clear that facebook should be dropping a cookie that can be accessed in the controller with cookies['fbs_' +app_id], and this cookie is AWOL. Hitting cookies.inspect revealed my session cookie, but no others. hmmm. Time to dig through the facebooker2 code and find where this cookie is being set.
Here's the source generated by the javascript helper <%= fb_connect_async_js %> that is supposed to set the cookie:
91 <script> 92 window.fbAsyncInit = function() { 93 FB.init({ 94 appId : '292960343200', 95 status : true, // check login status 96 cookie : true, // enable cookies to allow the server to access the session 97 xfbml : true // parse XFBML 98 }); 99 100 }; 101 102 (function() { 103 var s = document.createElement('div'); 104 s.setAttribute('id','fb-root'); 105 document.documentElement.getElementsByTagName("body")[0].appendChild(s); 106 var e = document.createElement('script'); 107 e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; 108 e.async = true; 109 s.appendChild(e); 110 }()); 111 </script>
I've got to admit, this looks like it should get the job done. I think I'm missing something basic.
As a next try, I decided to try throwing in a logout link:
<%= fb_logout_link('logout', '/fb' ) %>
This actually works fine, logs me out of facebook just fine. Calls to the facebook API seem to be working fine; I guess my isssue really is limited to accessing the cookie.
After much poking around, I eventually try to execute this on different browsers, and it turns out that it works exactly as advertised on Safari. I expect I've got some sort of cross-site cookie issue, and perhaps there are default security positions that are different between chrome, firefox, and Safari.
With success feeling close at hand, I went ahead and promoted the whole thing up to my AWS presence, reset my site URL and site domain, installed gems, and hit the page, and it worked from all browsers.
I then added the following lines to the simple example:
<% current_facebook_user.fetch %>
<%= "fb user inspect: #{current_facebook_user.inspect} !" %>
<img src="https://graph.facebook.com/<%= current_facebook_user.id.to_s %>/picture"/>
and promoted them to production. I was rewarded with a pretty picture, and real facebook user data: fb user inspect: <#Mogli::User email="**********@yahoo.com" first_name="Gart" gender="male" id="***********" last_name="Davis" link="http://www.facebook.com/gartdavis" locale="en_US" name="Gart Davis" timezone=-4 updated_time="2010-01-11T12:57:59+0000" verified=true> ! And so ends phase 2.
0 notes
Text
Single Sign On via Facebook on Rails
I've been looking for the simplest method by which new visitors can authenticate at spoonflower using their facebook ids.
Let me start by saying that researching this has been really confusing. Facebook is in the midst of major transitions/simplifications to its public interfaces, including changing focus away from FBML. When I investigated this awhile ago I ended up looking into the facebooker gem. This is an automation method that uses the REST API, and is now unsupported because a lot of the code was devoted to supporting fbml, and was not compatible with Rails 3.
Its been replaced by facebooker2, a new plugin based on mogli that works with all versions of rails and is a lot smaller, as no effort is made to support fbml. However, not much doc has been drafted, so we'll see how it goes.
I'm going to tackle this in three parts:
1) get the facebooker2 plugin to work in my environment - hello world.
2) Use facebooker2 to log in to facebook from my local app, and then retrieve email address and facebook user id.
3) Use the facebook account data to create a paired local account, enable a returning user to go straight into their new Spoonflower account on their return.
Here goes!
-----------
I am working from the README on the facebooker2 project:
http://github.com/mmangino/facebooker2
and also drawing from a complete working example that is at:
http://github.com/mmangino/facebooker2_fb_connect_example
The first step is to set up my facebook app and make sure I can work with it on localhost, so I can play with this stuff on my desktop. The key here is, once your app is created, to edit your website tab.
Go to http://www.facebook.com/developers/editapp.php?app_id=[Application ID]
and click on the 'web site' tab. Under 'Site Domain' enter 'localhost', and under 'Site URL', enter 'http://localhost/', and don't leave off the trailing slash!
After setting up my facebook app, I set about installing the facebooker2 plugin and the mogli gem.
script/plugin install git://github.com/mmangino/facebooker2.git
sudo gem install mogli
....which brought aboard 4 gems:
When you HTTParty, you must party hard! Successfully installed hashie-0.4.0 Successfully installed crack-0.1.8 Successfully installed httparty-0.6.1 Successfully installed mogli-0.0.14
Steps 2-5 verbatim:
2. Create config/facebooker.yml with the appropriate environment. production: app_id: <your application id> secret: <your application secret> api_key: <your application key> 3. Create config/initializers/facebooker2.rb and place the following line in it Facebooker2.load_facebooker_yaml 4. Add the following line to your app/controllers/application_controller.rb include Facebooker2::Rails::Controller
Pretty Simple.
The next (and final) step on the facebooker2 readme requires some thought:
5. Update your rails applications to use the rails helpers. This could be in a shared login partial.
I went ahead and created a page with the readme example:
<%= fb_connect_async_js %>
<% if current_facebook_user %>
<%= "Welcome #{current_facebook_user.first_name} !" %>
<%= fb_logout_link("Logout of fb", request.url) %><br />
<% else %> <%= fb_login_and_redirect('fb', :perms => 'email') %> <% end %>
And fired up the browser. The first issue:
no such file to load -- hmac-sha2
A quick google revealed another developer with the same issue, and it looks like they are on the same versions as me:
Rails - 2.3.4 Ruby - 1.8.7
It turns out that I'm missing a gem: 'ruby-hmac', so I do a
sudo gem install ruby-hmac
Successfully installed ruby-hmac-0.4.0
Okay! and try again and
The application spawner server exited unexpectedly Exception class: Passenger::Railz::ApplicationSpawner::Error
hmmm. Hunted down my error logs (they are at /opt/local/apache2/logs on my OSX box) and found this:
Exception Facebooker2::NotConfigured in Passenger::Railz::ApplicationSpawner (Unable to load configuration for development from facebooker.yml. Is it set up?) (process 2424): from /Users/gartdavis/spoonflower/vendor/plugins/facebooker2/lib/facebooker2.rb:29:in `load_facebooker_yaml' from /Users/gartdavis/spoonflower/config/initializers/facebooker2.rb:1
That makes more sense. When I created my facebook.yml I copied from the Readme verbatim, so the environment in my .yml file that is supported is 'production' and I'm running 'development' on my localhost. I create a separate entry for 'development' with my facebook identifiers and try again, and this time my localhost root page comes back properly.
I hit my new facebook page and get a facebook login link. End of Step 1!
Onwards to step 2: http://tumblr.com/xfbijzyvy
3 notes
·
View notes