Created
February 14, 2009 13:00
-
-
Save anonymous/64355 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#below is the contents of wordlist.rb | |
code_words = { | |
'starmonkeys' => 'Phil and Pete, those prickly chancellors of the New Reich', | |
'catapult' => 'chucky go-go', 'firebomb' => 'Heat-Assisted Living', | |
'Nigeria' => "Ny and Jerry's Dry Cleaning (with Donuts)", | |
'Put the kabosh on' => 'Put the cable box on' | |
} | |
#And this bit below is the contents of test.rb | |
require 'wordlist' | |
# Get evil idea and swap in code words | |
print "Enter your new idea: " | |
idea = gets | |
code_words.each do |real, code| | |
idea.gsub!( real, code ) | |
end | |
# Save the jibberish to a new file | |
print "File encoded. Please enter a name for this idea: " | |
idea_name = gets.strip | |
File::open( "idea-" + idea_name + ".txt", "w" ) do |f| | |
f << idea | |
end | |
sleep 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment