Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Forked from anonymous/gist:64355
Created February 14, 2009 13:03
Show Gist options
  • Save ELLIOTTCABLE/64356 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/64356 to your computer and use it in GitHub Desktop.
require 'wordlist'
# Get evil idea and swap in code words
print "Enter your new idea: "
idea = gets
Decoder::CodeWords.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
module Decoder
CodeWords = {
'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'
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment