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

sumana_PHP_mysql_IIT_BOMBAY_2013
sumana_PHP_mysql_IIT_BOMBAY_2013sumana_PHP_mysql_IIT_BOMBAY_2013
sumana_PHP_mysql_IIT_BOMBAY_2013
Sumana Hariharan
 
Php(report)
Php(report)Php(report)
Php(report)
Yhannah
 

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

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
Jesse Vincent
 

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

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 

Recently uploaded (20)

The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 

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