SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
Scrippets
What they are and how they work
Code Snippets
                            Pieces of re-usable code



<body>
  <div id="page-wrap">
    <!-- general HTML here -->
  </div>
</body>

                                          HTML         SQL
     Centered Webpage


#page-wrap {
     width: 800px;
     margin: 0 auto;
}

                                            CSS        …
Snippets App
  Code manager for Mac OS X
Snippets App
                           Supported features




✓   Syntax highlighting
✓   Smart groups
✓   Folders
✓   Labels
✓   Quick search
✓   Menu bar integration
What do we want to do with
           snippets?

• Collect           • Search
• Edit              • Sync
• Manage            • Export
• Copy              • Import
• Paste             • Share
Snippets App
                        We’re almost there

✓    Collect                                    ✓    Search
✓    Edit                                       ✓    Sync
✓    Manage                                     • Export
✓    Copy                                       • Import
✓    Paste                                      ✗    Share

✓   Fully Implemented    •   Partially implemented   ✗   Not implemented
Export
✓   Source code
✓   PDF
✓   RTF
✓   HTML*
✓   HTML+CSS*


            ✓    * — in development
Export
✓   Source code               ✗       XML



                                             ?
✓   PDF                       ✗       ZIP
✓   RTF                       ✗       FTP
✓   HTML*                     ✗       Web
✓   HTML+CSS*                 ✗       etc.


            ✓    * — in development
Import
✓   Pasteboard
✓   Selection
✓   File system
✓   iDisk
Import
✓   Pasteboard    ✗   XML



                             ?
✓   Selection     ✗   ZIP
✓   File system   ✗   FTP
✓   iDisk         ✗   Web
                  ✗   etc.
Share
     So many services all over the place:

    Pastie               Lodge It                 Paste2
DZone Snippets          Snipt.org                  Gist
  Snipt.net             GnoPaste                  Snipplr
 Pastebin.ca              Droplr                 TinyPaste
 Pastebin.com               YFS*                    …


                 ✓   * — your favorite service
Conclusion

It’s almost impossible to
  cover all use cases by
 standalone features…
Problem
   Here’s the challenge we’re facing




 How to implement
 advanced Export,
Import and Sharing?
Fact
Export, Import and Sharing have
    something in common
Fact
Export, Import and Sharing have
    something in common



 These are custom operations
         on snippets
Solution
     Offered by the Snippets App




 Provide a platform to
run custom operations
 on selected snippets!
Example
                    How to share via Snipplr



1 Select snippets
Example
                          How to share via Snipplr



1 Select snippets   2 Enter API Key


                                        User-speci c string provided by the Snipplr
                                         service to allow authorized API-requests


                    827364827301
Example
                          How to share via Snipplr



1 Select snippets   2 Enter API Key     3 Upload snippets




                    827364827301              Script
Example
                          How to share via Snipplr



1 Select snippets   2 Enter API Key     3 Upload snippets   4 Display links


                                                             snipplr.com/?id=1
                                                             snipplr.com/?id=2
                                                             snipplr.com/?id=3
                                                             snipplr.com/?id=4
                    827364827301              Script
Example
                          How to share via Snipplr



1 Select snippets   2 Enter API Key     3 Upload snippets   4 Display links


                                                             snipplr.com/?id=1
                                                             snipplr.com/?id=2
                                                             snipplr.com/?id=3
                                                             snipplr.com/?id=4
                    827364827301              Script




                                      Custom operations
Example
                          How to share via Snipplr



1 Select snippets   2 Enter API Key     3 Upload snippets   4 Display links


                                                             snipplr.com/?id=1
                                                             snipplr.com/?id=2
                                                             snipplr.com/?id=3
                                                             snipplr.com/?id=4
                    827364827301              Script


                         HTML                  Ruby             HTML
                      +JavaScript           (Perl, Bash,     +JavaScript
                         +CSS                 Python)           +CSS


                                      Custom operations
Example
                          How to share via Snipplr



1 Select snippets   2 Enter API Key     3 Upload snippets   4 Display links


                     input.html             uploader.rb      output.html
                       Step 1:                Step 2:          Step 3:
                    Authorization           Uploading          Result




                                        Custom Steps
Snippets App
Provides a mechanism to run any number of steps as…




 input.html         uploader.rb          output.html
   Step 1:            Step 2:              Step 3:
Authorization       Uploading              Result




                Scrippet
Scrippet
                  Collection of scripts and resources




<html lang="en">             require 'net/http'          <html lang="en">
<head>                       require 'uri'               <head>
!       <meta http-                                      !       <meta http-
equiv="Content-Type"         snipplr_url =               equiv="Content-Type"


                       +                             +
content="text/html;          Net::HTTP.post_form         content="text/html;
charset=utf-8">              (url,                       charset=utf-8">
</head>                      parameters).body.matc       </head>
<body>                       h(/href="([^"]+)"/)        <body>
    <input></input>          [1]                             <div></div>
</body>                      snipplr_url =               </body>
</html>                      snipplr_url.gsub…           </html>



    input.html                  uploader.rb                output.html




                Scripts + Resources = Scrippet
Scrippet
     Can be developed to automate
       almost any task you want



✓   Export             ✓   Tweet
✓   Import             ✓   Transform
✓   Share              ✓   Evaluate
✓   Backup             ✓   Run
Scrippet
                                             Includes property list describing
                                                   all steps to perform




                                                         </>                              </>
<Scrippet>
    <Name>Share via Snipplr.com</Name>
    <Icon>snipplr.png</Icon>
    <Steps>
        <Step>
             <Name>Security Options</Name>
             <Source>input.html</Source>
        </Step>
        <Step>
             <Name>Uploading…</Name>                     input.html        uploader.rb   output.html
             <Source>uploader.rb</Source>
        </Step>
        <Step>
             <Name>Result</Name>
             <Source>output.html</Source>


                                                                            Aa
        </Step>
    </Steps>
</Scrippet>
                                                                                             S
                info.plist

                                                         scrippet.js       default.css   snipplr.png
Scrippet
       Is a folder with .scrippet extension


Snipplr.scrippet                 root of the package
  / Contents
     info.plist                  property list
     / Resources
         / input.html            UI for the 1st step
         / uploader.rb           script for the 2nd step
         / output.html           UI for the 3rd step
         / scrippet.js           scrippet APIs
         / default.css           CSS styles
         / snipplr.png           icon image
Scrippets
                     Are recognized by Mac OS X as Bundles




Snipplr     Pastie




Snipt.org    …
Scrippets
         Can be installed and executed by the Snippets App




Pastie
Scrippets
              You can develop them




Developers
Scrippets
             Easy to share over the internet




Developers              Internet
Scrippets
              Everyone can use them




Developers          Internet          Happy users
What’s Next


  Developers                         Internet                          Happy users

Easy & powerful                 Public scrippet                    Pastie, Snipplr,
  APIs will be                  database is in                   Snipt.org scrippets
published soon                  development*                     are available now;
                                                                more in development



         ✓   * — all scrippets will be tested for security before publishing
Summary
✓   Snippets application is a cool code
    manager for Mac OS X
✓   Now we have universal solution for
    extending its functionality
✓   Scrippets let you create powerful
    custom scenarios
✓   Everybody can develop and use
    them
www.snippetsapp.com




     @snippetsapp

Contenu connexe

Similaire à Scrippets — the way to refine Snippets Application

Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
bartzon
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
Fabien Potencier
 
Move out from AppEngine, and Python PaaS alternatives
Move out from AppEngine, and Python PaaS alternativesMove out from AppEngine, and Python PaaS alternatives
Move out from AppEngine, and Python PaaS alternatives
tzang ms
 

Similaire à Scrippets — the way to refine Snippets Application (20)

Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
Angular 2 overview in 60 minutes
Angular 2 overview in 60 minutesAngular 2 overview in 60 minutes
Angular 2 overview in 60 minutes
 
Titanium Alloy Tutorial
Titanium Alloy TutorialTitanium Alloy Tutorial
Titanium Alloy Tutorial
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 
Scrapy
ScrapyScrapy
Scrapy
 
Lift talk
Lift talkLift talk
Lift talk
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Useful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvmUseful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvm
 
Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
 
國民雲端架構 Django + GAE
國民雲端架構 Django + GAE國民雲端架構 Django + GAE
國民雲端架構 Django + GAE
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?
 
Motion Django Meetup
Motion Django MeetupMotion Django Meetup
Motion Django Meetup
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
Move out from AppEngine, and Python PaaS alternatives
Move out from AppEngine, and Python PaaS alternativesMove out from AppEngine, and Python PaaS alternatives
Move out from AppEngine, and Python PaaS alternatives
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 

Dernier

Dernier (20)

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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
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...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 

Scrippets — the way to refine Snippets Application

  • 1. Scrippets What they are and how they work
  • 2. Code Snippets Pieces of re-usable code <body> <div id="page-wrap"> <!-- general HTML here --> </div> </body> HTML SQL Centered Webpage #page-wrap { width: 800px; margin: 0 auto; } CSS …
  • 3. Snippets App Code manager for Mac OS X
  • 4. Snippets App Supported features ✓ Syntax highlighting ✓ Smart groups ✓ Folders ✓ Labels ✓ Quick search ✓ Menu bar integration
  • 5. What do we want to do with snippets? • Collect • Search • Edit • Sync • Manage • Export • Copy • Import • Paste • Share
  • 6. Snippets App We’re almost there ✓ Collect ✓ Search ✓ Edit ✓ Sync ✓ Manage • Export ✓ Copy • Import ✓ Paste ✗ Share ✓ Fully Implemented • Partially implemented ✗ Not implemented
  • 7. Export ✓ Source code ✓ PDF ✓ RTF ✓ HTML* ✓ HTML+CSS* ✓ * — in development
  • 8. Export ✓ Source code ✗ XML ? ✓ PDF ✗ ZIP ✓ RTF ✗ FTP ✓ HTML* ✗ Web ✓ HTML+CSS* ✗ etc. ✓ * — in development
  • 9. Import ✓ Pasteboard ✓ Selection ✓ File system ✓ iDisk
  • 10. Import ✓ Pasteboard ✗ XML ? ✓ Selection ✗ ZIP ✓ File system ✗ FTP ✓ iDisk ✗ Web ✗ etc.
  • 11. Share So many services all over the place: Pastie Lodge It Paste2 DZone Snippets Snipt.org Gist Snipt.net GnoPaste Snipplr Pastebin.ca Droplr TinyPaste Pastebin.com YFS* … ✓ * — your favorite service
  • 12. Conclusion It’s almost impossible to cover all use cases by standalone features…
  • 13. Problem Here’s the challenge we’re facing How to implement advanced Export, Import and Sharing?
  • 14. Fact Export, Import and Sharing have something in common
  • 15. Fact Export, Import and Sharing have something in common These are custom operations on snippets
  • 16. Solution Offered by the Snippets App Provide a platform to run custom operations on selected snippets!
  • 17. Example How to share via Snipplr 1 Select snippets
  • 18. Example How to share via Snipplr 1 Select snippets 2 Enter API Key User-speci c string provided by the Snipplr service to allow authorized API-requests 827364827301
  • 19. Example How to share via Snipplr 1 Select snippets 2 Enter API Key 3 Upload snippets 827364827301 Script
  • 20. Example How to share via Snipplr 1 Select snippets 2 Enter API Key 3 Upload snippets 4 Display links snipplr.com/?id=1 snipplr.com/?id=2 snipplr.com/?id=3 snipplr.com/?id=4 827364827301 Script
  • 21. Example How to share via Snipplr 1 Select snippets 2 Enter API Key 3 Upload snippets 4 Display links snipplr.com/?id=1 snipplr.com/?id=2 snipplr.com/?id=3 snipplr.com/?id=4 827364827301 Script Custom operations
  • 22. Example How to share via Snipplr 1 Select snippets 2 Enter API Key 3 Upload snippets 4 Display links snipplr.com/?id=1 snipplr.com/?id=2 snipplr.com/?id=3 snipplr.com/?id=4 827364827301 Script HTML Ruby HTML +JavaScript (Perl, Bash, +JavaScript +CSS Python) +CSS Custom operations
  • 23. Example How to share via Snipplr 1 Select snippets 2 Enter API Key 3 Upload snippets 4 Display links input.html uploader.rb output.html Step 1: Step 2: Step 3: Authorization Uploading Result Custom Steps
  • 24. Snippets App Provides a mechanism to run any number of steps as… input.html uploader.rb output.html Step 1: Step 2: Step 3: Authorization Uploading Result Scrippet
  • 25. Scrippet Collection of scripts and resources <html lang="en"> require 'net/http' <html lang="en"> <head> require 'uri' <head> ! <meta http- ! <meta http- equiv="Content-Type" snipplr_url = equiv="Content-Type" + + content="text/html; Net::HTTP.post_form content="text/html; charset=utf-8"> (url, charset=utf-8"> </head> parameters).body.matc </head> <body> h(/href="([^"]+)"/) <body> <input></input> [1] <div></div> </body> snipplr_url = </body> </html> snipplr_url.gsub… </html> input.html uploader.rb output.html Scripts + Resources = Scrippet
  • 26. Scrippet Can be developed to automate almost any task you want ✓ Export ✓ Tweet ✓ Import ✓ Transform ✓ Share ✓ Evaluate ✓ Backup ✓ Run
  • 27. Scrippet Includes property list describing all steps to perform </> </> <Scrippet> <Name>Share via Snipplr.com</Name> <Icon>snipplr.png</Icon> <Steps> <Step> <Name>Security Options</Name> <Source>input.html</Source> </Step> <Step> <Name>Uploading…</Name> input.html uploader.rb output.html <Source>uploader.rb</Source> </Step> <Step> <Name>Result</Name> <Source>output.html</Source> Aa </Step> </Steps> </Scrippet> S info.plist scrippet.js default.css snipplr.png
  • 28. Scrippet Is a folder with .scrippet extension Snipplr.scrippet root of the package / Contents info.plist property list / Resources / input.html UI for the 1st step / uploader.rb script for the 2nd step / output.html UI for the 3rd step / scrippet.js scrippet APIs / default.css CSS styles / snipplr.png icon image
  • 29. Scrippets Are recognized by Mac OS X as Bundles Snipplr Pastie Snipt.org …
  • 30. Scrippets Can be installed and executed by the Snippets App Pastie
  • 31. Scrippets You can develop them Developers
  • 32. Scrippets Easy to share over the internet Developers Internet
  • 33. Scrippets Everyone can use them Developers Internet Happy users
  • 34. What’s Next Developers Internet Happy users Easy & powerful Public scrippet Pastie, Snipplr, APIs will be database is in Snipt.org scrippets published soon development* are available now; more in development ✓ * — all scrippets will be tested for security before publishing
  • 35. Summary ✓ Snippets application is a cool code manager for Mac OS X ✓ Now we have universal solution for extending its functionality ✓ Scrippets let you create powerful custom scenarios ✓ Everybody can develop and use them
  • 36. www.snippetsapp.com @snippetsapp