Nathan

Nathan

Nathan Zorn  //  Surfer and software developer.
http://github.com/thepug

Sep 4 / 5:41am

Katia

This one looks like a wave generator with no landfall.

 

http://www.nhc.noaa.gov/graphics_at2.shtml?5-daynl#contents

084714w5_nl_sm

Jul 30 / 4:55am

Gotta get back in shape for potential storm waves!

This storm is far away, but the projected tracks look like it will be headed towards the east coast.  I just want to be in shape if this thing generates waves!

http://www.nhc.noaa.gov/gtwo/gtwo_atl_sub.shtml?area1#contents

 

Jun 16 / 12:00pm

Finally home!

After removing my appendix and a laporatomy, I an out of the hospital!

Posted from Mt Pleasant, SC

Jun 14 / 5:01am

Out of the hospital in three days!

For those that didn't know. Appendecitis, followed by complications has had me here since the 3rd. I'll be out soon!

Thanks for the get well wishes from everyone!

Posted from Mt Pleasant, SC

Mar 3 / 9:14am

Jamaica?

P88

Close to the real place.

Posted from Greenville, SC

Jan 12 / 2:21pm

Strophe vcard plugin and drawing vcards using the HTML canvas element.

In my attempts to make http://speeqe.com an all javascript application, minus the django, I have been looking for ways to get rid of the avatar service speeqe provides. The avatar service simply takes the result from an XMPP vcard request and stores the image so that you can access it via a URL.  This can now be done all in the browser.  This post will give an example of how to use the StropheJS Vcard plugin and draw the result to an HTML canvas element.

You will need to download StropheJS and the StropheJS plugins.

https://github.com/metajack/strophejs

https://github.com/thepug/strophejs-plugins

First the HTML for our simple example:

https://github.com/thepug/strophejs-plugins/blob/master/vcard/examples/index....

The Javascript:

After asking for the vcard with the plugin, the result will be returned. This example uses jQuery to find the BINVAL element and the TYPE element. These elements contain the information needed to build your Image object with a data:url. After building the data url, the Image object is built. A callback for the onload event will use drawImage to display the resulting avatar.

https://github.com/thepug/strophejs-plugins/blob/master/vcard/examples/stroph...

// The important part. See the above url for the entire javascript bit.
$(function() {//StropheVcard defined above.
    StropheVcard.init();
    StropheVcard.connect(function() {
        StropheVcard.get(function(stanza) {
           //stanza is an xml element and jQuery can be used to find needed elements.
            var $vCard = $(stanza).find("vCard");
            var img = $vCard.find('BINVAL').text();
            var type = $vCard.find('TYPE').text();
            // Build the data:url
            var img_src = 'data:'+type+';base64,'+img;
            // find our canvas
            var ctx = $('#example').get(0).getContext('2d');
            var img = new Image();   // Create new Image object
            img.onload = function(){
                // execute drawImage statements here
                ctx.drawImage(img,0,0)
            }
            img.src = img_src;
        },
                         "thepug@speeqe.com");
    });
    StropheVcard.disconnect();
});

 

Dec 26 / 6:07am

....and more snow

(download)

Posted from Pickens, SC

Dec 26 / 6:02am

More snow pictures.

(download)

Posted from Pickens, SC

Dec 8 / 6:46am

Sharing music with Speeqe

A while back I found this cool jquery plugin that plays both ogg and mp3 files, http://www.happyworm.com/jquery/jplayer. Speeqe already had the ability to play mp3 files in the chat room, but I thought it would be cool to add a playlist for all music files in a chat room.  Speeqe now uses the jplayer plugin to manage such a playlist. To try it out simply go to a speeqe room, http://ogg.speeqe.com, and post a url of the music you want to share.

Speeqeoggplayer

I am currently in the middle of a rewrite of the Speeqe javascript client.  It will use backbone.js and should be a lot easier to add features like this jplayer.  The next feature is to allow github.com links to be expanded and viewed nicely in a chat room.

If you are interested in contributing to Speeqe, the code is on github.

http://github.com/thepug/Speeqe