ZNAG - Browsing Github

  1. Host Automatic updatable Air applications on Github

    For the impatient, check out the demo | source..

    Intro

    Creating desktop applications in Air with html and JavaScript is a joy for any web oriented developer.
    You get the same environment to work in, jQuery included, and the ability to create desktop based applications fast.
    The only thing problem you encounter is the switch in concept of updating the desktop application with a new version.
    It’s no longer as easy as updating the site, you need to get the user to download the update..

    The good news is that Adobe has made it really easy to set up a workflow where the application automatically updates itself.
    All you need is a web site to host the updated versions, a small xml describing the version, and Air takes care of the rest.

    There are some nice Tutorials available, and the documentation is fairly good.
    You customize the update interface, localize and hook into almost every step in the update process.

    However, for open source applications, affording a web site might be a bit out of the budget.

    Here Github steps in to offer not only an affordable (free), but also reliable, fast and easy to manage solution.

    What better way than to simply push the changes using git to Github?

     
    So how is it done?

    If you’re not a Github member, do join, it’s free and it’s great!

    Download/Clone/Fork the example project

    Open the directory updater and notice the following xml files:

    config.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration xmlns="http://ns.adobe.com/air/framework/update/configuration/1.0">
    <url>http://github.com/erikzaadi/AirOnGithub/raw/master/updater/update.xml</url>
    <delay>2</delay>
    </configuration>

    update.xml

    <?xml version="1.0" encoding="utf-8"?>
    <update xmlns="http://ns.adobe.com/air/framework/update/description/1.0">
    <version>2.0</version>
    <url>http://github.com/downloads/erikzaadi/AirOnGithub/AirOnGithub-2.0.air</url>
    <description><![CDATA[
    This would be a good place to put release notes etc
      ]]>
    </description>
    </update>

    The Air updater framework will open up the config.xml file in order to to get the url of update.xml, which includes version, description and most important, the url to the updated Air file.

    Whenever the framework recognizes that a new version is available, it’ll launch the updating process, downloading and applying the update.

    Since Github are kind enough to expose such a wonderful api on their site, you can access the update.xml either on the master branch as I did, or on a special branch/tag preserved for the update mechanism.
    Furthermore, Github allows you to upload files to the download section, served by the cloud to ensure superfast speed.

    If you want, you can even add a installer badge using Github Pages.
    (Sample not included in the example mentioned before, see demo | source for the jQAPI project as reference)

     

    Example Air file | Example Source

    Enjoy!

    Erik

    Tags: Github, Air


  2. jQAPI Air Application

    For the last year and a half I've been heavily exposed to a lot of open source software.
    It started out with a small conversation mentioning jQuery (Thanks Tim!), and since then I've been amazed by the open source community.

    The great thing about open source is that you can pay back to the people that created software that you like (Yes, the price is also nice, of course).

    I've been using jQAPI by Sebastian Senf (@mustardamus), which is an alternative (and in my personal opinion better) documentation for the jQuery API framework.

    Before that, I used the jQuery API Browser, which is also great, and provides a downloadable air file for offline browsing of the API.
    However, it's not been updated to 1.4.2, and lacks that kind of special touch that jQAPI has.

    So, after a couple of times of using jQAPI, I thought, heck, I know Air, I'll spend a couple of minutes hacking together a small air wrapper for jQAPI..

    Here are the results..

    Unfortunately, embedding the air installation badge in the post would have most likely to ruin any rss/atom subscriber reading this post, so we'll have to do with the link :)

    @mustardamus has been kind enough to both accept my fork changes, and to include both credits and a link at jQAPI(Thanks!).

    The source is at http://github.com/erikzaadi/jQAPI

     

    Enjoy!

    Erik

    Tags: jQuery, Github, jQAPI


  3. Working with Github from within a company firewall

    Most companies with somewhat restricted firewall rules typically enables only web traffic using port 80 or 443 (for SSL).

    Git is communicating with Github using port 22 (or the default 9418), which in my own case was blocked after a while.

     

    To keep "gittin" from work there are some options.

    1. Work with pure http access (port 80) git clone http://github.com/username/repository.git
      This will only give you read only access and is rather slow
    2. Use githubs public server ssh.github.com, which works via port 443 git clone ssh://git@ssh.github.com:443/username/repository.git

    I use the second one, and it works great, haven't seen any speed tolls so far.

     

    Reference : http://returnbooleantrue.blogspot.com/2009/06/using-github-through-draconian-proxies.html

     

    Cheers,

    Erik

    Tags: Github


  4. Update - jQuery Print Element Plugin version 1.0 Released

    Thanks to John and David for their contribution and valuable input.

    Version 1.0 has no new groundbreaking features, mostly bug fixes (see changelog).

    There’s a new documentation page explaining the available options, and a new sample page as well.

    As always, any feedback will be much appreciated, either as comments here at the blog,  as an issue at the issues section,  or a bug report at the official jQuery plugin page.

    Enjoy,

    Erik

    Tags: Github, jQuery Plugins, jQuery


  5. Github Project Pages

    Prelude (skip)

    About two weeks ago I found out about an amazing free service that github has called github pages.
    This service allows you to host a static web site per public project you have on github, in addition to a site for your account (E.g. http://accountname.github.com).

    Besides having wizards that create the site for you (although I haven’t used that yet), github offers another very nice feature:
    Github automatically process submits to the site via Jekyll, which is a simple yet amazingly efficient static site/blog creator.

    Jekyll allows you to create templates based with variables written in YAML, and using Liquid to parse the templates, enabling you to write logic such as conditions and loops, making the static site more flexible and somewhat dynamic.

    All you need to do is to commit to a project branch called gh-pages.
    In case it’s the main account site, you simply push to the master branch of a project called accountname.github.com.

    Being a curios person that I am, this was perfect for me,
    Creating my own project pages was a great excuse for me to learn new skills such as ruby, YAML and Liquid.

    here are the results:

    http://erikzaadi.github.com 

    I’m posting my public projects on the site, which BTW, you can see on the github badge on the right on this blog, which is a part of http://erikzaadi.github.com/jQueryPlugins that also includes the Print Element Plugin I posted about before.

    The Wiki and Issues sections will remain at the regular github pages, but samples, download pages and posts regarding project updates will be done on the new site.

    The layout is not yet final, but any feedback would still be greatly appreciated.
    The site includes a small ode to jQuery , in form of a jQuery UI Theme switcher that you may notice on the top left part.

    As a small side note, it’s amazing how easy it is to use the jQuery themes once you understand their genial simplicity.
    By following a small set of rules (explained here), you can create a site that’s fully theme-able and flexible for design changes.
    But that’s material for another post..

    Enjoy,

    Erik

    Tags: Github, General, Personal, jQuery Plugins, jQuery