Last year, I put together a web site that generates schedules for the Ice Oasis hockey leagues. This worked well up until a month or so ago. Then this started happening:
Continue reading “unofficial ice oasis schedule update”
the magic growing text box
Here’s a text box that grows as you type to hold just the right amount of text:
<textarea name="foo" rows="1" cols="20" onkeypress="resizeme(this);"></textarea>
<script type="text/javascript" charset="utf-8">
// <![CDATA[
function resizeme(t) {
var characterCount = t.value.length;
// assuming proportional font
var columnCount = Math.floor(t.cols * 1.25);
var height = t.rows;
var newHeight = 1 + Math.floor(characterCount/columnCount);
if (newHeight != height) {
t.rows = newHeight;
}
}
// ]]>
</script>
Here it is in action:
top 20 CDs of 2005
- Luke Doucet/Broken (and other rogue states)
- Kyler England/Live Wire
- Jason Mraz/MR. A-Z
- Sylvie Lewis/Tangos & Tantrums
- Libbie Schrader/Taking the Fall
- Samantha Murphy/Somewhere Between Starving & Stardom
- Josh Rouse/Nashville
- Pocket Dwellers/PD-Atrics
- Erin McKeown/We Will Become Like Birds
- Sarah Harmer/I’m a Mountain
- Kathleen Edwards/Back to Me
- Emm Gryner/The Great Lakes
- Great Big Sea/The Hard and The Easy
- Adrianne/Down To This
- Charlotte Martin/Darkest Hour
- Anya Marina/Miss Halfway
- Tristan Prettyman/twentythree
- Krister Axel/Permanent Friday Night
- Peter Bradley Adams/EP
- Dave’s True Story/Nature
fixing the airlines
Sites like Expedia, Yahoo Travel and Travelocity all have one thing in common: they suck. Actually, they probably all use SABRE, too.
It’s very hard to use these sites to compare trips with multiple airports; refining your results is hard, too. Maybe the UI is bad on purpose — they want you to give up and just buy the more expensive flight.
And why not? They’re travel agents; they make money on ticket sales. There’s hardly an incentive to be objective.
Three new players are filling the void. The first is SideStep, which my friend Samantha told me about. With SideStep, you can easily exclude flights out of your price range, favourite airlines or agreeable departure times. The UI is really slick, and it’s very responsive.
Someone at BarCamp Austin mentioned Kayak, which does much the same thing.
What looks even more interesting is FlySpy, which TechCrunch highlighted in February. FlySpy takes this to a whole new level, letting you track pricing trends and figuring out just when is the right time to buy. You can play with the alpha now, and see what it’s like to fly out of Minneapolis.
Lastly, if you ever want to find out which airlines and flight numbers will take you from A to B, check out SkyGuide.
(keywords: airline airfare flight price cheap)
blowing up a g4
so some guy got people to donate money so he could buy a G5 and blew up his G4. too funny.
ISO 3103
ISO 3103, the international standard for brewing tea.
Canadian University Lightbulb Jokes
Using CURL in PHP
In Python, to read a URL, I do the following:
import urllib
data = urllib.urlopen('http://foo.com/').read()
PHP links against cURL, which lets you accomplish the same thing … in five lines of code.
If this is something you plan to do more than, say, once, you’ll want an easier way of doing this. Here’s the function I use:
function readUrl($url) {
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($curlHandle);
if (!$data) {
print curl_errno($curlHandle) . " " . curl_error($curlHandle);
curl_close($curlHandle);
return false;
}
curl_close($curlHandle);
return $data;
}
(keywords: curl php wrapper example)
congrats Mark and Catie!
Mark Erelli and Catie Curtis just won the grand prize in the International Songwriting Competition.
Their song, “People Look Around,” is a stark, honest portrait of the United States and a cry for humanity — for us to be more human:
Mississippi River divides this land in two,
Like the way we tend to think of things;
Black and white, red and blue.
If they can keep us fighting about marriage and God,
There’ll be no one left to notice if the leaders do their jobs.
the importance of net neutrality
the execs at the telcos (perhaps the same people whose secretaries print their emails — who knows) have this great idea to make money off the internet: meter everything.
their argument is that google is getting a “free ride” on their network. well, no, they aren’t. they are paying for bandwidth at their end, and you, the end user, are paying on your end as well.
that’s like at&t saying they should get 5% of the profits of every telemarketing call. sigh.
for a great overview of this, listen to Burnie Burns’s SXSW keynote and read Brad Templeton’s essay. (Scot Hacker has notes from Burnie’s talk.)