About/Contact

Steve Trefethen

Steve Trefethen is CTO at Wanderful Media.
Contact me

View my LinkedIn profile



Calendar

<<  June 2013  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Disclaimer

The posts on this weblog are provided AS IS with no warranties, and confer no rights. The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.



Demo of Google’s Picker dialog

August 25 2011 10:47PM

Google Picker is:

a "File Open" dialog for the information stored in Google servers.

The only problem is the API docs, as of this writing, don’t have a link to a demo.

So here’s a demo of the Google Picker dialog.

 

FacebookDel.icio.usDigg It!

Tags:

Publishing Python unit test results in Jenkins

August 25 2011 10:39PM

When I switched to developing on an OS stack one of the first things I look for was a $g(Continuous Integration server) and settled on Hudson which, after some tumult with surrounding Oracle’s acquisition of Sun, was forked into Jenkins. Getting jenkins setup couldn’t be easier and the web UI is comprehensive and full of options.

My day-to-day development is in Python and I’ve written a bunch of tests based on the core unittest module though it doesn’t natively produce results that can be consumed by Jenkins. To that end, I searched around and found the necessary pieces which I wanted to capture.

First, you need to install the unittest-xml-reporting package which is described as:

PyUnit-based test runner with JUnit like XML reporting.

sudo easy_install unittest-xml-reporting

Once installed you need to add the following to your unittests so they will produce the necessary XML result output:

import xmlrunner

...

if __name__ == '__main__':
    unittest.main(testRunner=xmlrunner.XMLTestRunner(output='test-reports'))

Next, in Jenkins click the configure link for your project and check the Publish JUnit test result report and set the path to the output location for the unit tests. In my case the full path to the XML output is /.hudson/jobs/publishing/workspace/trunk/test/test-reports. In Jenkins the path to use for publishing is **/trunk/test/test-reports/*.xml

Jenkins JUnit publisher settings

This will also add a chart to the project page in Jenkins:

image

FacebookDel.icio.usDigg It!

OAuth 2.0 reference for Facebook development

August 18 2011 3:44PM

As I mentioned, I’m working on Facebook support which involves the transition to the new $g(OAuth 2) authentication. What I’m going to do here, for myself if no one else, is keep a list of links I’ve found related to the topic. Without further adieu:

Of course, feel free to leave a comment with anything useful you've found.

FacebookDel.icio.usDigg It!

Improving the Facebook Python SDK GraphAPI.request method

August 18 2011 2:31PM

While working on Facebook functionality using Python I ran into a few cases where the GraphAPI.request method caused Facebook to choke on parameters with a value of None. Thus here’s a simple override to allow for None parameters which subsequently get stripped out.

def request(self, path, args=None, post_args=None):
    ''' Improves handling for post_args where any arg with a None value gets removed to avoid FB API errors.
        Allows for methods that accept all possible Facebook parameters and only passes those that are specified.
    '''
    if post_args:
        d = {}
        for a in post_args:
            if post_args[a] != None:
                d.setdefault(a, post_args[a])
        post_args = d
    return GraphAPI.request(self, path, args, post_args)

I’ve created a descendant class I call GraphAPIEx where this above method appears.

FacebookDel.icio.usDigg It!

Removing rounded corners on jQueryUI elements

August 01 2011 4:23PM

I had this question today and it turns out the answer is pretty simple

  1. First, it’s important to note that as of this writing IE 8 (what I tested) doesn’t render rounded corners as implemented in jQueryUI v1.8.14 though I understand there is a plugin that enables that feature.
  2. To remove rounded corners on all elements of jQueryUI (for Chrome, FF and Safari) you can include the following in your own CSS:
    .ui-corner-all { border-radius: 0px; -moz-border-radius-bottomright: 0px; -moz-border-radius-bottomleft: 0px; -moz-border-radius-topright: 0px; -moz-border-radius-topleft: 0px;}
    }

Now, credit where credit is due.

FacebookDel.icio.usDigg It!

Tags: , HTML | jQuery

How to Connect a Nintendo Wii to a Samsung LED Flat Panel TV

July 16 2011 9:56AM

We have a Samsung flat panel TV which hangs from the wall like a picture frame so it’s pretty difficult to read the back of the TV when I need to change connections. We don’t always have the Wii connected to this TV so I move the Wii and have to reconnect it using a 5 plug component cable. I seem to always forget the order of the plugs therefore I can’t easily reconnect it without visual access to the back of the TV. Google returned several bogus hits for this question so I snapped a picture with my cell phone (which was immediately uploaded to Picasa via G+, very cool) so here it is:

Picture of Wii component plugs on a Samsung LED Flat Panel TV

From left to right the plugs are red and white audio and red, blue, and green video. I’m sure there’s a great reason why the far right plug is green and not yellow but there you go.

Here’s a Google search to get you started $g(green vs yellow video plug).

Now, I only have to remember I wrote a blog post to recall the order of the connections.

FacebookDel.icio.usDigg It!

Microsoft kills Windows Live Mesh

July 11 2011 5:59PM

Microsoft finally put a bullet in the head of Windows Live Mesh which was really a mess from the beginning. I suppose it was a good thing they never took the "beta" label off. :-)

Dear Live Mesh beta participant,

You're receiving this message because you used the Live Mesh beta from Microsoft. On March 31, 2011, the beta of Live Mesh will end, and the Live Mesh beta will stop working. After March 31, you won't be able to access any files stored online in your Live Desktop or connect to your PCs remotely using the Live Mesh software. Microsoft will not be able to help you retrieve any files you have stored online after this date. Your files will also stop syncing between your computers and your Live Mesh online storage. Please read below for actions we recommend you take.

 

FacebookDel.icio.usDigg It!

Tags: Windows