MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher Store With Default Protocol
Upcoming SlideShare
Loading in...5
×
 

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

on

  • 1,766 views

My quick & dirty presentation for Rug-b, covering my latest ruby adventures

My quick & dirty presentation for Rug-b, covering my latest ruby adventures

Statistics

Views

Total Views
1,766
Views on SlideShare
1,763
Embed Views
3

Actions

Likes
0
Downloads
1
Comments
2

2 Embeds 3

https://chamilo.hogent.be 2
http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • the problem is solved...
    using

    user_data(params[:token],:apiKey=>'4019e3c7149bac89114ef8c1ae6ab36bc4a8e795')

    instead of

    user_data(params[:token],'4019e3c7149bac89114ef8c1ae6ab36bc4a8e795')

    worked perfect :D
    Are you sure you want to
    Your message goes here
    Processing…
  • data = RPXNow.user_data(params[:token],'4019e3c7149bac89114ef8c1ae6ab36bc4a8e796')

    after this line it shows error:
    TypeError in UsersController#create

    can't convert Symbol into String

    Rails.root: E:/ruby/magnet_janrain
    Application Trace | Framework Trace | Full Trace

    app/controllers/users_controller.rb:16:in `create'

    Request

    Parameters:

    {'token'=>'73f84519b97cc85fe6117123f4f2d38efae1267a'}

    Show session dump

    Show env dump
    Response

    Headers:

    None
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

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

  • 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 