Tagged: www

I need to follow through on more of my goofy ideas

A few days ago I was explaining to my friend what Twitter is. He thought it sounded similar to a message board I made back in 2001 for my friends to keep in touch after we all left for college. At the time I wasn’t really familiar with blogging. I believe this was the first real code I wrote in PHP. It definately served it’s purpose well for a few years. As you can see from the stats, usage has died off completely. I think this concept was more along the lines of the blog aggregation “planets” (ResTek, Mozilla, gnome, etc) of today.

I will now claim that I almost invented Twitter.

Back in 2003, AIM was the hot shit with people living in the dorms. I really liked how much effort people put into their away messages. I remember a peticular away message of mine declaring how awesome last nights party must of been because I woke up and there was a beer bottle in my fish tank.* My idea was to write a script that logged the away messages of everyone I knew and stored them in a DB. I got really tangled up in implementation details. I tried using perl and some module that could connect to AIM. For some reason I thought I needed to use threading in perl. This became a giant nightmare as I knew very little of perl or threading at the time. Needless to say, the script never made it into a cron, and the rest was not history. I can’t help but wonder what kind of website I would have thrown together once I started gathering data…

These days I notice that people still put a lot into their status messages on gchat, AIM, etc. And facebook has fully embraced status updates as well. It took me a while to warm up to Twitter, but I’m really liking it now. How else am I supposed to get updates on what my friends are doing from a hut in some tiny village in Uganda that has no electricity or running water?

* I thought it would be a good addition to the tank so I drunkenly boiled it and placed the sterile bottle in the tank. It was a clear Corona bottle, and actually did work pretty well in a fish tank.

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:

if ($_SERVER['HTTP_HOST'] == 'example.mydesktop') {
} else if ($_SERVER['HTTP_HOST'] == 'example.com') {

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.

Written by Comments Off on Flash for mac is bad for your HTTP_HOST Posted in General Tagged with ,

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.

Written by Comments Off on Scrabble word search Posted in General Tagged with

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…

Quick www. survey

I’ve been trying to pay attention to sites that either add a www or remove www from their domain. For example http://www.reddit.com/ turns into http://reddit.com/ or http://cnn.com/ turns into http://www.cnn.com/.

I’ve been defaulting any new domains I setup to remove the www. Remember, www. is deprecated.

Here’s a quick survey of some popular sites:

adobe.com adds www
amazon.com adds www
bbc.co.uk adds www
bloglines.com adds www
blogspot.com adds www
cnn.com adds www
engadget.com adds www
facebook.com adds www
forbes.com adds www
google.com adds www
last.fm adds www
microsoft.com adds www
mozilla.com adds www
msnbc.msn.com adds www
myspace.com adds www
politico.com adds www
salon.com adds www
techcrunch.com adds www
w3.org adds www
washingtonpost.com adds www
whitehouse.gov adds www
wired.com adds www
creativecommons.org removes www
digg.com removes www
gizmodo.com removes www
news.yahoo.com removes www
reddit.com removes www
slashdot.org removes www
tinyurl.com removes www
twitter.com removes www
wordpress.org removes www
blogger.com no change
boingboing.net no change
boston.com no change
delicious.com no change
flickr.com no change
geocities.com no change
gmail.com no change
imdb.com no change
nytimes.com no change
prweb.com no change
technorati.com no change
youtube.com no change

Written by Comments Off on Quick www. survey Posted in General Tagged with

IE 8 Beta

IE 8 Features

IE 8 beta is out. Looks like they’re making great strides to improve their support for standards. I love that you can install the beta with out the need to uninstall it when it breaks sites. I’m hoping they keep the Emulate IE7 button for the final release. Or somehow tuck it away in a menu so the option is still there. An amazing feature for web developers would be an additional Emulate IE6 feature. Testing sites in Internet Explorer would be a breeze if that was the case. I haven’t played with the developer tools much, but I like how much easier they’re making JS debugging for IE. Here’s a post from the IE Blog about the new developer tools

Written by Comments Off on IE 8 Beta Posted in General Tagged with