Skip to content

Instantly share code, notes, and snippets.

Created February 14, 2009 13:00
Show Gist options
  • Save anonymous/64355 to your computer and use it in GitHub Desktop.
Save anonymous/64355 to your computer and use it in GitHub Desktop.
#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