Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
2 added 948 characters in body
source | link

CJam, 32 30 bytes

q{_eu'[,66>"EIOU"-#)g{'o1$}*}/

This is a full program reading from STDIN and printing to STDOUT. It works for arbitrary Unicode input and treats the following 42 characters as consonants:

BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz

Test it here.

Explanation

q                              "Slurp STDIN.";
 {                          }/ "For each character...";
  _eu                          "Duplicate and convert to upper case.";
     '[,66>                    "Get a string from B to Z using range and slice.";
           "EIOU"-             "Remove the remaining four vowels.";
                  #            "Find the position of the character in this string or
                                -1 if the character can't be found.";
                   )g          "Increment, take signum, which gives 1 for consonants, 
                                and 0 otherwise.";
                     {    }*   "Repeat this block that many times, i.e. do nothing for
                                non-consonants.";
                      'o       "Push an 'o'.";
                        1$     "Copy the current character.";

CJam, 32 30 bytes

q{_eu'[,66>"EIOU"-#)g{'o1$}*}/

This is a full program reading from STDIN and printing to STDOUT. It works for arbitrary Unicode input and treats the following 42 characters as consonants:

BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz

Test it here.

CJam, 32 30 bytes

q{_eu'[,66>"EIOU"-#)g{'o1$}*}/

This is a full program reading from STDIN and printing to STDOUT. It works for arbitrary Unicode input and treats the following 42 characters as consonants:

BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz

Test it here.

Explanation

q                              "Slurp STDIN.";
 {                          }/ "For each character...";
  _eu                          "Duplicate and convert to upper case.";
     '[,66>                    "Get a string from B to Z using range and slice.";
           "EIOU"-             "Remove the remaining four vowels.";
                  #            "Find the position of the character in this string or
                                -1 if the character can't be found.";
                   )g          "Increment, take signum, which gives 1 for consonants, 
                                and 0 otherwise.";
                     {    }*   "Repeat this block that many times, i.e. do nothing for
                                non-consonants.";
                      'o       "Push an 'o'.";
                        1$     "Copy the current character.";
1
source | link

CJam, 32 30 bytes

q{_eu'[,66>"EIOU"-#)g{'o1$}*}/

This is a full program reading from STDIN and printing to STDOUT. It works for arbitrary Unicode input and treats the following 42 characters as consonants:

BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz

Test it here.