SlideShare a Scribd company logo
1 of 20
Download to read offline
0r how I built my first ruby gem
How do you read
 <source code>	

   Offline? *
   * you do read source code, right ?
Pop Quiz:
How does Rails
 find_by_* 	
        work?
  I didn't bother to find out! L
Pop Quiz:
    How is it that
CoffeeScript is written
  in ... Coffeescript?
     Short Answer: Boot strapping.
What does it do?


	
  
       {code} ↦ CodeRippa ↦ {PDF}

" CodeRippa is my attempt to make source code
  reading a more pleasurable experience, and help
  programmers get better at their craft. " – Me.
Features

1   Syntax Highlighting
$ code_rippa –n	
c	
coffeescript	
erlang	
haskell	
java	
javascript	
ruby	
prolog	
python	
	
$ code_rippa –n | wc –l	
   143
Features

2           Themes!
$ code_rippa –n	
blackboard	
brilliance_black	
cobalt	
happy_happy_joy_joy_2	
ir_black	
made_of_code	
monokai	
railscasts	
solarized_dark	
	
$ code_rippa –l | wc –l	
   84
Features

3   Bookmarked PDF
How it works

# syntax highlighting engine	
require ‘uv’	
	
# language detection	
require ‘language_sniffer’
Getting the goods.


# install texlive	
	
$ gem install code_rippa
I         I was
only creating a	
  

Stuff I learnt along the way.
$ code_rippa -h	
	
  Usage: code_rippa [options] input_file_or_directory	
	
      Parses input_file or directory and outputs a file named out.tex. 	
      Unless specified, 'Made of Code' is used as the default theme.	
              	
      To see all themes, type:	
         code_rippa -l     	
       	
  Examples:	
    	
    1. code_rippa path_to_file.rb              (uses default theme)	
    	
    2. code_rippa -t rubyblue path_to_file.rb (with theme specified)	
    	
    3. code_rippa -t rubyblue path_to_dir      	
	
    Then run `pdflatex -interaction=batchmode out.tex` to generate the PDF output.	
         	
  Options:	
    -t, --theme THEME                 Selected theme	
    -n, --list-syntax                 List all available syntax	
    -l, --list-themes                 List all available themes	
    -v, --version                     Display version number	
    -h, --help                        Display this screen	



    Building a command line tool in Ruby.
Best looking website I've made.
Basic Insurance.
         	
http://travis-ci.org/
Minitest!
Addiction.
DEMO
In the |-line


Drag source
   folder !
    here.!
In the |-line


Anyone know how to
build a LaTeX server?	
  
/benjamintanweihao/code_rippa	
	
	
        ben @ witsvale.com

More Related Content

What's hot (20)

Ruby Programming Introduction
Ruby Programming IntroductionRuby Programming Introduction
Ruby Programming Introduction
 
Hack Programming Language
Hack Programming LanguageHack Programming Language
Hack Programming Language
 
Basics PHP
Basics PHPBasics PHP
Basics PHP
 
Php.ppt
Php.pptPhp.ppt
Php.ppt
 
Php introduction
Php introductionPhp introduction
Php introduction
 
Ruby
RubyRuby
Ruby
 
PHP tutorial | ptutorial
PHP tutorial | ptutorialPHP tutorial | ptutorial
PHP tutorial | ptutorial
 
PHP
PHPPHP
PHP
 
Php basics
Php basicsPhp basics
Php basics
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 
Introduction To PHP
Introduction To PHPIntroduction To PHP
Introduction To PHP
 
Php’s guts
Php’s gutsPhp’s guts
Php’s guts
 
Sheffield_R_ July meeting - Interacting with R - IDEs, Git and workflow
Sheffield_R_ July meeting - Interacting with R - IDEs, Git and workflowSheffield_R_ July meeting - Interacting with R - IDEs, Git and workflow
Sheffield_R_ July meeting - Interacting with R - IDEs, Git and workflow
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
sumana_PHP_mysql_IIT_BOMBAY_2013
sumana_PHP_mysql_IIT_BOMBAY_2013sumana_PHP_mysql_IIT_BOMBAY_2013
sumana_PHP_mysql_IIT_BOMBAY_2013
 
Php(report)
Php(report)Php(report)
Php(report)
 
Php tutorial
Php  tutorialPhp  tutorial
Php tutorial
 

Viewers also liked (7)

Tes eq
Tes eqTes eq
Tes eq
 
Mi Vida de MayxD
Mi Vida de MayxDMi Vida de MayxD
Mi Vida de MayxD
 
Ramos
RamosRamos
Ramos
 
Ruby 2.1
Ruby 2.1Ruby 2.1
Ruby 2.1
 
Pmcc.culturasustentável
Pmcc.culturasustentávelPmcc.culturasustentável
Pmcc.culturasustentável
 
Odoo report
Odoo reportOdoo report
Odoo report
 
Keyword Presentation
Keyword PresentationKeyword Presentation
Keyword Presentation
 

Similar to Code rippa

Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceJesse Vincent
 
Ruby for .NET developers
Ruby for .NET developersRuby for .NET developers
Ruby for .NET developersMax Titov
 
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
 
Contribute to rails
Contribute to railsContribute to rails
Contribute to railsmartinsvalin
 
Deep learning - the conf br 2018
Deep learning - the conf br 2018Deep learning - the conf br 2018
Deep learning - the conf br 2018Fabio Janiszevski
 
I18nize Scala programs à la gettext
I18nize Scala programs à la gettextI18nize Scala programs à la gettext
I18nize Scala programs à la gettextNgoc Dao
 
Introduction to rails
Introduction to railsIntroduction to rails
Introduction to railsGo Asgard
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With YouDalibor Gogic
 
#CNX14 - Using Ruby for Reliability, Consistency, and Speed
#CNX14 - Using Ruby for Reliability, Consistency, and Speed#CNX14 - Using Ruby for Reliability, Consistency, and Speed
#CNX14 - Using Ruby for Reliability, Consistency, and SpeedSalesforce Marketing Cloud
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyPatrick Devins
 
Fullstack Academy - Awesome Web Dev Tips & Tricks
Fullstack Academy - Awesome Web Dev Tips & TricksFullstack Academy - Awesome Web Dev Tips & Tricks
Fullstack Academy - Awesome Web Dev Tips & TricksFrances Coronel
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceJesse Vincent
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchAndrew Lowe
 
Ruby Meets Cocoa
Ruby Meets CocoaRuby Meets Cocoa
Ruby Meets CocoaRobbert
 

Similar to Code rippa (20)

How DSL works on Ruby
How DSL works on RubyHow DSL works on Ruby
How DSL works on Ruby
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret Sauce
 
Ruby for .NET developers
Ruby for .NET developersRuby for .NET developers
Ruby for .NET developers
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?
 
Ruby on Rails 3 Day BC
Ruby on Rails 3 Day BCRuby on Rails 3 Day BC
Ruby on Rails 3 Day BC
 
Contribute to rails
Contribute to railsContribute to rails
Contribute to rails
 
Deep learning - the conf br 2018
Deep learning - the conf br 2018Deep learning - the conf br 2018
Deep learning - the conf br 2018
 
I18nize Scala programs à la gettext
I18nize Scala programs à la gettextI18nize Scala programs à la gettext
I18nize Scala programs à la gettext
 
Introduction to rails
Introduction to railsIntroduction to rails
Introduction to rails
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
 
#CNX14 - Using Ruby for Reliability, Consistency, and Speed
#CNX14 - Using Ruby for Reliability, Consistency, and Speed#CNX14 - Using Ruby for Reliability, Consistency, and Speed
#CNX14 - Using Ruby for Reliability, Consistency, and Speed
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copy
 
Fullstack Academy - Awesome Web Dev Tips & Tricks
Fullstack Academy - Awesome Web Dev Tips & TricksFullstack Academy - Awesome Web Dev Tips & Tricks
Fullstack Academy - Awesome Web Dev Tips & Tricks
 
Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
 
Composer Helpdesk
Composer HelpdeskComposer Helpdesk
Composer Helpdesk
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
 
Get your teeth into Plack
Get your teeth into PlackGet your teeth into Plack
Get your teeth into Plack
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible research
 
Ruby Meets Cocoa
Ruby Meets CocoaRuby Meets Cocoa
Ruby Meets Cocoa
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

Code rippa

  • 1. 0r how I built my first ruby gem
  • 2. How do you read <source code> Offline? * * you do read source code, right ?
  • 3. Pop Quiz: How does Rails find_by_* work? I didn't bother to find out! L
  • 4. Pop Quiz: How is it that CoffeeScript is written in ... Coffeescript? Short Answer: Boot strapping.
  • 5. What does it do?   {code} ↦ CodeRippa ↦ {PDF} " CodeRippa is my attempt to make source code reading a more pleasurable experience, and help programmers get better at their craft. " – Me.
  • 6. Features 1 Syntax Highlighting $ code_rippa –n c coffeescript erlang haskell java javascript ruby prolog python $ code_rippa –n | wc –l 143
  • 7. Features 2 Themes! $ code_rippa –n blackboard brilliance_black cobalt happy_happy_joy_joy_2 ir_black made_of_code monokai railscasts solarized_dark $ code_rippa –l | wc –l 84
  • 8. Features 3 Bookmarked PDF
  • 9. How it works # syntax highlighting engine require ‘uv’ # language detection require ‘language_sniffer’
  • 10. Getting the goods. # install texlive $ gem install code_rippa
  • 11. I I was only creating a   Stuff I learnt along the way.
  • 12. $ code_rippa -h Usage: code_rippa [options] input_file_or_directory Parses input_file or directory and outputs a file named out.tex. Unless specified, 'Made of Code' is used as the default theme. To see all themes, type: code_rippa -l Examples: 1. code_rippa path_to_file.rb (uses default theme) 2. code_rippa -t rubyblue path_to_file.rb (with theme specified) 3. code_rippa -t rubyblue path_to_dir Then run `pdflatex -interaction=batchmode out.tex` to generate the PDF output. Options: -t, --theme THEME Selected theme -n, --list-syntax List all available syntax -l, --list-themes List all available themes -v, --version Display version number -h, --help Display this screen Building a command line tool in Ruby.
  • 13. Best looking website I've made.
  • 14. Basic Insurance. http://travis-ci.org/
  • 17. DEMO
  • 18. In the |-line Drag source folder ! here.!
  • 19. In the |-line Anyone know how to build a LaTeX server?  
  • 20. /benjamintanweihao/code_rippa ben @ witsvale.com