Skip to content

Instantly share code, notes, and snippets.


  • Scarsdale, NY, USA
Block or report user

Report or block LucasCioffi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
LucasCioffi / example_controller.rb
Last active Apr 18, 2019
Here's a controller action you could insert into a Rails project. Accept a block of text and transform it into the language of Fake Grimlock. Creative Commons Attribution License 3.0.
View example_controller.rb
def fake_grimlockify
if params[:text].present?
@text_output = ""
params[:text].split(" ").each do |word|
if word.size > 4
@text_output += word.singularize.upcase + " " #.force_encoding('UTF-16').gsub("\xE2\x80\x99","").force_encoding('UTF-8')
@text_output += word.upcase + " " #.force_encoding('UTF-16').gsub("\xE2\x80\x99","").force_encoding('UTF-8')
You can’t perform that action at this time.