Wicked Cool Ruby Scripts is a compendium of scripts that will make your life easier by saving you time and solving problems. If you find yourself wasting effort and time on a task a trained monkey could do, it's time for Ruby to come to the rescue.
Wicked Cool Ruby Scripts provides carefully selected Ruby scripts that are immediately useful. Learn how to streamline administrative tasks like renaming files, disabling processes, and changing permissions. After you get your feet wet creating basic scripts, author Steve Pugh will show you how to create powerful Web crawlers, security scripts, full-fledged libraries and applications, and much more. With each script you'll get the raw code followed by an explanation of how it really works, as well as instructions for how to run the script and suggestions for customizing it. Wicked Cool Ruby Scripts will save you from the tedium of repetitive tasks and give you back the time it would take to write scripts from scratch.
Chapter 1 GENERAL PURPOSE UTILITIES
Check for Changed Files
Encrypt a File
Decrypt a File
File Splitting
File Joining
Windows Process Viewer
File Compressor
File Decompression
Mortgage Calculator
Chapter 2 WEBSITE SCRIPTING
Web Page Link Validator
Orphan File Checker
Form Generator
RSS Parsing
Stock Exchange Grep
IP Address Generation
Subnet Calculator
Chapter 3 LI(U)NIX SYSTEM ADMINISTRATION
Fixing Bad Filenames
Adding a User
Modifying a User
Killing a Stuck Process
Validating Symlinks
Chapter 4 PICTURE UTILITIES
Mass Editing
Image Information Extraction
Creating a Thumbnail
Resize a Picture
Adding a Watermark to Pictures
Convert to Black and White
Creating a Photo Gallery
Chapter 5 GAMES AND LEARNING TOOLS
Sudoku Solver
Flash Cards
Number-Guessing Game
Rock, Paper, Scissors
Word Scramble
Hangman
Pig
Chapter 6 STRING UTILITIES
PDF Generator
Word Frequency
Comma-Separated Value Parser
CSV to XML
Ruby Grep
Password Check
Chapter 7 SERVERS AND SCRAPERS
Define
Automated SMS
Link Scrape
Image Scrape
Scraper
Encrypted Client
Encrypted Server
Chapter 8 ARGUMENTS AND DOCUMENTATION
File Security
Web Scraper
Photo Utilities
Conclusion
Chapter 9 SORTING ALGORITHMS
Bubble Sort
Selection Sort
Shell Sort
Merge Sort
Heap Sort
Quick Sort
Shear Sort
A Note About Efficiencies
Chapter 10 WRITING A METASPLOIT 3.1 MODULE WITH RUBY
Steve Pugh has been a programmer for over a decade. He has worked as a software analyst for a banking software company, run a large-scale network operations center (overseeing 7,000 users and 130 network technicians), and is currently doing security research for the US government. Much of this book was written while Pugh was working for the US government in northern Iraq.