SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
MISC
Hello my name is

  Michael Grosser



 Rathershort.com
I18nData

    Language – select



    Country – select





    Rails default = Full name = madness!

I18nData

    185 Language codes (iso 639 - 2 letter)


    in 66 Languages
    246 Country codes (iso 3166 - 2 letter)


    in 85 Languages
I18nData

    I18nData.countries #{'DE'=>'Germany'}



    I18nData.countries('DE') #{'DE'=>'Deutschland'}





    I18nData.languages('DE') #{'DE'=>'Deutsch'}





    Backwards: what is ”China” → 'ZH'

I18nData

    github.com/grosser/i18n_data

Smusher

    smusher /apps/ts/public/images


    smushing /apps/images/facebook_icon.png
    2887 -> 132                  = 4%
    smushing /apps/images/myspace_icon.png
    3136 -> 282                  = 8%
    -c => convert gifs to smaller png





    github.com/grosser/smusher

store_with_default_protocol

    class User < ActiveRecord::Base


     store_with_default_protocol 'http', :website,...
    end

    github.com/grosser/store_with_default_protocol

RPX!

    OpenId = complicated + non-universal



    OpenId is for nerds



    RPX is for the masses

RPX!

    Popup or Embed

RPX!

    <=RPXNow.embed_code(


     'mywebsite',rpx_token_sessions_url
    )%>


    <%=RPXNow.popup_code(


     'Login here...', 'mywebsite',
     rpx_token_sessions_url,:language=>'de')
    %>
RPX!

    def rpx_token


     data = RPXNow.user_data(
      params[:token],'YOUR RPX API KEY')

     self.current_user = User.find_by_identifier(
      data[:identifier]) || User.create!(data)

     redirect_to '/'
    end
RPX!

    Mappings → 1 user, N-Identities





    RPXNow.map( identifier,primary_key,'KEY')





    RPXNow.unmap(identifier,primary_key,'KEY')





    RPXNow.mappings(primary_key,'API KEY')

RPX!

    RPXNow.com





    github.com/grosser/rpx_now

Programming Rubies

    Programming Pearl rewritten in Ruby



    Readable + understandable

Programming Rubies

    Make a choice....



    int main(void){


      set S;
      set::iterator j;
      string t;
      while (cin >> t)
         S.insert(t);
         for (j = S.begin(); j != S.end(); ++j)
           cout << *j << quot;nquot;;
       return 0;}
    puts input.readlines(' ').uniq * quot;nquot;

Programming Rubies

    Ruby + Markdown + Parser = HTML + PDF



    ### Unique words


    Show all words that are inside a given text
    include 1
    #----excerpt


    puts input.readlines(' ').uniq * quot;nquot;
    #----excerpt
Programming Rubies

    Single large, printable file

Programming Rubies

    Contribute



    Review



    Enjoy



    github.com/grosser/programming_pearls


Weitere ähnliche Inhalte

Andere mochten auch

Hydro Licensing &amp; Compliance Forum
Hydro Licensing &amp; Compliance ForumHydro Licensing &amp; Compliance Forum
Hydro Licensing &amp; Compliance ForumMwestergaard
 
Spec & Test Helper
Spec & Test HelperSpec & Test Helper
Spec & Test Helpergrosser
 
Debugging production - eurucamp 2013
Debugging production - eurucamp 2013Debugging production - eurucamp 2013
Debugging production - eurucamp 2013grosser
 
Webtechnologien fuer das Frontend und Flash( Flex ) Vs Js( Ajax )
Webtechnologien fuer das Frontend und Flash( Flex ) Vs Js( Ajax )Webtechnologien fuer das Frontend und Flash( Flex ) Vs Js( Ajax )
Webtechnologien fuer das Frontend und Flash( Flex ) Vs Js( Ajax )grosser
 
Excel chapter 1
Excel chapter 1Excel chapter 1
Excel chapter 1jhaastrup1
 
Microsoft 2007 Basics
Microsoft 2007 BasicsMicrosoft 2007 Basics
Microsoft 2007 BasicsJulie Van Noy
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting PersonalKirsty Hulse
 

Andere mochten auch (10)

Hydro Licensing &amp; Compliance Forum
Hydro Licensing &amp; Compliance ForumHydro Licensing &amp; Compliance Forum
Hydro Licensing &amp; Compliance Forum
 
Spec & Test Helper
Spec & Test HelperSpec & Test Helper
Spec & Test Helper
 
Excel Grades Formulas
Excel Grades FormulasExcel Grades Formulas
Excel Grades Formulas
 
Debugging production - eurucamp 2013
Debugging production - eurucamp 2013Debugging production - eurucamp 2013
Debugging production - eurucamp 2013
 
Webtechnologien fuer das Frontend und Flash( Flex ) Vs Js( Ajax )
Webtechnologien fuer das Frontend und Flash( Flex ) Vs Js( Ajax )Webtechnologien fuer das Frontend und Flash( Flex ) Vs Js( Ajax )
Webtechnologien fuer das Frontend und Flash( Flex ) Vs Js( Ajax )
 
Excel 2007 Unit P
Excel 2007 Unit PExcel 2007 Unit P
Excel 2007 Unit P
 
Excel chapter 1
Excel chapter 1Excel chapter 1
Excel chapter 1
 
Excel 2007 for inset final copy
Excel 2007 for inset final copyExcel 2007 for inset final copy
Excel 2007 for inset final copy
 
Microsoft 2007 Basics
Microsoft 2007 BasicsMicrosoft 2007 Basics
Microsoft 2007 Basics
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 

Ähnlich wie MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher Store With Default Protocol

C Under Linux
C Under LinuxC Under Linux
C Under Linuxmohan43u
 
Python scripting kick off
Python scripting kick offPython scripting kick off
Python scripting kick offAndrea Gangemi
 
Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Bastian Feder
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In PythonMarwan Osman
 
Intel JIT Talk
Intel JIT TalkIntel JIT Talk
Intel JIT Talkiamdvander
 
I need help building a dictionary for the unique packets tha.pdf
I need help building a dictionary for the unique packets tha.pdfI need help building a dictionary for the unique packets tha.pdf
I need help building a dictionary for the unique packets tha.pdfsukhvir71
 
Jscript Fundamentals
Jscript FundamentalsJscript Fundamentals
Jscript Fundamentalsrspaike
 
Adventurous Merb
Adventurous MerbAdventurous Merb
Adventurous MerbMatt Todd
 
C from hello world to 010101
C from hello world to 010101C from hello world to 010101
C from hello world to 010101Bellaj Badr
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Todd Zaki Warfel
 
Rpg Pointers And User Space
Rpg Pointers And User SpaceRpg Pointers And User Space
Rpg Pointers And User Spaceramanjosan
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDTBastian Feder
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?lichtkind
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy CodeRowan Merewood
 

Ähnlich wie MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher Store With Default Protocol (20)

C Under Linux
C Under LinuxC Under Linux
C Under Linux
 
PHP for Grown-ups
PHP for Grown-upsPHP for Grown-ups
PHP for Grown-ups
 
Python scripting kick off
Python scripting kick offPython scripting kick off
Python scripting kick off
 
How to build the Web
How to build the WebHow to build the Web
How to build the Web
 
Api Design
Api DesignApi Design
Api Design
 
Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In Python
 
Intel JIT Talk
Intel JIT TalkIntel JIT Talk
Intel JIT Talk
 
C to perl binding
C to perl bindingC to perl binding
C to perl binding
 
I need help building a dictionary for the unique packets tha.pdf
I need help building a dictionary for the unique packets tha.pdfI need help building a dictionary for the unique packets tha.pdf
I need help building a dictionary for the unique packets tha.pdf
 
Jscript Fundamentals
Jscript FundamentalsJscript Fundamentals
Jscript Fundamentals
 
Adventurous Merb
Adventurous MerbAdventurous Merb
Adventurous Merb
 
Week8
Week8Week8
Week8
 
C from hello world to 010101
C from hello world to 010101C from hello world to 010101
C from hello world to 010101
 
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
 
Rpg Pointers And User Space
Rpg Pointers And User SpaceRpg Pointers And User Space
Rpg Pointers And User Space
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?
 
MLflow with R
MLflow with RMLflow with R
MLflow with R
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 

Kürzlich hochgeladen

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
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 DiscoveryTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
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 FresherRemote DBA Services
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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 TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Kürzlich hochgeladen (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher Store With Default Protocol

  • 2. Hello my name is Michael Grosser   Rathershort.com
  • 3. I18nData Language – select  Country – select  Rails default = Full name = madness! 
  • 4. I18nData 185 Language codes (iso 639 - 2 letter)  in 66 Languages 246 Country codes (iso 3166 - 2 letter)  in 85 Languages
  • 5. I18nData I18nData.countries #{'DE'=>'Germany'}  I18nData.countries('DE') #{'DE'=>'Deutschland'}  I18nData.languages('DE') #{'DE'=>'Deutsch'}  Backwards: what is ”China” → 'ZH' 
  • 6. I18nData github.com/grosser/i18n_data 
  • 7. Smusher smusher /apps/ts/public/images  smushing /apps/images/facebook_icon.png 2887 -> 132 = 4% smushing /apps/images/myspace_icon.png 3136 -> 282 = 8% -c => convert gifs to smaller png  github.com/grosser/smusher 
  • 8. store_with_default_protocol class User < ActiveRecord::Base  store_with_default_protocol 'http', :website,... end github.com/grosser/store_with_default_protocol 
  • 9. RPX! OpenId = complicated + non-universal  OpenId is for nerds  RPX is for the masses 
  • 10. RPX! Popup or Embed 
  • 11. RPX! <=RPXNow.embed_code(  'mywebsite',rpx_token_sessions_url )%> <%=RPXNow.popup_code(  'Login here...', 'mywebsite', rpx_token_sessions_url,:language=>'de') %>
  • 12. RPX! def rpx_token  data = RPXNow.user_data( params[:token],'YOUR RPX API KEY') self.current_user = User.find_by_identifier( data[:identifier]) || User.create!(data) redirect_to '/' end
  • 13. RPX! Mappings → 1 user, N-Identities  RPXNow.map( identifier,primary_key,'KEY')  RPXNow.unmap(identifier,primary_key,'KEY')  RPXNow.mappings(primary_key,'API KEY') 
  • 14. RPX! RPXNow.com  github.com/grosser/rpx_now 
  • 15. Programming Rubies Programming Pearl rewritten in Ruby  Readable + understandable 
  • 16. Programming Rubies Make a choice....  int main(void){  set S; set::iterator j; string t; while (cin >> t) S.insert(t); for (j = S.begin(); j != S.end(); ++j) cout << *j << quot;nquot;; return 0;} puts input.readlines(' ').uniq * quot;nquot; 
  • 17. Programming Rubies Ruby + Markdown + Parser = HTML + PDF  ### Unique words  Show all words that are inside a given text include 1 #----excerpt  puts input.readlines(' ').uniq * quot;nquot; #----excerpt
  • 18. Programming Rubies Single large, printable file 
  • 19. Programming Rubies Contribute  Review  Enjoy  github.com/grosser/programming_pearls 