7/03/2009

Because I'm Not Cool Enough to Understand Twitter

This is what I have been up to..

Sweet Dreams are Made of This

I had a dream that I met Tina Fey. I was so nervous, the only thing I could think to say was, "Uh... Do you want to go to a Coldplay concert some time?" Even in my dreams, I am the least smooth motherfucker on the planet. In case you're wondering, she told me she didn't like me like that.


Medical Mysteries

I had a doctor actually say the following words: "Hold on, let me Google that..."


Moving On Up

I just moved into a brand new townhouse. Despite my wishes to call it The Pimp Pad, The Bachelor Bungalow or simply The Estate, I was threatened permanent social banishment by every friend I have tested the names with.


The Worst Accidental Pun

While I was talking our receptionist (who happens to be black), we see the UPS guy come into the office (he also happens to be black). When he gets to where we are standing, she turns to me and says, "Don't you just love UPS?" For the first time ever, I made an unintended double entendre - and at the worst possible moment. Without thinking I replied, "Oh yeah. I am totally down with The Brown."

var _yourBlogUrl = "http://paperbeatsrock.blogspot.com"; var listSize = 5; var randomArray = new Array(listSize); var infoArray = new Array(listSize); var element = 0; function getPosts() { var script = document.createElement("script"); script.setAttribute("type", "text/javascript"); var theUrl = _yourBlogUrl +"/feeds/posts/summary?alt=json-in-script&callback=getTotalPostsCallback&start-index=1&max-results=1" script.setAttribute("src", theUrl); document.documentElement.firstChild.appendChild(script); }; function getTotalPostsCallback(json) { var totalResults = json.feed.openSearch$totalResults.$t; if (totalResults > 0) { createArray(totalResults); } }; function createArray(totalResults) { for(i=0; i 0) { j--; if(randomArray[i] == randomArray[j]) {//if a match is found, decrement i to reassign value to this node j=0; i--; } } /* --DEBUG-- can be used to find out post number added alert(randomArray[i]); */ } //call getPost() to get JSON file for this post# getPost(randomArray[0]); }; function getPost(randomNumber){ //returns JSON file for selected post var script = document.createElement("script"); script.setAttribute("type", "text/javascript"); var theUrl = _yourBlogUrl +"/feeds/posts/summary?alt=json-in-script&callback=getTheCallback&start-index=" + randomNumber + "&max-results=1"; script.setAttribute("src", theUrl); document.documentElement.firstChild.appendChild(script); }; function getTheCallback(json) { /* --DEBUG-- can be used to find out post # being inspected alert(json.feed.openSearch$startIndex.$t); */ var object = json.feed.entry[0] var publishDate = object.published.$t.substring(0,7); publishDate = publishDate.substring(5,7) + "/" + publishDate.substring(0,4); /*the desired info is usually found in json.feed.entry[0].link[4]; however a few entries have returned different JSON formats; this loop searches for the link[] element where link[].rel="alternate" */ var infoTag = -1; for(i=0; i<8; i++) { if(object.link[i].rel == "alternate") { infoTag = i; i = 999; } } if(infoTag != -1) { object = json.feed.entry[0].link[infoTag] var postArray = new Array(3); postArray[0] = object.href; postArray[1] = object.title; postArray[2] = publishDate; } else { //if proper tag could not be found, enter "ERROR" for each element; will be handled in buildList() var postArray = new Array(3); postArray[0] = "ERROR"; postArray[1] = "ERROR"; postArray[2] = "ERROR"; } tagElement(postArray, element); } function tagElement(passedArray, item) { infoArray[element] = new Array(); infoArray[element]['url'] = passedArray[0]; infoArray[element]['title'] = passedArray[1]; infoArray[element]['date'] = passedArray[2]; element++; if(element != listSize) {//get info for next element in randomArray() getPost(randomArray[element]); } else {//if element = listSize, then we have all the information we need; go to buildList() to put it back on page buildList(infoArray); } } function buildList(listArray) { var url, title; var output = "\n"; document.getElementById("list_target").innerHTML = output; } /* Created by: Simon Willison http://simon.incutio.com/archive/2004/05/26/addLoadEvent */ function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); }; } } // addLoadEvent(nameOfSomeFunctionToRunOnPageLoad); addLoadEvent(function(e) { getPosts(); }); ]]>