Skip to content

Instantly share code, notes, and snippets.

@aienn
Created March 11, 2013 22:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aienn/5138433 to your computer and use it in GitHub Desktop.
Save aienn/5138433 to your computer and use it in GitHub Desktop.
CMeLLIHa9l_KupuJIJIuLLa_no3BoHuT!
#usage ruby bydloscript.rb Здесь смешные надписи кириллицей лол!
source = ARGV.join(" ").strip.split(//)
table = { "а" => "a", "А" => "A",
"б" => "6", "Б" => "6",
"в" => "B", "В" => "B",
"г" => "r", "Г" => "r",
"д" => "D", "Д" => "D",
"е" => "e", "Е" => "E",
"ё" => "e", "Ё" => "E",
"ж" => "}|{", "Ж" => "}I{",
"з" => "3", "З" => "3",
"и" => "u", "И" => "u",
"й" => "u", "Й" => "u",
"к" => "K", "К" => "K",
"л" => "JI", "Л" => "JI",
"м" => "M", "М" => "M",
"н" => "H", "Н" => "H",
"о" => "o", "О" => "O",
"п" => "n", "П" => "n",
"р" => "p", "Р" => "P",
"с" => "c", "С" => "C",
"т" => "T", "Т" => "T",
"у" => "y", "У" => "y",
"ф" => "(|)", "Ф" => "(|)",
"х" => "x", "Х" => "X",
"ц" => "LL", "Ц" => "LL",
"ч" => "4", "Ч" => "4",
"ш" => "LLI", "Ш" => "LLI",
"щ" => "LLL", "Щ" => "LLL",
"ъ" => "b", "Ъ" => "b",
"ы" => "bI", "Ы" => "bI",
"ь" => "b", "Ь" => "b",
"э" => "3", "Э" => "3",
"ю" => "I-O", "Ю" => "I-O",
"я" => "9l", "Я" => "9l",
" " => "_", "!" => "!" }
puts source.map { |x| table[x] || x }.join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment