SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
How to display Fiddle
                      from Gist
                               Created by:

                        Mehran Mozaffari @imehr




Saturday, 3 March 12
How to display Fiddle
                      from Gist

Saturday, 3 March 12
How to display Fiddle
                      from Gist


Saturday, 3 March 12
The goal
                       Creating a fiddle on the fly and fill it with
                       some demo codes from a gist and be
                       able to try the code with all library
                       dependencies on Jsfiddle.net.

Saturday, 3 March 12
A multi files gist, hosted on gist.github.com




                           STEP 1




Saturday, 3 March 12
Just enter a URL with a very basic api



                       STEP 2




                                       and then...


Saturday, 3 March 12
You will get a fresh new
    fiddle filled up with all
    codes, coming directly
    from that gist and ready
    to try in Jsfiddle.

                          STEP 3




Saturday, 3 March 12
Go to gist.github.com and create a new gist.




Saturday, 3 March 12
Go to gist.github.com and create a new gist.


       This description
       field can be
       anything to
       explain what this
       gist is all about.




Saturday, 3 March 12
Go to gist.github.com and create a new gist.



                                                 The file names
                                                 in this gist are
                                                 important to
                                                 follow a specific
                                                 pattern.




Saturday, 3 March 12
Go to gist.github.com and create a new gist.


                                                 Allowed file names
                                                  • fiddle.js
                                                  • fiddle.html
                                                  • fiddle.css
                                                  • fiddle.manifest
                                                  • fiddle.response.html




Saturday, 3 March 12
Got to gist.github.com and create a new gist.

                           HTML              CSS
                                                      Allowed file names
                                                       • fiddle.js
             INFO AND                                  • fiddle.html
             RESOURCES
                                                       • fiddle.css
                         JAVASCRIPT                    • fiddle.manifest
                                        AJAX
                                        RESPONSE /
                                                       • fiddle.response.html
                                        PAGE RENDER




Saturday, 3 March 12
Got to gist.github.com and create a new gist.


                                                Allowed file names



        Write your CSS
        code here. This
        code will be
        used in CSS
        pane inside the
        fiddle later on.

Saturday, 3 March 12
Got to gist.github.com and create a new gist.



                                           Click here and
                                           add another file
                                           to your gist and
                                           name it
                                           fiddle.html.




Saturday, 3 March 12
Got to gist.github.com and create a new gist.




       This code will
       show up under
       HTML pane
       inside the fiddle.



Saturday, 3 March 12
Got to gist.github.com and create a new gist.
                                                  Add another file
                                                  to this gist and
                                                  name it fiddle.js
                                                  and write all you
                                                  JS codes here.
                                                  This code will
                                                  show up under
                                                  Javascript pane
                                                  in fiddle.




Saturday, 3 March 12
Got to gist.github.com and create a new gist.



        This would be
        your JS code in
        fiddle.




Saturday, 3 March 12
Got to gist.github.com and create a new gist.


        fiddle.manifest
        is a description of
        the gist written in
        YAML, the structure
        is compatible with
        the MooTools doc.




Saturday, 3 March 12
Got to gist.github.com and create a new gist.


                                                      fiddle.manifest
                                                      is a description of
                                                      the gist written in
                                                      YAML.
                                                      The content of this
                                                      manifest will show
                                                      up under info tab in
                                                      the fiddle.




Saturday, 3 March 12
Got to gist.github.com and create a new gist.
                                               fiddle.manifest (in YAML format)

                                               name: the title of this code or app
                                               description: description about this code
                                               authors:
                                                 - author 1
                                                 - author 2
                                                 - ...
                                               resources:
                                                 - http://....link to a js file
                                                 - http:// ... link to a css file
                                                 - ...
                                               normalize_css: yes / no




Saturday, 3 March 12
Making the fiddle URL
         After creating a new gist with multiple files, you can easily run it inside a fiddle by using the following api. Just
         enter the URL with the following pattern in your browser and all those files inside the gist will come together in
         one fiddle.




                                                          http://jsfiddle.net/gh/gist/mootools/1.2/606699/

                 http://jsfiddle.net/gh/gist/{framework}/{version}/{gist_id}/




Saturday, 3 March 12
The fiddle URL with extra option
         You can add an extra option to indicate all dependencies related to this gist codes. In order to indicate those
         dependencies use a comma separated list of those dependencies as the following format:




                                http://jsfiddle.net/gh/gist/jquery/1.4.4/dependencies/lint,ui/606699/
                 http://jsfiddle.net/gh/gist/{framework}/{version}/dependencies/{dependencies_list}/{gist_id}/




Saturday, 3 March 12
How to display Fiddle from Gist




Saturday, 3 March 12
How to display Fiddle from Gist




Saturday, 3 March 12
Resources
          http://jsfiddle.net/
          http://doc.jsfiddle.net/
          https://github.com/jsfiddle/jsfiddle-docs-alpha/blob/master/docs/use/gist_read.rst

          https://gist.github.com/606699/
          http://jsfiddle.net/gh/gist/mootools/1.2/606699/


          Created by:
          Mehran Mozaffari @imehr http://mehrjs.com
Saturday, 3 March 12

Contenu connexe

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

En vedette

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

En vedette (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

How to display_fiddle_from_gist

  • 1. How to display Fiddle from Gist Created by: Mehran Mozaffari @imehr Saturday, 3 March 12
  • 2. How to display Fiddle from Gist Saturday, 3 March 12
  • 3. How to display Fiddle from Gist Saturday, 3 March 12
  • 4. The goal Creating a fiddle on the fly and fill it with some demo codes from a gist and be able to try the code with all library dependencies on Jsfiddle.net. Saturday, 3 March 12
  • 5. A multi files gist, hosted on gist.github.com STEP 1 Saturday, 3 March 12
  • 6. Just enter a URL with a very basic api STEP 2 and then... Saturday, 3 March 12
  • 7. You will get a fresh new fiddle filled up with all codes, coming directly from that gist and ready to try in Jsfiddle. STEP 3 Saturday, 3 March 12
  • 8. Go to gist.github.com and create a new gist. Saturday, 3 March 12
  • 9. Go to gist.github.com and create a new gist. This description field can be anything to explain what this gist is all about. Saturday, 3 March 12
  • 10. Go to gist.github.com and create a new gist. The file names in this gist are important to follow a specific pattern. Saturday, 3 March 12
  • 11. Go to gist.github.com and create a new gist. Allowed file names • fiddle.js • fiddle.html • fiddle.css • fiddle.manifest • fiddle.response.html Saturday, 3 March 12
  • 12. Got to gist.github.com and create a new gist. HTML CSS Allowed file names • fiddle.js INFO AND • fiddle.html RESOURCES • fiddle.css JAVASCRIPT • fiddle.manifest AJAX RESPONSE / • fiddle.response.html PAGE RENDER Saturday, 3 March 12
  • 13. Got to gist.github.com and create a new gist. Allowed file names Write your CSS code here. This code will be used in CSS pane inside the fiddle later on. Saturday, 3 March 12
  • 14. Got to gist.github.com and create a new gist. Click here and add another file to your gist and name it fiddle.html. Saturday, 3 March 12
  • 15. Got to gist.github.com and create a new gist. This code will show up under HTML pane inside the fiddle. Saturday, 3 March 12
  • 16. Got to gist.github.com and create a new gist. Add another file to this gist and name it fiddle.js and write all you JS codes here. This code will show up under Javascript pane in fiddle. Saturday, 3 March 12
  • 17. Got to gist.github.com and create a new gist. This would be your JS code in fiddle. Saturday, 3 March 12
  • 18. Got to gist.github.com and create a new gist. fiddle.manifest is a description of the gist written in YAML, the structure is compatible with the MooTools doc. Saturday, 3 March 12
  • 19. Got to gist.github.com and create a new gist. fiddle.manifest is a description of the gist written in YAML. The content of this manifest will show up under info tab in the fiddle. Saturday, 3 March 12
  • 20. Got to gist.github.com and create a new gist. fiddle.manifest (in YAML format) name: the title of this code or app description: description about this code authors: - author 1 - author 2 - ... resources: - http://....link to a js file - http:// ... link to a css file - ... normalize_css: yes / no Saturday, 3 March 12
  • 21. Making the fiddle URL After creating a new gist with multiple files, you can easily run it inside a fiddle by using the following api. Just enter the URL with the following pattern in your browser and all those files inside the gist will come together in one fiddle. http://jsfiddle.net/gh/gist/mootools/1.2/606699/ http://jsfiddle.net/gh/gist/{framework}/{version}/{gist_id}/ Saturday, 3 March 12
  • 22. The fiddle URL with extra option You can add an extra option to indicate all dependencies related to this gist codes. In order to indicate those dependencies use a comma separated list of those dependencies as the following format: http://jsfiddle.net/gh/gist/jquery/1.4.4/dependencies/lint,ui/606699/ http://jsfiddle.net/gh/gist/{framework}/{version}/dependencies/{dependencies_list}/{gist_id}/ Saturday, 3 March 12
  • 23. How to display Fiddle from Gist Saturday, 3 March 12
  • 24. How to display Fiddle from Gist Saturday, 3 March 12
  • 25. Resources http://jsfiddle.net/ http://doc.jsfiddle.net/ https://github.com/jsfiddle/jsfiddle-docs-alpha/blob/master/docs/use/gist_read.rst https://gist.github.com/606699/ http://jsfiddle.net/gh/gist/mootools/1.2/606699/ Created by: Mehran Mozaffari @imehr http://mehrjs.com Saturday, 3 March 12