Google AppEngine adds blacklists

May 28th, 2010

Not sure when this got added, but you can now see the ip’s most accessing your app, and hopefully you can block someone from using up your quota.

http://code.google.com/appengine/kb/general.html#blacklists

Using django.contrib.sitemaps on AppEngine

May 17th, 2010

If you use Google AppEngine and want to use the sites and sitemaps contrib apps you can use this modified version of the google-app-engine-django helper here: http://code.google.com/p/dherbst-app-engine-django/wiki/Sitemaps

Setting up Flowplayer with Amazon Cloudfront and Token access

April 21st, 2010

Amazon has added token based access to the cloudfront rtmp servers here: http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?PrivateContent.html

This means you can put some control around who accesses your content.

Here is one way to set up flowplayer to use this:

<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.1.4.min.js"></script>
<div class="player" id="id_flowplayer" style="width:640px;height:320px;">
</div>
<script language='javascript'>
flowplayer("id_flowplayer", "http://releases.flowplayer.org/swf/flowplayer-3.1.5.swf", {
 log: { level:"debug",filter:'org.flowplayer.rtmp.*' },
 clip: {
   autoPlay:false,
   // This is the path to the video file
   url: encodeURIComponent('flv:test.mp4?Expires=1258237200&Signature=TBD&Key-Pair-Id=PK123456789754'),
   provider: 'aws'
 },
 // streaming plugins are configured under the plugins node
 plugins: {
   // here is our rtmp plugin configuration, configured for AWS
   aws: {
      url: 'http://releases.flowplayer.org/swf/flowplayer.rtmp-3.1.3.swf',
      // netConnectionUrl defines where the streams are found
      netConnectionUrl: 'rtmp://your aws hostname.cloudfront.net/cfx/st'
   }
 }
});
</script>

Android maps tip – tap on an address in gmail to open maps

April 10th, 2010

Here’s an interesting maps tip – when someone emails you an address, like 825 Walnut Street, Philadelphia, PA 19107-5195 (Walnut Street Theater) you can tap the address part in the gmail app and it will automatically open the google map application to that address.

Very handy, as it doesn’t underline the address like a link, so you don’t know you can tap the address unless you know the tip.

Does html5 video work in Android?

April 7th, 2010

In the interest of finding the right answer by posting (possibly) incorrect information, here goes.

Transcode an H.264 video to something that works great on the ipad/iphone: video: avc1, 29.97 fps, 380 kbps, 480 x 370 Audio: mp4a, 44 kHz, 64 kbps

Put together a page and view it on the iphone/ipad:


<!DOCTYPE html>
<html><head><title>html5 test</title></head><body>
<video id="movie" width="480" height="370" poster="http://example.com/still.jpg" controls>
<source src="http://example.com/video.mp4" type="video/mp4">
Your browser does not support html5 video.
</video>
</body></html>

View it on the iphone/ipad – wonderful html5 video plays.

View it on Android 1.6 – Nope.
View it on Android 2.1 – Nope.

When will Android support html5 video?

Update:
Found a message from Dan Morrill html5 video is not supported at this time in the browser.

postMessage doesn’t work in IE if you mix http and https

April 6th, 2010

What’s the point of implementing postMessage if you can’t communicate across http and https versions of your page?

http://msdn.microsoft.com/en-us/library/cc197015%28VS.85%29.aspx

Django forms remove : (colon) in label

March 12th, 2010

Django forms add a colon “:” to each label by default. You can turn this off by setting label_suffix="" when you create your form.

10+ releases a day takeaway

February 21st, 2010

I found this via the etsy “code as craft” blog: http://velocityconference.blip.tv/file/2284377/

My big takeaway is validation of something I have always done – code configuration by user/bucket/site is a “good thing”. It’s so much easier to roll out changes to a select population and deal with changes that way. Something I like to do using django groups. It is a sort of a/b testing, but just a little different. Very useful.

boxee app won’t load

February 20th, 2010

I’m very grateful there is a boxee.log file written, otherwise I would not have thought that boxee was going to try to load the main.xml~ instead of main.xml by default!

AppEngine Design Philosophy

February 13th, 2010

I suppose I knew in the back of my mind, you’re not going to need it now, but eventually you will need to shard this*. So if you’re going to do anything in appengine, my advice is: just shard everything from the start. You’ll save yourself a world of hurt later on.

http://code.google.com/appengine/articles/sharding_counters.html

* This could be anything, it needn’t be just counters.  Now the article is all about write contention, but it also demonstrates a very good approach to sharding data in the abstract.  Depending on what you’re doing this is a very useful thing to do.