Skip to Navigation

Muffinlabs!

Code

I wrote pitch about a million years ago it seems like. It was fairly popular for such a niche game. Anyway, I've gotten the occasional request to release the code, so I've done so on github. Perhaps someone will use it to make a version of the game for another platform.

Enjoy!

YouTube API Blog: Flash and the HTML5 <video> tag

There's been a lot of discussion lately about whether or not the HTML5 <video> tag is going to replace Flash Player for video distribution on the web. We’ve been excited about the HTML5 effort and <video> tag for quite a while now, and most YouTube videos can now be played via our HTML5 player. This work has shown us that, while the <video> tag is a big step forward for open standards, the Adobe Flash Platform will continue to play a critical role in video distribution.

It's frustrating to see the web move so slowly(*) sometimes. If google can't make the video tag work, it can't be done.

* It's sort of wack that I even wrote that.

WhalePail is a simple web app to generate RSS feeds for a variety of Twitter data. I wrote it to help me keep track of the collection of bots I have running on Twitter. I used to just have a couple panels in TweetDeck to watch them, but TweetDeck sucks, and so does having to watch it all the time. Now, I can get a daily summary of their activity in my RSS feed, which is much easier to deal with, and I can scrap TweetDeck in favor of a much better client.

To use the site, you'll need to authenticate yourself via Twitter. Then you can setup checks for tweets, mentions, or just search for a phrase. You get the results back as an RSS feed. You can specify daily checks, or a couple times a day. This is handy if you're checking for something that might have enough volume that Twitter's API might flush it out more than daily. I might add some other options like JSON output later.

The code runs on Sinatra, and is available as twitter-rss-digest on github. I used the sinitter project as a starting point.

Processing.js

17
Jun 2010

I have a processing script running in the header of my site, because that's how I play. I've rotated them manually a few times over the months, sometime soon I will automate that. Click the 'hide' link to disable them.

  1. <?php
  2.   /**
  3.    * get first monday of the week
  4.    */
  5. function StartOfWeek($year, $week) {
  6.   $Jan1 = mktime(1,1,1,1,1,$year);
  7.   $MondayOffset = (11-date('w',$Jan1))%7-3;
  8.   $desiredMonday = strtotime(($week-1) . ' weeks '.$MondayOffset.' days', $Jan1);
  9.   return $desiredMonday;
  10. }
  11.  
  12. function output_result($week_of_year, $short = false) {
  13.   $tmp = StartOfWeek(date("Y"), $week_of_year);
  14.  
  15.   $sStartDate = date ("F d, Y", $tmp);
  16.   $sEndDate = date ("F d, Y", $tmp + (6*24*60*60));
  17.  
  18.   if ( $short == false ) {
  19.         print "week of <b>$sStartDate - $sEndDate</b> - ";
  20.   }
  21.  
  22.   if ( date("L") == 0 ) {
  23.         $plastic = 0;
  24.   }
  25.   else {
  26.         $plastic = 1;
  27.   }
  28.   if ( $week_of_year % 2 == $plastic ) {
  29.         print " Plastic";
  30.   }
  31.   else {
  32.         print " Paper";
  33.   }
  34.   print "\n";
  35. }
  36. ?>
  37.  
  38. <p><?php output_result(date("W")); ?></p>
  39. <p><?php output_result(date("W")+1); ?></p>
  40.    
Syndicate content