Monday, March 30, 2009

Bike to work


Sent from my iPhone

Posted via email from CyberBilly

Facebook Connect Login Logic


// this condition actually just looks at whether the "user" cookie is set, which seems to
// indicate that they will all be set; it doesn't do the signature verification yet
if( the FC cookies are set )
  if( there is a valid logged-in MP session )
    if( the Facebook user and MP user are linked in the database )
      // just continue loading the page; we haven't checked the FC cookie signature,
      // but that should be fine: the user has proven that they are the MP user by
      // by having the session, and the link in the database proves that that user
      // was authenticated as the linked Facebook user at some point.
    else
      if( !the Facebook cookies signature checks out )
        // perhaps the cookies were tampered with; I don't worry too much about handling
        // this case nicely
        clear the FC cookies and redirect back to the front page
      else
        if( the MP user is linked to any Facebook user in the database )
          // this is a strange case that should be very rare; usually, the javascript will probably
          // prevent this; just switch the user to the Facebook user, since that puts us into a
          // known state and seems reasonable
          log the user out of MP
          log the user into MP as the user linked to the Facebook user
        else
          if( the Facebook user is linked to any MP user in the database )
            // perhaps the user apparently has two Facebook accounts? this redirects them to
            // a page that allows them to log out of Facebook only (and stay logged into MP)
            // or to log out of MP and log back in as the MP user linked to their Facebook
            // account; if they choose the first option, it forwards to a page that executes
            // this javascript:
            // FB.ensureInit ( function () { FB.Connect.logoutAndRedirect('/'); } );
            // The ensureInit() is important, since FB.init() runs asynchronously and method
            // calls that occur before it finishes won't run properly. Unfortunately,
            // logoutAndRedirect() shows the user a dialog box that says that they're logging
            // out of "this site and Facebook", which is not actually true, but I don't think
            // you can control that.
            redirect to a special page to handle this case
          else
            // automatically link the users (normally, this state will have been the result
            // of clicking the "connect accounts" link)
            link the MP user with the Facebook user in the database
            redirect the user to a user explaining the new account and asking them to select
                 a username
  else
    if( !the Facebook cookies signature checks out )
      clear the FC cookies and redirect back to the front page
    else
      if( the Facebook user is linked to any MP user in the database )
          // if the accounts are linked, then the user has already proven that the person
          // authenticated by Facebook is the same person with the MP account; this is
          // typically the result of the user clicking the "login with Facebook" link
          log the user into MP as the user linked to the Facebook user
      else
          // User probably just clicked "login with Facebook" and they don't already have an MP
          // account. Alternatively, I could have performed the automatic account creation in
          // response to a post to the Post-Authorize URL, but doing it here seems just as well,
          // and this way I don't have to remember in the database whether the user has had
          // a chance to change their username.
          create an MP account for the Facebook user
          call the Facebook API to get the user's real name, which is used as their initial userame
                      (modify the username to avoid collisions with existing)
          log the user into MP as the new user
          redirect to a page explaining what just happened and prompting them to change their
               username if desired
else
  // at this point, the user might be logged into MP or might not
  if( logged into MP and that user is linked to a Facebook user in the database )
    // this might be the result of stale cookies; when the user is connected to a Facebook user,
    // then they need to use Facebook authentication, so log them out and let them try again
    log the user out of MP

This is what a website has to do if it wants to use Facebook Connect to associate FB users with it's own users. It's far from ideal as you might guess even if you can't read pseudo code.

Posted via web from CyberBilly

Sunday, March 29, 2009

Washateria @l guerrero and 17th


Sent from my iPhone

Posted via email from CyberBilly

Saturday, March 28, 2009

Dissent bicycle tour w/ @leted and @celeste00 @l at&t park san francisco


Sent from my iPhone

Posted via email from CyberBilly

Tuesday, March 24, 2009

Alpha Bits with Sega VR Contest | Commercial


*sigh* childhood

Posted via web from CyberBilly

Monday, March 16, 2009

Computer Furniture | Computer Workstations | Lcd/Plasma Cart - Black - 239192BK - GlobalIndustrial.com


I've been dreaming of something just like this. I'm tired of the television being the immovable center of attention in my living room. A cart like this would allow me to not only treat the television more like a large screen computer and allow me to move it around the room to best serve whoever is using it at the time.

Posted via web from CyberBilly

Thursday, March 12, 2009

Mansfield Teacher Busted For Shoplifting


A Mansfield teacher has been busted for shoplifting.  Police say Deborah Ludlow was caught trying to steal from Kohl's department store in Fort Smith Wednesday.  Cops say she stuffed some clothes, and even a couple of rugs, into her purse and tried to make a break for it.  Ludlow now faces misdemeanor shoplifting charges.

Ms Ludlow was my High School English teacher. Apparently she got caught again recently. Gotta say she always was one of the cooler teachers I had, but it sounds like I could have taught her a thing or two back then. Never steal anything that doesn't fit in your pockets Ms L.

Posted via web from CyberBilly

Hulu - Saturday Night Live: Wii Guys


Yeah, it's like that

Posted via web from CyberBilly

Wednesday, March 11, 2009

The Decemberists - The Hazards of Love


Download, listen, and be warned. Then go buy a ticket for their upcoming tour you music pirating freeloader!

 

Posted via web from CyberBilly

Sunday, March 08, 2009

I miss...


Sent from my iPhone

Posted via email from CyberBilly

Friday, March 06, 2009

Toxoplasmosis - Wikipedia, the free encyclopedia


Toxoplasma is one of a number of parasites that may alter their host's behaviour as a part of their life cycle.[15] The behaviors observed, if caused by the parasite, are likely due to infection and low-grade encephalitis, which is marked by the presence of cysts in the brain, which may produce or induce production of a neurotransmitter, possibly dopamine,[16] therefore acting similarly to dopamine reuptake inhibitor type antidepressants and stimulants.

Correlations have been found between latent Toxoplasma infections and various characteristics:[17]

  • Decreased novelty-seeking behaviour[18]
  • Slower reactions
  • Lower rule-consciousness and jealousy (in men)[18]
  • More warmth and conscientiousness (in women)[18]

I suddenly want to wash my hands

Posted via web from CyberBilly

We are The Cyclists - Cyclelicious


Okay funny but...

Roads are mainly paid for by taxes on commercial diesel. Why? because semi-trucks cause more wear to the road. Why? because they weigh tons. Ever seen a bicycle lane that was concave at a redlight from the weight of the idling bicycles? If bicycles were the only vehicles roads would cost less to build and maintain. Leave the heavy cargo for the rails.

Next, in all my years of riding on sidewalks, and running red lights I've never ran over a dog or caused an accident, but I've done both of those things in a car.

Finally, carbon fiber and lycra shorts are for choads.

Posted via web from CyberBilly

Wednesday, March 04, 2009

Death Cab for Cutie Loves Boing Boing Video -- and we, in Turn, All Love Animator/Director Bill Barminski. - Boing Boing



Well, this is neat. About the video above, one of our viewers/readers writes:

My name is Nick Harmer and I play the bass guitar in Death Cab for Cutie. I'm writing to you because Bill Barminski of Walter Robot fame just informed me that you'd be posting something about the video they recently completed for our song "Grapevine Fires" on Boing Boing.
Nick is right, and that amazing video is embedded above. Feast your eyes, mutants! I asked Nick to talk with us a little more about how the video came to be, and he very kindly obliged. He continues,
I couldn't be more excited that you might post something about our video, because, actually, to be completely honest, you are responsible for pairing Death Cab for Cutie with Walter Robot in a cupid sort of way, whether you know it or not.

I personally am a avid reader of Boing Boing while off the road and on the road, and seriously, you and the Boing Boing gang are responsible for many, many smiles in my life, thank you for that.

Last November you posted an item on Boing Boing tv about the Walter Robot video for Gnarls Barkley's Mystery Man and when I saw that clip, I knew that Walter Robot was the answer. Especially for our song "Grapevine Fires." So thank you again and again, Xeni, for not only enriching my life on personal level but on a professional level too. I'm not sure I would have discovered Walter Robot without your help.

Wow. I'm a massive fan of Death Cab, as are my fellow bloggers and Boing Boing video production colleagues, so -- Nick, you just blew my/our minds. Thank you! He continues:
During our last album, entitled Plans, I got frustrated with the amount of sometimes suffocating input that bands and labels felt they needed to give to filmmakers making videos, so along with my friend, director Aaron Stewart-Ahn, we came up with a concept to have 11 different filmmakers direct a video for each song on our album. The set up was simple, a lower budget with complete creative control. We held the line that no matter what you make as a filmmaker we will stand behind as a band. The "Directions" project as it was called turned out beautifully and the videos that were made surpassed anything we could have hoped for. So it made sense to keep this hands off philosophy for the videos for our newest album Narrow Stairs as well.

After seeing the Mystery Man video on Boing Boing (and other Walter Robot shorts, too) I just had a hunch that Walter Robot's style would be a perfect fit for our song "Grapevine Fires." When I first spoke with Bill and Christopher, I really had no specific direction in mind. I told them that I felt like we would have to match the lyrics somehow, without being too literal and that I really wanted their animation style to remain fragile and delicate amidst such a tragic song. At first I was worried about how they would walk the line that the song holds.

(Nick's email continues after the jump! - XJ)

Posted via web from CyberBilly

Tuesday, March 03, 2009

Dreds


Sent from my iPhone

Posted via email from CyberBilly