Posts RSS Comments RSS 132 Posts and 25 Comments till now

Archive for the 'General' Category

Trying to cool down the hallway

Summer finally arrived in Bellingham. Yay! Now it’s too hot. And the hallway in our apartment is approximately 20 degrees warmer than outside or in our unit. The hallway is probably so damn hot because almost zero air moves through it during the course of a day. The 2 stairwell doors are always closed and the elevator doesn’t let in much air when it opens. At the end of the hallway is a window that lets in sunlight and the door to the “community deck.”

I had an idea this morning to prop the deck door open to let air in during the day. I figured it shouldn’t bother anyone and the door doesn’t lock so it’s not a security issue. I propped it open this morning with an empty plastic bottle and when I left for work 30 mins later it was gone. Dun dun dun…

I never see anyone in my hallway, or on the deck. I found it very weird that someone took the bottle out ruining my cooling experiment. I tried again with an empty milk jug this evening at about 9pm and it was gone again at 10:30. WTF. I think I will keep trying until our recycling bin is empty. I really wanna know who is closing the door (and indirectly taking out my recycling). It’s impossible to not notice the obsene heat in the hallway, so wouldn’t most people think it’s a great idea to prop the door open?

More as this story develops.

Can’t explain why I love these sites

http://www.isobamapresidentyet.com/ or http://www.isobamapresident.com/

Previously.

Recent Happenings

My Dad retired from 30 years as a Federal Employee
Dad's retirement
More retirement photos.

We went camping for Kelly’s bachelor party
The Setup
More bachelor party photos.

Kelly and Katie got married
Kelly and Katie
More wedding photos.

Flash for mac is bad for your HTTP_HOST

I’ve been testing the super awesome swfupload code for some projects at work.  I have nice progress bars working and you can queue up multiple files.  It’s sweet.  I tested out my code in Opera, Firefox, Safari 3, IE 7, etc on Windows and Linux.  Working great.

Of course, an hour before an important meeting is when we discover it doesn’t work on any mac browser.  The flash debug output shows our site initialization code is just throwing a fit.  No DB access settings can be found.  Doesn’t make any sense why an HTTP request from flash on a mac would break our app.

Here’s the basics of how our our setup switches dev/production settings:

  1. if ($_SERVER[‘HTTP_HOST’] == ‘example.mydesktop’) {
  2.     // LOCAL DEV SETTINGS
  3. } else if ($_SERVER[‘HTTP_HOST’] == ‘example.com’) {
  4.     // PRODUCTION SITE SETTINGS
  5. }

It makes considerations for www. etc. The problem in this case is that flash is adding :80 to the HTTP Host header. Instead of

GET /path/to/file HTTP/1.1
Host: example.com

Flash for mac likes to add

GET /path/to/file HTTP/1.1
Host: example.com:80

This will cause ‘example.com:80′ to show up in the php $_SERVER['HTTP_HOST'] variable. You can see how this would break simple host detection.

Scrabble word search

While playing scrabulous online recently, I found myself needing a site to search for words that start or end which what I have in my scrabble letters.  I didn’t find anything good so I decided I would write my own. Not sure how to exactly describe the feature, I decided to call it scrabble lookup.  You search for any part of a word, and it gives you lists of all the words that start with that phrase or end with that phrase.  The lists show the length of the word and points earned, assuming no multipliers.  It takes into consideration the maximum number of letters in scrabble which means that some words you would need the blank letters to spell.

And yes, there are words that end in q.

Greasemonkey script for twitter

A few weeks ago I was thinking about how hilarious it would be to view twitter pages with OMG: prepended to all the messages.  I’ve had a post-it note attached to my monitor ever since that has 3 words: twitter greasemonkey omg.

I present my first greasemonkey script: twitter omg.

To be honest, I’ve never actually installed greasemonkey before.  Writing the script was quite fun.  I’ll be looking for opportunities to make a script that is actually useful…

Next »